[PATCH] D128582: Enable SeparateConstOffsetFromGEPPass() at -O3 and -O2

Shubham Narlawar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Jun 25 05:40:41 PDT 2022


gsocshubham added inline comments.


================
Comment at: llvm/lib/Transforms/Scalar/SeparateConstOffsetFromGEP.cpp:1050
   if (LowerGEP) {
-    // As currently BasicAA does not analyze ptrtoint/inttoptr, do not lower to
-    // arithmetic operations if the target uses alias analysis in codegen.
-    if (TTI.useAA())
-      lowerToSingleIndexGEPs(GEP, AccumulativeByteOffset);
-    else
-      lowerToArithmetics(GEP, AccumulativeByteOffset);
+    lowerToArithmetics(GEP, AccumulativeByteOffset);
     return true;
----------------
Let me know best course of action on `lowerToSingleIndexGEPs()`.

I have temporarily removed it because I was running SPEC benchmarks for AArch64 and GEP's are being splitted using `lowerToSingleIndexGEPs()` when called using clang.

But when called using opt, `lowerToArithmetics()` gets called. I want to have `lowerToArithmetics()` as default.

 Also, this pass was no longer used.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D128582/new/

https://reviews.llvm.org/D128582



More information about the llvm-commits mailing list