[PATCH] D87457: [ARM][TTI] Prevents constants in a min/max pattern from being hoisted when in a loop
Meera Nakrani via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 10 08:24:35 PDT 2020
MeeraN created this revision.
MeeraN added reviewers: dmgreen, SjoerdMeijer, samparker, pbarrio, mcrosier, jmolloy, rengolin.
Herald added subscribers: danielkiss, luismarques, apazos, sameer.abuasal, pzheng, s.egerton, lenary, Jim, jocewei, PkmX, the_o, brucehoult, MartinMosbeck, rogfer01, edward-jones, zzheng, jrtc27, niosHD, sabuasal, simoncook, johnrusso, rbar, asb, kbarton, hiraditya, kristof.beyls, nemanjai.
Herald added a project: LLVM.
MeeraN requested review of this revision.
Herald added a subscriber: MaskRay.
Changes TTI function getIntImmCostInst to take an additional Instruction parameter, which enables us to be able to check it is part of a min/max pattern. We can then mark the constant used as free to prevent it being hoisted so SSAT/USAT can still be generated.
Required minor changes in some non-ARM backends to allow for the optional parameter to be included.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D87457
Files:
llvm/include/llvm/Analysis/TargetTransformInfo.h
llvm/include/llvm/Analysis/TargetTransformInfoImpl.h
llvm/lib/Analysis/TargetTransformInfo.cpp
llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp
llvm/lib/Target/AArch64/AArch64TargetTransformInfo.h
llvm/lib/Target/ARM/ARMTargetTransformInfo.cpp
llvm/lib/Target/ARM/ARMTargetTransformInfo.h
llvm/lib/Target/Lanai/LanaiTargetTransformInfo.h
llvm/lib/Target/PowerPC/PPCTargetTransformInfo.cpp
llvm/lib/Target/PowerPC/PPCTargetTransformInfo.h
llvm/lib/Target/RISCV/RISCVTargetTransformInfo.cpp
llvm/lib/Target/RISCV/RISCVTargetTransformInfo.h
llvm/lib/Target/SystemZ/SystemZTargetTransformInfo.cpp
llvm/lib/Target/SystemZ/SystemZTargetTransformInfo.h
llvm/lib/Target/X86/X86TargetTransformInfo.cpp
llvm/lib/Target/X86/X86TargetTransformInfo.h
llvm/lib/Transforms/Scalar/ConstantHoisting.cpp
llvm/test/CodeGen/Thumb2/mve-satmul-loops.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D87457.290980.patch
Type: text/x-patch
Size: 26463 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200910/90878bf3/attachment.bin>
More information about the llvm-commits
mailing list