[llvm] [NewPM] Add port for AArch64PromoteConstantPass (PR #191741)

Anshul Nigham via llvm-commits llvm-commits at lists.llvm.org
Tue May 12 20:09:03 PDT 2026


================
@@ -404,11 +427,10 @@ bool AArch64PromoteConstant::isDominated(Instruction *NewPt, Instruction *User,
   return false;
 }
 
-bool AArch64PromoteConstant::tryAndMerge(Instruction *NewPt, Instruction *User,
-                                         unsigned OpNo,
-                                         InsertionPoints &InsertPts) {
-  DominatorTree &DT = getAnalysis<DominatorTreeWrapperPass>(
-      *NewPt->getParent()->getParent()).getDomTree();
----------------
nigham wrote:

Not super clear if it preserves existing functionality to use the function's DT here in the new path.

We might need to pass around a functor that fetches the DT based on a function instead.

https://github.com/llvm/llvm-project/pull/191741


More information about the llvm-commits mailing list