Changeset View
Changeset View
Standalone View
Standalone View
llvm/lib/Target/NVPTX/NVPTXUtilities.h
Show First 20 Lines • Show All 52 Lines • ▼ Show 20 Lines | |||||
bool getReqNTIDz(const Function &, unsigned &); | bool getReqNTIDz(const Function &, unsigned &); | ||||
bool getMinCTASm(const Function &, unsigned &); | bool getMinCTASm(const Function &, unsigned &); | ||||
bool getMaxNReg(const Function &, unsigned &); | bool getMaxNReg(const Function &, unsigned &); | ||||
bool isKernelFunction(const Function &); | bool isKernelFunction(const Function &); | ||||
bool getAlign(const Function &, unsigned index, unsigned &); | bool getAlign(const Function &, unsigned index, unsigned &); | ||||
bool getAlign(const CallInst &, unsigned index, unsigned &); | bool getAlign(const CallInst &, unsigned index, unsigned &); | ||||
Function *getMaybeBitcastedCallee(const CallBase *CB); | |||||
// PTX ABI requires all scalar argument/return values to have | // PTX ABI requires all scalar argument/return values to have | ||||
// bit-size as a power of two of at least 32 bits. | // bit-size as a power of two of at least 32 bits. | ||||
inline unsigned promoteScalarArgumentSize(unsigned size) { | inline unsigned promoteScalarArgumentSize(unsigned size) { | ||||
if (size <= 32) | if (size <= 32) | ||||
return 32; | return 32; | ||||
else if (size <= 64) | else if (size <= 64) | ||||
return 64; | return 64; | ||||
else | else | ||||
return size; | return size; | ||||
} | } | ||||
} | } | ||||
#endif | #endif |