[PATCH] D58390: [X86] Don't consider functions ABI compatible for ArgumentPromotion pass if they would legalize 512-bit vectors differently.
Eric Christopher via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 19 10:05:30 PST 2019
echristo added inline comments.
================
Comment at: lib/Target/X86/X86TargetTransformInfo.cpp:3085-3089
+ const X86Subtarget *CallerST =
+ static_cast<const X86Subtarget *>(TM.getSubtargetImpl(*Caller));
+ const X86Subtarget *CalleeST =
+ static_cast<const X86Subtarget *>(TM.getSubtargetImpl(*Callee));
+ return CallerST->useAVX512Regs() == CalleeST->useAVX512Regs();
----------------
craig.topper wrote:
> echristo wrote:
> > I'm guessing removing the single use local variables is much less readable than having them?
> clang-format gave me this
>
> ```
> return static_cast<const X86Subtarget *>(TM.getSubtargetImpl(*Caller))
> ->useAVX512Regs() ==
> static_cast<const X86Subtarget *>(TM.getSubtargetImpl(*Callee))
> ->useAVX512Regs();
> ```
Actually:
class X86TTIImpl : public BasicTTIImplBase<X86TTIImpl> {
typedef BasicTTIImplBase<X86TTIImpl> BaseT;
typedef TargetTransformInfo TTI;
friend BaseT;
const X86Subtarget *ST;
const X86TargetLowering *TLI;
The subtarget is already there :)
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D58390/new/
https://reviews.llvm.org/D58390
More information about the llvm-commits
mailing list