[PATCH] D96803: EntryExitInstrumenter: Move to a module pass and enable at all optimization levels (PR49143)
Arthur Eubanks via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Feb 17 12:44:25 PST 2021
aeubanks added a comment.
In D96803#2568179 <https://reviews.llvm.org/D96803#2568179>, @zatrazz wrote:
> In D96803#2566322 <https://reviews.llvm.org/D96803#2566322>, @aeubanks wrote:
>
>> why is this now a module pass?
>
> Mainly to avoid the default rule from new pass manager to *not* apply any FunctionPass for optnone (which is the main issue for PR49143). Is there a better way to accomplish it? I noted also that createModuleToFunctionPassAdaptor basically creates a adaptor that applies the pass to all function on the module.
It's always good to make the pass as specific as possible (e.g. prefer a function pass rather than a module pass) so it doesn't have to worry about infra. For example, just iterating over functions doesn't skip declarations.
The whole point of `isRequired()` is to make the pass always run when it's added to the pipeline, so making it a module pass shouldn't be necessary with that line.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D96803/new/
https://reviews.llvm.org/D96803
More information about the cfe-commits
mailing list