[llvm] [aarch64] Unguard GEPOpt from O3 (PR #86588)
via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 25 14:43:58 PDT 2024
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-backend-aarch64
Author: Nathan Lanza (lanza)
<details>
<summary>Changes</summary>
This chunk of code currently runs only if the optimization mode is O3
AND the EnableGEPOpt flag is set. Given that this is the only use case
for the EnableGEPOpt flag, the guarding against O3 is kinda pointless.
IF the user wants to enable it then the flag should be sufficient.
---
Full diff: https://github.com/llvm/llvm-project/pull/86588.diff
1 Files Affected:
- (modified) llvm/lib/Target/AArch64/AArch64TargetMachine.cpp (+1-1)
``````````diff
diff --git a/llvm/lib/Target/AArch64/AArch64TargetMachine.cpp b/llvm/lib/Target/AArch64/AArch64TargetMachine.cpp
index 08238fdf167bf2..7d4a57d792a191 100644
--- a/llvm/lib/Target/AArch64/AArch64TargetMachine.cpp
+++ b/llvm/lib/Target/AArch64/AArch64TargetMachine.cpp
@@ -603,7 +603,7 @@ void AArch64PassConfig::addIRPasses() {
addPass(createFalkorMarkStridedAccessesPass());
}
- if (TM->getOptLevel() == CodeGenOptLevel::Aggressive && EnableGEPOpt) {
+ if (EnableGEPOpt) {
// Call SeparateConstOffsetFromGEP pass to extract constants within indices
// and lower a GEP with multiple indices to either arithmetic operations or
// multiple GEPs with single index.
``````````
</details>
https://github.com/llvm/llvm-project/pull/86588
More information about the llvm-commits
mailing list