Different passes for different functions

Hi all.

(Assume that a program has one module.)
Is there any way to apply different passes for different functions?

If not, please advise me how to implement it while considering module passes.

Best regards,
Sooyeon

There is limited support for different optimisations due to different functions - subtarget features specifically can vary from function to function and optimizations are intended to respect them. So the pass pipeline remains the same, but passes should skip their work if the subtarget features, attributes, etc, on a function indicate not to do a certain optimization. (this is how the “optnone” is supported for instance - but also subtarget features like SSE versions, etc)