17 #include "llvm/IR/IntrinsicsNVPTX.h" 21 #define DEBUG_TYPE "NVPTXtti" 26 default:
return false;
27 case Intrinsic::nvvm_read_ptx_sreg_tid_x:
28 case Intrinsic::nvvm_read_ptx_sreg_tid_y:
29 case Intrinsic::nvvm_read_ptx_sreg_tid_z:
35 return II->
getIntrinsicID() == Intrinsic::nvvm_read_ptx_sreg_laneid;
41 default:
return false;
42 case Intrinsic::nvvm_atomic_load_inc_32:
43 case Intrinsic::nvvm_atomic_load_dec_32:
45 case Intrinsic::nvvm_atomic_add_gen_f_cta:
46 case Intrinsic::nvvm_atomic_add_gen_f_sys:
47 case Intrinsic::nvvm_atomic_add_gen_i_cta:
48 case Intrinsic::nvvm_atomic_add_gen_i_sys:
49 case Intrinsic::nvvm_atomic_and_gen_i_cta:
50 case Intrinsic::nvvm_atomic_and_gen_i_sys:
51 case Intrinsic::nvvm_atomic_cas_gen_i_cta:
52 case Intrinsic::nvvm_atomic_cas_gen_i_sys:
53 case Intrinsic::nvvm_atomic_dec_gen_i_cta:
54 case Intrinsic::nvvm_atomic_dec_gen_i_sys:
55 case Intrinsic::nvvm_atomic_inc_gen_i_cta:
56 case Intrinsic::nvvm_atomic_inc_gen_i_sys:
57 case Intrinsic::nvvm_atomic_max_gen_i_cta:
58 case Intrinsic::nvvm_atomic_max_gen_i_sys:
59 case Intrinsic::nvvm_atomic_min_gen_i_cta:
60 case Intrinsic::nvvm_atomic_min_gen_i_sys:
61 case Intrinsic::nvvm_atomic_or_gen_i_cta:
62 case Intrinsic::nvvm_atomic_or_gen_i_sys:
63 case Intrinsic::nvvm_atomic_exch_gen_i_cta:
64 case Intrinsic::nvvm_atomic_exch_gen_i_sys:
65 case Intrinsic::nvvm_atomic_xor_gen_i_cta:
66 case Intrinsic::nvvm_atomic_xor_gen_i_sys:
80 if (
const LoadInst *LI = dyn_cast<LoadInst>(
I)) {
81 unsigned AS = LI->getPointerAddressSpace();
107 if (isa<CallInst>(
I))
127 Opd1PropInfo, Opd2PropInfo);
140 Opd1PropInfo, Opd2PropInfo);
This class represents an incoming formal argument to a Function.
This class represents lattice values for constants.
Cost tables and simple lookup functions.
The main scalar evolution driver.
An instruction for reading from memory.
bool isKernelFunction(const Function &F)
Simple integer binary arithmetic operators.
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory)...
void getUnrollingPreferences(Loop *L, ScalarEvolution &SE, TTI::UnrollingPreferences &UP)
The instances of the Type class are immutable: once they are created, they are never changed...
bool isSourceOfDivergence(const Value *V)
amdgpu Simplify well known AMD library false FunctionCallee Value * Arg
This file provides a helper that implements much of the TTI interface in terms of the target-independ...
int getArithmeticInstrCost(unsigned Opcode, Type *Ty, TTI::OperandValueKind Opd1Info=TTI::OK_AnyValue, TTI::OperandValueKind Opd2Info=TTI::OK_AnyValue, TTI::OperandValueProperties Opd1PropInfo=TTI::OP_None, TTI::OperandValueProperties Opd2PropInfo=TTI::OP_None, ArrayRef< const Value *> Args=ArrayRef< const Value *>(), const Instruction *CxtI=nullptr)
Intrinsic::ID getIntrinsicID() const
Return the intrinsic ID of this intrinsic.
unsigned getArithmeticInstrCost(unsigned Opcode, Type *Ty, TTI::OperandValueKind Opd1Info=TTI::OK_AnyValue, TTI::OperandValueKind Opd2Info=TTI::OK_AnyValue, TTI::OperandValueProperties Opd1PropInfo=TTI::OP_None, TTI::OperandValueProperties Opd2PropInfo=TTI::OP_None, ArrayRef< const Value * > Args=ArrayRef< const Value * >(), const Instruction *CxtI=nullptr)
int InstructionOpcodeToISD(unsigned Opcode) const
Get the ISD node that corresponds to the Instruction class opcode.
Bitwise operators - logical and, logical or, logical xor.
Represents a single loop in the control flow graph.
void getUnrollingPreferences(Loop *L, ScalarEvolution &SE, TTI::UnrollingPreferences &UP)
LLVM Value Representation.
constexpr char Args[]
Key for Kernel::Metadata::mArgs.
std::pair< int, MVT > getTypeLegalizationCost(const DataLayout &DL, Type *Ty) const
Estimate the cost of type-legalization and the legalized type.
A wrapper class for inspecting calls to intrinsic functions.
This file describes how to lower LLVM code to machine code.