23 #define DEBUG_TYPE "amdgpu-fix-function-bitcasts" 26 class AMDGPUFixFunctionBitcasts final
30 bool runOnModule(
Module &M)
override;
46 AMDGPUFixFunctionBitcasts() :
ModulePass(ID) {}
53 "Fix function bitcasts for AMDGPU",
false,
false)
56 return new AMDGPUFixFunctionBitcasts();
59 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.
ValTy * getCalledValue() const
Return the pointer to function that is being called.
amdgpu Simplify well known AMD library false Value * Callee
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 aliases.
ModulePass * createAMDGPUFixFunctionBitcastsPass()
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)
FunTy * getCalledFunction() const
Return the function being called if this is a direct call, otherwise return null (if it's an indirect...
INITIALIZE_PASS(AMDGPUFixFunctionBitcasts, DEBUG_TYPE, "Fix function bitcasts for AMDGPU", false, false) ModulePass *llvm
char & AMDGPUFixFunctionBitcastsID