llvm-project/llvm/lib/Target/NVPTX
Andrew Savonichev 00aa0aeb06 [NVPTX] Add imm variants for surface and texture instructions
Texture/sampler/surface operands can be either a register or an
immediate (an index of .texref, .samplerref or .surfref).

TableGen declarations for these instructions used to only have
Int64Regs operands, so this caused issues when machine verifier
is turned on:

    *** Bad machine code: Expected a register operand. ***
    - function:    bar
    - basic block: %bb.0  (0x55b144d99ab8)
    - instruction: %4:int32regs = SULD_1D_I32_TRAP 0, killed %2:int32regs
    - operand 1:   0

The solution is to duplicate these instructions for all possible
operand types (i16imm and Int64Regs). Since this would
essentially double the amount code in TableGen, the patch also
does some refactoring for the original instructions to keep
things manageable.

Differential Revision: https://reviews.llvm.org/D112232
2021-11-10 19:05:03 +03:00
..
MCTargetDesc Move TargetRegistry.(h|cpp) from Support to MC 2021-10-08 14:51:48 -07:00
TargetInfo Fix shared library build after TargetRegistry move 2021-10-08 15:06:03 -07:00
CMakeLists.txt [NVPTX] Enable lowering of atomics on local memory 2021-04-26 20:12:12 -04:00
ManagedStringPool.h
NVPTX.h
NVPTX.td [CUDA] Bump supported CUDA version to 11.5 2021-11-09 08:20:53 +00:00
NVPTXAllocaHoisting.cpp
NVPTXAllocaHoisting.h
NVPTXAsmPrinter.cpp [llvm] Use MachineBasicBlock::{successors,predecessors} (NFC) 2021-11-09 23:05:15 -08:00
NVPTXAsmPrinter.h [NVPTX] Simplify and generalize constant printer. 2021-09-09 11:30:19 -07:00
NVPTXAssignValidGlobalNames.cpp
NVPTXAtomicLower.cpp [NVPTX] Enable lowering of atomics on local memory 2021-04-26 20:12:12 -04:00
NVPTXAtomicLower.h [NVPTX] Enable lowering of atomics on local memory 2021-04-26 20:12:12 -04:00
NVPTXFrameLowering.cpp [NVPTX] Add VRFrame and VRFrameLocal to integer register classes 2021-10-14 16:19:03 +03:00
NVPTXFrameLowering.h
NVPTXGenericToNVVM.cpp [IR] Change the default value of InstertElement to poison (1/4) 2021-09-28 22:29:16 +09:00
NVPTXISelDAGToDAG.cpp [NVPTX] Add imm variants for surface and texture instructions 2021-11-10 19:05:03 +03:00
NVPTXISelDAGToDAG.h
NVPTXISelLowering.cpp [NFC] Remove AttributeList::hasParamAttribute() 2021-08-13 10:58:21 -07:00
NVPTXISelLowering.h
NVPTXImageOptimizer.cpp
NVPTXInstrFormats.td
NVPTXInstrInfo.cpp [NVPTX] Copy machine operand flags in TII::insertBranch 2021-11-03 12:38:27 +03:00
NVPTXInstrInfo.h
NVPTXInstrInfo.td [NVPTX] Add MoveParam instruction for TargetExternalSymbol operand 2021-11-03 14:43:41 +03:00
NVPTXIntrinsics.td [NVPTX] Add imm variants for surface and texture instructions 2021-11-10 19:05:03 +03:00
NVPTXLowerAggrCopies.cpp
NVPTXLowerAggrCopies.h
NVPTXLowerAlloca.cpp [OpaquePtr] Use AllocaInst::getAllocatedType() 2021-07-13 09:34:33 -07:00
NVPTXLowerArgs.cpp [NVPTX] Pass explicit GEP type (NFC) 2021-07-08 21:21:43 +02:00
NVPTXMCExpr.cpp
NVPTXMCExpr.h
NVPTXMachineFunctionInfo.h
NVPTXPeephole.cpp [NVPTX] Add VRFrame and VRFrameLocal to integer register classes 2021-10-14 16:19:03 +03:00
NVPTXPrologEpilogPass.cpp [MachineInstr] Move MIParser's DBG_VALUE RegState::Debug invariant into MachineInstr::addOperand 2021-10-07 16:08:52 +01:00
NVPTXProxyRegErasure.cpp
NVPTXRegisterInfo.cpp [NVPTX] Mark special registers as reserved 2021-11-03 15:48:04 +03:00
NVPTXRegisterInfo.h [NVPTX] Add VRFrame and VRFrameLocal to integer register classes 2021-10-14 16:19:03 +03:00
NVPTXRegisterInfo.td [NVPTX] Add VRFrame and VRFrameLocal to integer register classes 2021-10-14 16:19:03 +03:00
NVPTXReplaceImageHandles.cpp [NVPTX] Add imm variants for surface and texture instructions 2021-11-10 19:05:03 +03:00
NVPTXSubtarget.cpp
NVPTXSubtarget.h
NVPTXTargetMachine.cpp [InferAddressSpaces] Support assumed addrspaces from addrspace predicates. 2021-11-08 16:51:57 -05:00
NVPTXTargetMachine.h [InferAddressSpaces] Support assumed addrspaces from addrspace predicates. 2021-11-08 16:51:57 -05:00
NVPTXTargetObjectFile.h
NVPTXTargetTransformInfo.cpp [llvm] Migrate from arg_operands to args (NFC) 2021-09-30 08:51:21 -07:00
NVPTXTargetTransformInfo.h [Target][CodeGen] Remove default CostKind arguments on inner/impl TTI overrides 2021-09-22 15:28:08 +01:00
NVPTXUtilities.cpp
NVPTXUtilities.h
NVVMIntrRange.cpp
NVVMReflect.cpp
cl_common_defines.h