Since doInitialization() in the legacy pass modifies the module, the NPM
pass is a Module pass.
Details
- Reviewers
ahatanak dexonsmith ychen - Commits
- rGcfde93e5d6be: [ObjCARCOpt] Port objc-arc to NPM
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
llvm/lib/Transforms/ObjCARC/ObjCARCOpts.cpp | ||
---|---|---|
2501 | Are the results of the analyses currently preserved by setPreservesCFG preserved by the new pass manager too? If they aren't, is there a way to avoid doing the analyses again? |
llvm/lib/Transforms/ObjCARC/ObjCARCOpts.cpp | ||
---|---|---|
2501 | Done below. |
OK, thank you. LGTM, but you can wait for an approval from someone more familiar with the pass manager.
It looks like belong to addFunctionSimplificationPasses. How about keeping it Function pass using initialization once?
The reason I made this a module pass instead of a function pass is because it adds function declarations when there is a call to EP.get(). I'm not sure if you're allowed to add function declarations in a function pass. If we were to try to parallelize function passes, that would be bad.
We could split the creation of all the functions in ARCRuntimeEntryPoints into a separate module pass, but that would have to be run right before this function pass and wouldn't help with adding it to a FunctionPassManager.
That makes sense to me. This also looks like something doInitilization could help with if the EP.get() could happen in doInitilization.
clang-tidy: warning: invalid case style for function 'OptimizeRetainRVCall' [readability-identifier-naming]
not useful