Question regarding specialization constants

I’m trying to understand the most appropriate usage of specialization constants and I’m unsure of the “best” practice when it comes to setting them. From my understanding there’s two main ways to override specialization constants: one is by setting/freezing them with a tool like the optimizer and the other is an api that actually supports them (like vulkan).

Imagine I have a system in place where I have the optimizer packed in the run-time executable and I have whatever shader caching mechanisms in place to prevent optimizing the same specialization constant twice. Also imagine I do what offline optimizations I can, leaving specialization constants alone.

What I want to know is what are the pros/cons of running the optimizer right before creating a pipeline to freeze out specialization constants compared to using Vulkan’s (or any other language’s) built-in functionality.

I’ve personally had to deal with less than ideal driver optimizers before (to be fair, with glsl) so I would assume running the spir-v optimizer at run-time is the safest way to guarantee a “good” shader after constants are frozen. Am I mistaken in this or are there scenarios where leaving this to the driver would produce a better shader or potentially do this faster?