[llvm] [CodeGen] Merge lowerConstantIntrinsics into pre-isel lowering (PR #97727)

Björn Pettersson via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 8 01:25:20 PDT 2024


================
@@ -96,8 +96,8 @@ static bool replaceConditionalBranchesOnConstant(Instruction *II,
   return HasDeadBlocks;
 }
 
-static bool lowerConstantIntrinsics(Function &F, const TargetLibraryInfo &TLI,
-                                    DominatorTree *DT) {
+bool llvm::lowerConstantIntrinsics(Function &F, const TargetLibraryInfo &TLI,
----------------
bjope wrote:

This function is still doing an RPOT traversal, although the commit message says that we now avoid the RPOT traversal. Is that intentional?

I guess the goal was to call lowerIsConstantIntrisic and lowerObjectSizeCall directly from pre-isel-lowering, rather than running lowerConstantIntrinsics for each such call in the function?

I think it is really weird to call this helper multiple times for the same function. Right?

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


More information about the llvm-commits mailing list