diff options
| author | Jay Foad <jay.foad@amd.com> | 2024-08-13 12:57:13 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-08-13 12:57:13 +0100 |
| commit | b4edfc19202cf44f8b49d2a953113b167395b595 (patch) | |
| tree | 5ab08277b1280981647df596d829188d56055560 /llvm/lib/CodeGen/TargetPassConfig.cpp | |
| parent | 2256d00a1445e751f20040cb4292aa325dd83c8e (diff) | |
[LTO] Run ObjCARCContractPass according to the callgraph (#103034)
This matches other IR codegen passes and avoids a Dominator Tree
Construction in AMDGPU O2/O3 builds.
Diffstat (limited to 'llvm/lib/CodeGen/TargetPassConfig.cpp')
| -rw-r--r-- | llvm/lib/CodeGen/TargetPassConfig.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/TargetPassConfig.cpp b/llvm/lib/CodeGen/TargetPassConfig.cpp index 79e240d62a17..1b0012b65b80 100644 --- a/llvm/lib/CodeGen/TargetPassConfig.cpp +++ b/llvm/lib/CodeGen/TargetPassConfig.cpp @@ -944,13 +944,13 @@ void TargetPassConfig::addCodeGenPrepare() { void TargetPassConfig::addISelPrepare() { addPreISel(); - if (getOptLevel() != CodeGenOptLevel::None) - addPass(createObjCARCContractPass()); - // Force codegen to run according to the callgraph. if (requiresCodeGenSCCOrder()) addPass(new DummyCGSCCPass); + if (getOptLevel() != CodeGenOptLevel::None) + addPass(createObjCARCContractPass()); + addPass(createCallBrPass()); // Add both the safe stack and the stack protection passes: each of them will |
