[llvm] [CodeGen] Port GlobalMerge to new pass manager (PR #77474)
via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 9 19:51:29 PST 2024
================
@@ -290,6 +291,9 @@ template <typename DerivedT> class CodeGenPassBuilder {
inconvertibleErrorCode());
}
+ /// Target can override this to add GlobalMergePass before all IR passes.
+ void addGlobalMergePass(AddIRPass &) const {}
----------------
paperchalice wrote:
Some backends, e.g. ARM, use this pass. The legacy version transforms module in `doInitialization` rather than `runOnFunction`. So, add this hook to add global merge and add this pass in front of the pipeline.
https://github.com/llvm/llvm-project/pull/77474
More information about the llvm-commits
mailing list