22 #define DEBUG_TYPE "amdgpu-fix-function-bitcasts" 25 class AMDGPUFixFunctionBitcasts final
29 bool runOnModule(
Module &M)
override;
45 AMDGPUFixFunctionBitcasts() :
ModulePass(ID) {}
52 "Fix function bitcasts for AMDGPU",
false,
false)
55 return new AMDGPUFixFunctionBitcasts();
58 bool AMDGPUFixFunctionBitcasts::runOnModule(
Module &M) {
Base class for instruction visitors.
This class represents lattice values for constants.
A Module instance is used to store all the information related to an LLVM module. ...
bool isLegalToPromote(CallSite CS, Function *Callee, const char **FailureReason=nullptr)
Return true if the given indirect call site can be made to call Callee.
FunTy * getCalledFunction() const
Return the function being called if this is a direct call, otherwise return null (if it's an indirect...
ValTy * getCalledValue() const
Return the pointer to function that is being called.
Instruction * promoteCall(CallSite CS, Function *Callee, CastInst **RetBitCast=nullptr)
Promote the given indirect call site to unconditionally call Callee.
const Value * stripPointerCasts() const
Strip off pointer casts, all-zero GEPs and address space casts.
ModulePass * createAMDGPUFixFunctionBitcastsPass()
amdgpu Simplify well known AMD library false FunctionCallee Callee
ModulePass class - This class is used to implement unstructured interprocedural optimizations and ana...
LLVM_NODISCARD std::enable_if<!is_simple_type< Y >::value, typename cast_retty< X, const Y >::ret_type >::type dyn_cast(const Y &Val)
INITIALIZE_PASS(AMDGPUFixFunctionBitcasts, DEBUG_TYPE, "Fix function bitcasts for AMDGPU", false, false) ModulePass *llvm
char & AMDGPUFixFunctionBitcastsID