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

Dave Green via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 1 05:43:17 PDT 2022


dmgreen added a comment.

Hello. Unfortunately, I doubt that people will be in favour of this approach, especially if it is introducing ptr2int and int2ptr's so early in the pass pipeline. It looks like a pass that needs to be run as part of the backend.

There is a run of the pass in the AArch64 backend already, but it is disabled by default: https://github.com/llvm/llvm-project/blob/main/llvm/lib/Target/AArch64/AArch64TargetMachine.cpp#L581
Enabling it didn't seem to help with the original case in #50528. Would it be possible to teach it what it needs to for that case, and from there enable the EnableGEPOpt flag?


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

https://reviews.llvm.org/D128582



More information about the llvm-commits mailing list