Enable LICM Hosting LOAD only optimization in case of -O3.
This addresses [0].
[0] https://bugs.llvm.org/show_bug.cgi?id=51193
Co-authored-by: @mmatic05, @milica-lazarevic, @dmilosevic141
Paths
| Differential D113290
[AArch64TargetMachine] Enable LICM Hosting LOAD only optimization in case of -O3 AbandonedPublic Authored by djtodoro on Nov 5 2021, 8:29 AM.
Details
Summary Enable LICM Hosting LOAD only optimization in case of -O3. NOTE: This doesn't depend on the SeparateConstOffsetFromGEP, but the flag for this optimization will be enabled iff the SeparateConstOffsetFromGEP is active in the case of AARCH64 target, which is the goal arch for this stack of patches.
This addresses [0]. Co-authored-by: @mmatic05, @milica-lazarevic, @dmilosevic141
Diff Detail Event TimelineHerald added subscribers: asbirlea, hiraditya, kristof.beyls. · View Herald TranscriptNov 5 2021, 8:29 AM djtodoro added a child revision: D113291: [AggressiveInstCombine] Lower Table Based CTTZ .Nov 5 2021, 8:58 AM djtodoro removed a child revision: D113291: [AggressiveInstCombine] Lower Table Based CTTZ .Nov 12 2021, 8:12 AM djtodoro retitled this revision from [WIP] [AArch64TargetMachine] Enable LICM Hosting LOAD only optimization in case of -O3 to [AArch64TargetMachine] Enable LICM Hosting LOAD only optimization in case of -O3.Nov 16 2021, 2:06 AM Comment Actions Not sure why you want to turn it on specifically for aarch64, and only late in the optimization pipeline.
Comment Actions @efriedma Thanks for the comment!
Actually, it doesn't need to be called very late. And, I don't think this is applicable to AArch64 only.
Revision Contents
Diff 385085 llvm/include/llvm/Transforms/Scalar.h
llvm/lib/Target/AArch64/AArch64TargetMachine.cpp
llvm/lib/Transforms/Scalar/LICM.cpp
llvm/test/Transforms/LICM/AArch64/hoist-load-without-store.ll
|
You can't mess with a global variable like this; among other issues, it breaks thread safety. If you need a variable, add a member to the LegacyLICMPass class.