In preparation for potential future concurrency, a FunctionPass
shouldn't modify anything at the module level that other FunctionPasses
can also modify.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
How is this supposed to work practically? A huge number of functions passes want to add intrinsic declarations
Comment Actions
Ideally they'd be module passes, like in https://reviews.llvm.org/D86178.
It does look like some existing legacy and NPM function passes break this rule. Maybe I should revert and ask more explicitly on llvm-dev. WDYT?
Comment Actions
I would bet the majority of passes do (e.g. InstCombine, and pretty much any target IR pass). In the past the guidance was adding declarations is OK (I thought last time this came up, this was noted somewhere in the documentation)