[llvm] [CodeGen] Merge lowerConstantIntrinsics into pre-isel lowering (PR #97727)
Alexis Engelke via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 8 02:08:54 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,
----------------
aengelke wrote:
> although the commit message says that we now avoid the RPOT traversal. Is that intentional?
Yes. For most functions, the RPOT is avoided, because they have no constant intrinsics. If a function has constant intrinsics, it still does a RPOT.
> I think it is really weird to call this helper multiple times for the same function. Right?
This function is called once per function (well, except for the degenerate case you point out below...): here we (somewhat) iterate over the uses, and when we find one, we lower all intrinsic calls in the function. These are then no longer in the use list, the next use is in a different function.
https://github.com/llvm/llvm-project/pull/97727
More information about the llvm-commits
mailing list