39 if (!CI || CI->getCalledValue() != &
F)
44 B.
CreateGEP(Int8Ty, CI->getArgOperand(0), CI->getArgOperand(1));
48 Value *ResultPtr = B.
CreateGEP(Int8Ty, CI->getArgOperand(0), OffsetI32);
51 CI->eraseFromParent();
61 if (
F.getName().startswith(
"llvm.load.relative."))
69 class PreISelIntrinsicLoweringLegacyPass :
public ModulePass {
73 PreISelIntrinsicLoweringLegacyPass() :
ModulePass(ID) {}
83 "pre-isel-intrinsic-lowering",
"Pre-ISel Intrinsic Lowering",
87 return new PreISelIntrinsicLoweringLegacyPass;
Compute iterated dominance frontiers using a linear time algorithm.
A Module instance is used to store all the information related to an LLVM module. ...
This class represents a function call, abstracting a target machine's calling convention.
PreservedAnalyses run(Module &M, ModuleAnalysisManager &AM)
PointerType * getPointerTo(unsigned AddrSpace=0) const
Return a pointer to the current type.
This provides a uniform API for creating instructions and inserting them into a basic block: either a...
Value * CreateBitCast(Value *V, Type *DestTy, const Twine &Name="")
void replaceAllUsesWith(Value *V)
Change all uses of this to point to a new Value.
static bool lowerLoadRelative(Function &F)
static PreservedAnalyses none()
Convenience factory function for the empty preserved set.
static GCRegistry::Add< OcamlGC > B("ocaml", "ocaml 3.10-compatible GC")
A set of analyses that are preserved following a run of a transformation pass.
The instances of the Type class are immutable: once they are created, they are never changed...
INITIALIZE_PASS(PreISelIntrinsicLoweringLegacyPass, "pre-isel-intrinsic-lowering", "Pre-ISel Intrinsic Lowering", false, false) ModulePass *llvm
static GCRegistry::Add< CoreCLRGC > E("coreclr", "CoreCLR-compatible GC")
LLVMContext & getContext() const
getContext - Return a reference to the LLVMContext associated with this function. ...
static PreservedAnalyses all()
Construct a special preserved set that preserves all passes.
Value * CreateGEP(Value *Ptr, ArrayRef< Value *> IdxList, const Twine &Name="")
Module.h This file contains the declarations for the Module class.
static IntegerType * getInt32Ty(LLVMContext &C)
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)
LoadInst * CreateAlignedLoad(Value *Ptr, unsigned Align, const char *Name)
Provided to resolve 'CreateAlignedLoad(Ptr, Align, "...")' correctly, instead of converting the strin...
LLVM Value Representation.
ModulePass * createPreISelIntrinsicLoweringPass()
This pass lowers the @llvm.load.relative intrinsic to instructions.
A container for analyses that lazily runs them and caches their results.
static bool lowerIntrinsics(Module &M)
static IntegerType * getInt8Ty(LLVMContext &C)