aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/TargetPassConfig.cpp
diff options
context:
space:
mode:
authorAlexis Engelke <engelke@in.tum.de>2024-08-01 17:44:32 +0200
committerGitHub <noreply@github.com>2024-08-01 17:44:32 +0200
commitb5fc083dc30994f8d4f43ba6064d7b27467352c0 (patch)
tree06d20310a171c51e7218b4563481c3b4fbddd94c /llvm/lib/CodeGen/TargetPassConfig.cpp
parente833e8beecc3301a203dbf2f6eeb14ed4d1e996e (diff)
downloadllvm-b5fc083dc30994f8d4f43ba6064d7b27467352c0.zip
llvm-b5fc083dc30994f8d4f43ba6064d7b27467352c0.tar.gz
llvm-b5fc083dc30994f8d4f43ba6064d7b27467352c0.tar.bz2
[CodeGen] Merge lowerConstantIntrinsics into pre-isel lowering (#97727)
Currently, the LowerConstantIntrinsics pass does an RPO traversal of every function... only to find that many functions don't have constant intrinsics (is.constant, objectsize). In the CodeGen pipeline, there is already a pre-isel intrinsic lowering pass, which iterates over intrinsic declarations and lowers all users. Call lowerConstantIntrinsics from this pass to avoid the extra iteration over the entire IR and the RPO traversal.
Diffstat (limited to 'llvm/lib/CodeGen/TargetPassConfig.cpp')
-rw-r--r--llvm/lib/CodeGen/TargetPassConfig.cpp1
1 files changed, 0 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/TargetPassConfig.cpp b/llvm/lib/CodeGen/TargetPassConfig.cpp
index 3658e83..eb74c6f 100644
--- a/llvm/lib/CodeGen/TargetPassConfig.cpp
+++ b/llvm/lib/CodeGen/TargetPassConfig.cpp
@@ -845,7 +845,6 @@ void TargetPassConfig::addIRPasses() {
// TODO: add a pass insertion point here
addPass(&GCLoweringID);
addPass(&ShadowStackGCLoweringID);
- addPass(createLowerConstantIntrinsicsPass());
// For MachO, lower @llvm.global_dtors into @llvm.global_ctors with
// __cxa_atexit() calls to avoid emitting the deprecated __mod_term_func.