llvm-project/llvm/lib/Target/NVPTX
David Green be7a107070 [ARM] Teach the Arm cost model that a Shift can be folded into other instructions
This attempts to teach the cost model in Arm that code such as:
  %s = shl i32 %a, 3
  %a = and i32 %s, %b
Can under Arm or Thumb2 become:
  and r0, r1, r2, lsl #3

So the cost of the shift can essentially be free. To do this without
trying to artificially adjust the cost of the "and" instruction, it
needs to get the users of the shl and check if they are a type of
instruction that the shift can be folded into. And so it needs to have
access to the actual instruction in getArithmeticInstrCost, which if
available is added as an extra parameter much like getCastInstrCost.

We otherwise limit it to shifts with a single user, which should
hopefully handle most of the cases. The list of instruction that the
shift can be folded into include ADC, ADD, AND, BIC, CMP, EOR, MVN, ORR,
ORN, RSB, SBC and SUB. This translates to Add, Sub, And, Or, Xor and
ICmp.

Differential Revision: https://reviews.llvm.org/D70966
2019-12-09 10:24:33 +00:00
..
MCTargetDesc [cmake] Explicitly mark libraries defined in lib/ as "Component Libraries" 2019-11-21 10:48:08 -08:00
TargetInfo [cmake] Explicitly mark libraries defined in lib/ as "Component Libraries" 2019-11-21 10:48:08 -08:00
CMakeLists.txt
LLVMBuild.txt
ManagedStringPool.h ManagedStringPool - pre-increment iterator. NFC. 2019-11-07 16:56:16 +00:00
NVPTX.h [LegacyPassManager] Deprecate the BasicBlockPass/Manager. 2019-09-30 20:17:23 +00:00
NVPTX.td
NVPTXAllocaHoisting.cpp
NVPTXAllocaHoisting.h
NVPTXAsmPrinter.cpp [Alignment][NFC] Attributes use Align/MaybeAlign 2019-10-22 09:51:06 +00:00
NVPTXAsmPrinter.h [AsmPrinter] Remove const qualifier from EmitBasicBlockStart. 2019-08-20 05:13:57 +00:00
NVPTXAssignValidGlobalNames.cpp
NVPTXFrameLowering.cpp [Alignment][NFC] Use Align for TargetFrameLowering/Subtarget 2019-10-17 07:49:39 +00:00
NVPTXFrameLowering.h
NVPTXGenericToNVVM.cpp
NVPTXISelDAGToDAG.cpp [SVE][CodeGen] Scalable vector MVT size queries 2019-11-18 12:30:59 +00:00
NVPTXISelDAGToDAG.h Fix uninitialized variable warning. NFCI. 2019-11-13 14:40:20 +00:00
NVPTXISelLowering.cpp [TargetLowering] Make allowsMemoryAccess methode virtual. 2019-09-26 00:16:01 +00:00
NVPTXISelLowering.h DAG: Add function context to isFMAFasterThanFMulAndFAdd 2019-11-19 19:25:26 +05:30
NVPTXImageOptimizer.cpp
NVPTXInstrFormats.td
NVPTXInstrInfo.cpp Use MCRegister in copyPhysReg 2019-11-11 14:42:33 +05:30
NVPTXInstrInfo.h Use MCRegister in copyPhysReg 2019-11-11 14:42:33 +05:30
NVPTXInstrInfo.td [NVPTX] Restructure shfl instrinsics and add variants that return a predicate. 2019-10-14 16:53:34 +00:00
NVPTXIntrinsics.td [NVPTX] Added llvm.nvvm.mma.m8n8k4.* intrinsics 2019-10-28 13:55:30 -07:00
NVPTXLowerAggrCopies.cpp [NVPTX] NVPTXLowerAggrCopies - Silence static analyzer dyn_cast<StoreInst> null dereference warning. NFCI. 2019-09-22 13:14:30 +00:00
NVPTXLowerAggrCopies.h
NVPTXLowerAlloca.cpp [LegacyPassManager] Deprecate the BasicBlockPass/Manager. 2019-09-30 20:17:23 +00:00
NVPTXLowerArgs.cpp [Alignment][NFC] Remove AllocaInst::setAlignment(unsigned) 2019-09-30 13:34:44 +00:00
NVPTXMCExpr.cpp
NVPTXMCExpr.h
NVPTXMachineFunctionInfo.h
NVPTXPeephole.cpp Finish moving TargetRegisterInfo::isVirtualRegister() and friends to llvm::Register as started by r367614. NFC 2019-08-01 23:27:28 +00:00
NVPTXPrologEpilogPass.cpp [LLVM][Alignment] Introduce Alignment In MachineFrameInfo 2019-08-21 14:29:30 +00:00
NVPTXProxyRegErasure.cpp
NVPTXRegisterInfo.cpp CodeGen: Introduce a class for registers 2019-06-24 15:50:29 +00:00
NVPTXRegisterInfo.h CodeGen: Introduce a class for registers 2019-06-24 15:50:29 +00:00
NVPTXRegisterInfo.td
NVPTXReplaceImageHandles.cpp
NVPTXSubtarget.cpp
NVPTXSubtarget.h
NVPTXTargetMachine.cpp [llvm] Migrate llvm::make_unique to std::make_unique 2019-08-15 15:54:37 +00:00
NVPTXTargetMachine.h
NVPTXTargetObjectFile.h
NVPTXTargetTransformInfo.cpp [ARM] Teach the Arm cost model that a Shift can be folded into other instructions 2019-12-09 10:24:33 +00:00
NVPTXTargetTransformInfo.h [ARM] Teach the Arm cost model that a Shift can be folded into other instructions 2019-12-09 10:24:33 +00:00
NVPTXUtilities.cpp Replace llvm::MutexGuard/UniqueLock with their standard equivalents 2019-08-07 10:57:25 +00:00
NVPTXUtilities.h
NVVMIntrRange.cpp Add missing includes needed to prune LLVMContext.h include, NFC 2019-11-14 15:23:15 -08:00
NVVMReflect.cpp
cl_common_defines.h