[llvm] [IRBuilder] Refactor for intrinsics const-folding (NFC) (PR #202738)
via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 9 11:58:40 PDT 2026
llvmorg-github-actions[bot] wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-backend-hexagon
Author: Ramkumar Ramachandra (artagnon)
<details>
<summary>Changes</summary>
In preparation to const-fold intrinsic calls, refactor the IRBuilder API, generalizing it to return possibly constant-folded values.
---
Patch is 211.85 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/202738.diff
61 Files Affected:
- (modified) llvm/include/llvm/IR/IRBuilder.h (+147-152)
- (modified) llvm/lib/CodeGen/InlineAsmPrepare.cpp (+2-2)
- (modified) llvm/lib/CodeGen/SafeStack.cpp (+3-2)
- (modified) llvm/lib/IR/AutoUpgrade.cpp (+9-6)
- (modified) llvm/lib/IR/IRBuilder.cpp (+243-210)
- (modified) llvm/lib/Target/AArch64/AArch64ISelLowering.cpp (+5-4)
- (modified) llvm/lib/Target/AArch64/AArch64StackTagging.cpp (+4-4)
- (modified) llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp (+8-6)
- (modified) llvm/lib/Target/AArch64/SVEIntrinsicOpts.cpp (+2-2)
- (modified) llvm/lib/Target/AMDGPU/AMDGPUAsanInstrumentation.cpp (+2-1)
- (modified) llvm/lib/Target/AMDGPU/AMDGPUAtomicOptimizer.cpp (+2-2)
- (modified) llvm/lib/Target/AMDGPU/AMDGPUCodeGenPrepare.cpp (+2-1)
- (modified) llvm/lib/Target/AMDGPU/AMDGPUImageIntrinsicOptimizer.cpp (+2-1)
- (modified) llvm/lib/Target/AMDGPU/AMDGPUInstCombineIntrinsic.cpp (+20-16)
- (modified) llvm/lib/Target/AMDGPU/AMDGPULowerBufferFatPointers.cpp (+5-3)
- (modified) llvm/lib/Target/AMDGPU/AMDGPULowerIntrinsics.cpp (+31-21)
- (modified) llvm/lib/Target/AMDGPU/AMDGPULowerKernelArguments.cpp (+2-2)
- (modified) llvm/lib/Target/AMDGPU/AMDGPUPromoteAlloca.cpp (+12-10)
- (modified) llvm/lib/Target/AMDGPU/SIISelLowering.cpp (+4-4)
- (modified) llvm/lib/Target/ARM/ARMISelLowering.cpp (+10-7)
- (modified) llvm/lib/Target/ARM/MVEGatherScatterLowering.cpp (+46-46)
- (modified) llvm/lib/Target/BPF/BPFCheckAndAdjustIR.cpp (+6-9)
- (modified) llvm/lib/Target/Hexagon/HexagonLoopIdiomRecognition.cpp (+3-2)
- (modified) llvm/lib/Target/Hexagon/HexagonVectorCombine.cpp (+7-6)
- (modified) llvm/lib/Target/NVPTX/NVPTXLowerArgs.cpp (+7-6)
- (modified) llvm/lib/Target/PowerPC/PPCISelLowering.cpp (+6-6)
- (modified) llvm/lib/Target/RISCV/RISCVInterleavedAccess.cpp (+1-1)
- (modified) llvm/lib/Target/SPIRV/SPIRVEmitIntrinsics.cpp (+75-72)
- (modified) llvm/lib/Target/SPIRV/SPIRVGlobalRegistry.cpp (+1-1)
- (modified) llvm/lib/Target/SPIRV/SPIRVLegalizePointerCast.cpp (+2-4)
- (modified) llvm/lib/Target/SPIRV/SPIRVPrepareFunctions.cpp (+5-5)
- (modified) llvm/lib/Target/SPIRV/SPIRVUtils.cpp (+1-1)
- (modified) llvm/lib/Target/SystemZ/SystemZTDC.cpp (+1-1)
- (modified) llvm/lib/Target/X86/X86InstCombineIntrinsic.cpp (+1-1)
- (modified) llvm/lib/Target/X86/X86LowerAMXType.cpp (+7-6)
- (modified) llvm/lib/Transforms/IPO/FatLTOCleanup.cpp (+1-1)
- (modified) llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp (+1-1)
- (modified) llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp (+2-3)
- (modified) llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp (+2-2)
- (modified) llvm/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp (+5-4)
- (modified) llvm/lib/Transforms/InstCombine/InstCombineMulDivRem.cpp (+5-5)
- (modified) llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp (+3-2)
- (modified) llvm/lib/Transforms/InstCombine/InstructionCombining.cpp (+2-1)
- (modified) llvm/lib/Transforms/Instrumentation/BoundsChecking.cpp (+3-3)
- (modified) llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp (+16-17)
- (modified) llvm/lib/Transforms/Scalar/LoopIdiomRecognize.cpp (+27-25)
- (modified) llvm/lib/Transforms/Scalar/MemCpyOptimizer.cpp (+26-22)
- (modified) llvm/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp (+4-3)
- (modified) llvm/lib/Transforms/Scalar/SROA.cpp (+16-14)
- (modified) llvm/lib/Transforms/Utils/InlineFunction.cpp (+9-7)
- (modified) llvm/lib/Transforms/Utils/ScalarEvolutionExpander.cpp (+3-3)
- (modified) llvm/lib/Transforms/Utils/SimplifyCFG.cpp (+7-5)
- (modified) llvm/lib/Transforms/Utils/SimplifyLibCalls.cpp (+27-23)
- (modified) llvm/lib/Transforms/Vectorize/LoadStoreVectorizer.cpp (+4-4)
- (modified) llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp (+14-12)
- (modified) llvm/lib/Transforms/Vectorize/VPlanRecipes.cpp (+49-37)
- (modified) llvm/lib/Transforms/Vectorize/VectorCombine.cpp (+8-6)
- (modified) llvm/unittests/Analysis/MemorySSATest.cpp (+5-3)
- (modified) llvm/unittests/IR/IRBuilderTest.cpp (+24-20)
- (modified) llvm/unittests/IR/IntrinsicsTest.cpp (+5-5)
- (modified) llvm/unittests/Transforms/Utils/LocalTest.cpp (+2-2)
``````````diff
diff --git a/llvm/include/llvm/IR/IRBuilder.h b/llvm/include/llvm/IR/IRBuilder.h
index 99e4b748425c0..09bff9e9b4d00 100644
--- a/llvm/include/llvm/IR/IRBuilder.h
+++ b/llvm/include/llvm/IR/IRBuilder.h
@@ -657,27 +657,27 @@ class IRBuilderBase {
///
/// If the pointer isn't an i8*, it will be converted. If alias metadata is
/// specified, it will be added to the instruction.
- CallInst *CreateMemSet(Value *Ptr, Value *Val, uint64_t Size,
- MaybeAlign Align, bool isVolatile = false,
- const AAMDNodes &AAInfo = AAMDNodes()) {
+ Value *CreateMemSet(Value *Ptr, Value *Val, uint64_t Size, MaybeAlign Align,
+ bool isVolatile = false,
+ const AAMDNodes &AAInfo = AAMDNodes()) {
return CreateMemSet(Ptr, Val, getInt64(Size), Align, isVolatile, AAInfo);
}
- LLVM_ABI CallInst *CreateMemSet(Value *Ptr, Value *Val, Value *Size,
- MaybeAlign Align, bool isVolatile = false,
- const AAMDNodes &AAInfo = AAMDNodes());
+ LLVM_ABI Value *CreateMemSet(Value *Ptr, Value *Val, Value *Size,
+ MaybeAlign Align, bool isVolatile = false,
+ const AAMDNodes &AAInfo = AAMDNodes());
- LLVM_ABI CallInst *CreateMemSetInline(Value *Dst, MaybeAlign DstAlign,
- Value *Val, Value *Size,
- bool IsVolatile = false,
- const AAMDNodes &AAInfo = AAMDNodes());
+ LLVM_ABI Value *CreateMemSetInline(Value *Dst, MaybeAlign DstAlign,
+ Value *Val, Value *Size,
+ bool IsVolatile = false,
+ const AAMDNodes &AAInfo = AAMDNodes());
/// Create and insert an element unordered-atomic memset of the region of
/// memory starting at the given pointer to the given value.
///
/// If the pointer isn't an i8*, it will be converted. If alias metadata is
/// specified, it will be added to the instruction.
- CallInst *
+ Value *
CreateElementUnorderedAtomicMemSet(Value *Ptr, Value *Val, uint64_t Size,
Align Alignment, uint32_t ElementSize,
const AAMDNodes &AAInfo = AAMDNodes()) {
@@ -704,7 +704,7 @@ class IRBuilderBase {
LLVM_ABI CallInst *CreateFree(Value *Source,
ArrayRef<OperandBundleDef> Bundles = {});
- LLVM_ABI CallInst *
+ LLVM_ABI Value *
CreateElementUnorderedAtomicMemSet(Value *Ptr, Value *Val, Value *Size,
Align Alignment, uint32_t ElementSize,
const AAMDNodes &AAInfo = AAMDNodes());
@@ -714,32 +714,31 @@ class IRBuilderBase {
/// If the pointers aren't i8*, they will be converted. If alias metadata is
/// specified, it will be added to the instruction.
/// and noalias tags.
- CallInst *CreateMemCpy(Value *Dst, MaybeAlign DstAlign, Value *Src,
- MaybeAlign SrcAlign, uint64_t Size,
- bool isVolatile = false,
- const AAMDNodes &AAInfo = AAMDNodes()) {
+ Value *CreateMemCpy(Value *Dst, MaybeAlign DstAlign, Value *Src,
+ MaybeAlign SrcAlign, uint64_t Size,
+ bool isVolatile = false,
+ const AAMDNodes &AAInfo = AAMDNodes()) {
return CreateMemCpy(Dst, DstAlign, Src, SrcAlign, getInt64(Size),
isVolatile, AAInfo);
}
- LLVM_ABI CallInst *
- CreateMemTransferInst(Intrinsic::ID IntrID, Value *Dst, MaybeAlign DstAlign,
- Value *Src, MaybeAlign SrcAlign, Value *Size,
- bool isVolatile = false,
- const AAMDNodes &AAInfo = AAMDNodes());
+ LLVM_ABI Value *CreateMemTransferInst(Intrinsic::ID IntrID, Value *Dst,
+ MaybeAlign DstAlign, Value *Src,
+ MaybeAlign SrcAlign, Value *Size,
+ bool isVolatile = false,
+ const AAMDNodes &AAInfo = AAMDNodes());
- CallInst *CreateMemCpy(Value *Dst, MaybeAlign DstAlign, Value *Src,
- MaybeAlign SrcAlign, Value *Size,
- bool isVolatile = false,
- const AAMDNodes &AAInfo = AAMDNodes()) {
+ Value *CreateMemCpy(Value *Dst, MaybeAlign DstAlign, Value *Src,
+ MaybeAlign SrcAlign, Value *Size, bool isVolatile = false,
+ const AAMDNodes &AAInfo = AAMDNodes()) {
return CreateMemTransferInst(Intrinsic::memcpy, Dst, DstAlign, Src,
SrcAlign, Size, isVolatile, AAInfo);
}
- CallInst *CreateMemCpyInline(Value *Dst, MaybeAlign DstAlign, Value *Src,
- MaybeAlign SrcAlign, Value *Size,
- bool isVolatile = false,
- const AAMDNodes &AAInfo = AAMDNodes()) {
+ Value *CreateMemCpyInline(Value *Dst, MaybeAlign DstAlign, Value *Src,
+ MaybeAlign SrcAlign, Value *Size,
+ bool isVolatile = false,
+ const AAMDNodes &AAInfo = AAMDNodes()) {
return CreateMemTransferInst(Intrinsic::memcpy_inline, Dst, DstAlign, Src,
SrcAlign, Size, isVolatile, AAInfo);
}
@@ -752,22 +751,22 @@ class IRBuilderBase {
///
/// If the pointers aren't i8*, they will be converted. If alias metadata is
/// specified, it will be added to the instruction.
- LLVM_ABI CallInst *CreateElementUnorderedAtomicMemCpy(
+ LLVM_ABI Value *CreateElementUnorderedAtomicMemCpy(
Value *Dst, Align DstAlign, Value *Src, Align SrcAlign, Value *Size,
uint32_t ElementSize, const AAMDNodes &AAInfo = AAMDNodes());
- CallInst *CreateMemMove(Value *Dst, MaybeAlign DstAlign, Value *Src,
- MaybeAlign SrcAlign, uint64_t Size,
- bool isVolatile = false,
- const AAMDNodes &AAInfo = AAMDNodes()) {
+ Value *CreateMemMove(Value *Dst, MaybeAlign DstAlign, Value *Src,
+ MaybeAlign SrcAlign, uint64_t Size,
+ bool isVolatile = false,
+ const AAMDNodes &AAInfo = AAMDNodes()) {
return CreateMemMove(Dst, DstAlign, Src, SrcAlign, getInt64(Size),
isVolatile, AAInfo);
}
- CallInst *CreateMemMove(Value *Dst, MaybeAlign DstAlign, Value *Src,
- MaybeAlign SrcAlign, Value *Size,
- bool isVolatile = false,
- const AAMDNodes &AAInfo = AAMDNodes()) {
+ Value *CreateMemMove(Value *Dst, MaybeAlign DstAlign, Value *Src,
+ MaybeAlign SrcAlign, Value *Size,
+ bool isVolatile = false,
+ const AAMDNodes &AAInfo = AAMDNodes()) {
return CreateMemTransferInst(Intrinsic::memmove, Dst, DstAlign, Src,
SrcAlign, Size, isVolatile, AAInfo);
}
@@ -780,113 +779,110 @@ class IRBuilderBase {
///
/// If the pointers aren't i8*, they will be converted. If alias metadata is
/// specified, it will be added to the instruction.
- LLVM_ABI CallInst *CreateElementUnorderedAtomicMemMove(
+ LLVM_ABI Value *CreateElementUnorderedAtomicMemMove(
Value *Dst, Align DstAlign, Value *Src, Align SrcAlign, Value *Size,
uint32_t ElementSize, const AAMDNodes &AAInfo = AAMDNodes());
private:
- CallInst *getReductionIntrinsic(Intrinsic::ID ID, Value *Src);
+ Value *getReductionIntrinsic(Intrinsic::ID ID, Value *Src);
public:
/// Create a sequential vector fadd reduction intrinsic of the source vector.
/// The first parameter is a scalar accumulator value. An unordered reduction
/// can be created by adding the reassoc fast-math flag to the resulting
/// sequential reduction.
- LLVM_ABI CallInst *CreateFAddReduce(Value *Acc, Value *Src);
+ LLVM_ABI Value *CreateFAddReduce(Value *Acc, Value *Src);
/// Create a sequential vector fmul reduction intrinsic of the source vector.
/// The first parameter is a scalar accumulator value. An unordered reduction
/// can be created by adding the reassoc fast-math flag to the resulting
/// sequential reduction.
- LLVM_ABI CallInst *CreateFMulReduce(Value *Acc, Value *Src);
+ LLVM_ABI Value *CreateFMulReduce(Value *Acc, Value *Src);
/// Create a vector int add reduction intrinsic of the source vector.
- LLVM_ABI CallInst *CreateAddReduce(Value *Src);
+ LLVM_ABI Value *CreateAddReduce(Value *Src);
/// Create a vector int mul reduction intrinsic of the source vector.
- LLVM_ABI CallInst *CreateMulReduce(Value *Src);
+ LLVM_ABI Value *CreateMulReduce(Value *Src);
/// Create a vector int AND reduction intrinsic of the source vector.
- LLVM_ABI CallInst *CreateAndReduce(Value *Src);
+ LLVM_ABI Value *CreateAndReduce(Value *Src);
/// Create a vector int OR reduction intrinsic of the source vector.
- LLVM_ABI CallInst *CreateOrReduce(Value *Src);
+ LLVM_ABI Value *CreateOrReduce(Value *Src);
/// Create a vector int XOR reduction intrinsic of the source vector.
- LLVM_ABI CallInst *CreateXorReduce(Value *Src);
+ LLVM_ABI Value *CreateXorReduce(Value *Src);
/// Create a vector integer max reduction intrinsic of the source
/// vector.
- LLVM_ABI CallInst *CreateIntMaxReduce(Value *Src, bool IsSigned = false);
+ LLVM_ABI Value *CreateIntMaxReduce(Value *Src, bool IsSigned = false);
/// Create a vector integer min reduction intrinsic of the source
/// vector.
- LLVM_ABI CallInst *CreateIntMinReduce(Value *Src, bool IsSigned = false);
+ LLVM_ABI Value *CreateIntMinReduce(Value *Src, bool IsSigned = false);
/// Create a vector float max reduction intrinsic of the source
/// vector.
- LLVM_ABI CallInst *CreateFPMaxReduce(Value *Src);
+ LLVM_ABI Value *CreateFPMaxReduce(Value *Src);
/// Create a vector float min reduction intrinsic of the source
/// vector.
- LLVM_ABI CallInst *CreateFPMinReduce(Value *Src);
+ LLVM_ABI Value *CreateFPMinReduce(Value *Src);
/// Create a vector float maximum reduction intrinsic of the source
/// vector. This variant follows the NaN and signed zero semantic of
/// llvm.maximum intrinsic.
- LLVM_ABI CallInst *CreateFPMaximumReduce(Value *Src);
+ LLVM_ABI Value *CreateFPMaximumReduce(Value *Src);
/// Create a vector float minimum reduction intrinsic of the source
/// vector. This variant follows the NaN and signed zero semantic of
/// llvm.minimum intrinsic.
- LLVM_ABI CallInst *CreateFPMinimumReduce(Value *Src);
+ LLVM_ABI Value *CreateFPMinimumReduce(Value *Src);
/// Create a lifetime.start intrinsic.
- LLVM_ABI CallInst *CreateLifetimeStart(Value *Ptr);
+ LLVM_ABI Value *CreateLifetimeStart(Value *Ptr);
/// Create a lifetime.end intrinsic.
- LLVM_ABI CallInst *CreateLifetimeEnd(Value *Ptr);
+ LLVM_ABI Value *CreateLifetimeEnd(Value *Ptr);
/// Create a call to invariant.start intrinsic.
///
/// If the pointer isn't i8* it will be converted.
- LLVM_ABI CallInst *CreateInvariantStart(Value *Ptr,
- ConstantInt *Size = nullptr);
+ LLVM_ABI Value *CreateInvariantStart(Value *Ptr, ConstantInt *Size = nullptr);
/// Create a call to llvm.threadlocal.address intrinsic.
- LLVM_ABI CallInst *CreateThreadLocalAddress(Value *Ptr);
+ LLVM_ABI Value *CreateThreadLocalAddress(Value *Ptr);
/// Create a call to Masked Load intrinsic
- LLVM_ABI CallInst *CreateMaskedLoad(Type *Ty, Value *Ptr, Align Alignment,
- Value *Mask, Value *PassThru = nullptr,
- const Twine &Name = "");
+ LLVM_ABI Value *CreateMaskedLoad(Type *Ty, Value *Ptr, Align Alignment,
+ Value *Mask, Value *PassThru = nullptr,
+ const Twine &Name = "");
/// Create a call to Masked Store intrinsic
- LLVM_ABI CallInst *CreateMaskedStore(Value *Val, Value *Ptr, Align Alignment,
- Value *Mask);
+ LLVM_ABI Value *CreateMaskedStore(Value *Val, Value *Ptr, Align Alignment,
+ Value *Mask);
/// Create a call to Masked Gather intrinsic
- LLVM_ABI CallInst *CreateMaskedGather(Type *Ty, Value *Ptrs, Align Alignment,
- Value *Mask = nullptr,
- Value *PassThru = nullptr,
- const Twine &Name = "");
+ LLVM_ABI Value *CreateMaskedGather(Type *Ty, Value *Ptrs, Align Alignment,
+ Value *Mask = nullptr,
+ Value *PassThru = nullptr,
+ const Twine &Name = "");
/// Create a call to Masked Scatter intrinsic
- LLVM_ABI CallInst *CreateMaskedScatter(Value *Val, Value *Ptrs,
- Align Alignment,
- Value *Mask = nullptr);
+ LLVM_ABI Value *CreateMaskedScatter(Value *Val, Value *Ptrs, Align Alignment,
+ Value *Mask = nullptr);
/// Create a call to Masked Expand Load intrinsic
- LLVM_ABI CallInst *CreateMaskedExpandLoad(Type *Ty, Value *Ptr,
- MaybeAlign Align,
- Value *Mask = nullptr,
- Value *PassThru = nullptr,
- const Twine &Name = "");
+ LLVM_ABI Value *CreateMaskedExpandLoad(Type *Ty, Value *Ptr, MaybeAlign Align,
+ Value *Mask = nullptr,
+ Value *PassThru = nullptr,
+ const Twine &Name = "");
/// Create a call to Masked Compress Store intrinsic
- LLVM_ABI CallInst *CreateMaskedCompressStore(Value *Val, Value *Ptr,
- MaybeAlign Align,
- Value *Mask = nullptr);
+ LLVM_ABI Value *CreateMaskedCompressStore(Value *Val, Value *Ptr,
+ MaybeAlign Align,
+ Value *Mask = nullptr);
/// Return an all true boolean vector (mask) with \p NumElts lanes.
Value *getAllOnesMask(ElementCount NumElts) {
@@ -896,29 +892,29 @@ class IRBuilderBase {
/// Create an assume intrinsic call that allows the optimizer to
/// assume that the provided condition will be true.
- LLVM_ABI CallInst *CreateAssumption(Value *Cond);
+ LLVM_ABI Value *CreateAssumption(Value *Cond);
/// Create an assume intrinsic call that allows the optimizer to
/// assume that the provided operand bundles hold.
- LLVM_ABI CallInst *CreateAssumption(ArrayRef<OperandBundleDef> OpBundles);
+ LLVM_ABI Value *CreateAssumption(ArrayRef<OperandBundleDef> OpBundles);
/// Create a llvm.experimental.noalias.scope.decl intrinsic call.
- LLVM_ABI Instruction *CreateNoAliasScopeDeclaration(Value *Scope);
- Instruction *CreateNoAliasScopeDeclaration(MDNode *ScopeTag) {
+ LLVM_ABI Value *CreateNoAliasScopeDeclaration(Value *Scope);
+ Value *CreateNoAliasScopeDeclaration(MDNode *ScopeTag) {
return CreateNoAliasScopeDeclaration(
MetadataAsValue::get(Context, ScopeTag));
}
/// Create a call to the experimental.gc.statepoint intrinsic to
/// start a new statepoint sequence.
- LLVM_ABI CallInst *CreateGCStatepointCall(
+ LLVM_ABI Value *CreateGCStatepointCall(
uint64_t ID, uint32_t NumPatchBytes, FunctionCallee ActualCallee,
ArrayRef<Value *> CallArgs, std::optional<ArrayRef<Value *>> DeoptArgs,
ArrayRef<Value *> GCArgs, const Twine &Name = "");
/// Create a call to the experimental.gc.statepoint intrinsic to
/// start a new statepoint sequence.
- LLVM_ABI CallInst *
+ LLVM_ABI Value *
CreateGCStatepointCall(uint64_t ID, uint32_t NumPatchBytes,
FunctionCallee ActualCallee, uint32_t Flags,
ArrayRef<Value *> CallArgs,
@@ -929,7 +925,7 @@ class IRBuilderBase {
/// Conveninence function for the common case when CallArgs are filled
/// in using ArrayRef(CS.arg_begin(), CS.arg_end()); Use needs to be
/// .get()'ed to get the Value pointer.
- LLVM_ABI CallInst *
+ LLVM_ABI Value *
CreateGCStatepointCall(uint64_t ID, uint32_t NumPatchBytes,
FunctionCallee ActualCallee, ArrayRef<Use> CallArgs,
std::optional<ArrayRef<Value *>> DeoptArgs,
@@ -965,24 +961,24 @@ class IRBuilderBase {
/// Create a call to the experimental.gc.result intrinsic to extract
/// the result from a call wrapped in a statepoint.
- LLVM_ABI CallInst *CreateGCResult(Instruction *Statepoint, Type *ResultType,
- const Twine &Name = "");
+ LLVM_ABI Value *CreateGCResult(Instruction *Statepoint, Type *ResultType,
+ const Twine &Name = "");
/// Create a call to the experimental.gc.relocate intrinsics to
/// project the relocated value of one pointer from the statepoint.
- LLVM_ABI CallInst *CreateGCRelocate(Instruction *Statepoint, int BaseOffset,
- int DerivedOffset, Type *ResultType,
- const Twine &Name = "");
+ LLVM_ABI Value *CreateGCRelocate(Instruction *Statepoint, int BaseOffset,
+ int DerivedOffset, Type *ResultType,
+ const Twine &Name = "");
/// Create a call to the experimental.gc.pointer.base intrinsic to get the
/// base pointer for the specified derived pointer.
- LLVM_ABI CallInst *CreateGCGetPointerBase(Value *DerivedPtr,
- const Twine &Name = "");
+ LLVM_ABI Value *CreateGCGetPointerBase(Value *DerivedPtr,
+ const Twine &Name = "");
/// Create a call to the experimental.gc.get.pointer.offset intrinsic to get
/// the offset of the specified derived pointer from its base.
- LLVM_ABI CallInst *CreateGCGetPointerOffset(Value *DerivedPtr,
- const Twine &Name = "");
+ LLVM_ABI Value *CreateGCGetPointerOffset(Value *DerivedPtr,
+ const Twine &Name = "");
/// Create a call to llvm.vscale.<Ty>().
Value *CreateVScale(Type *Ty, const Twine &Name = "") {
@@ -1021,26 +1017,26 @@ class IRBuilderBase {
/// Create a call to intrinsic \p ID with \p Args, mangled using
/// \p OverloadTypes. If \p FMFSource is provided, copy fast-math-flags from
/// that instruction to the intrinsic.
- LLVM_ABI CallInst *CreateIntrinsic(Intrinsic::ID ID,
- ArrayRef<Type *> OverloadTypes,
- ArrayRef<Value *> Args,
- FMFSource FMFSource = {},
- const Twine &Name = "",
- ArrayRef<OperandBundleDef> OpBundles = {});
+ LLVM_ABI Value *CreateIntrinsic(Intrinsic::ID ID,
+ ArrayRef<Type *> OverloadTypes,
+ ArrayRef<Value *> Args,
+ FMFSource FMFSource = {},
+ const Twine &Name = "",
+ ArrayRef<OperandBundleDef> OpBundles = {});
/// Create a call to intrinsic \p ID with \p RetTy and \p Args. If
/// \p FMFSource is provided, copy fast-math-flags from that instruction to
/// the intrinsic.
- LLVM_ABI CallInst *CreateIntrinsic(Type *RetTy, Intrinsic::ID ID,
- ArrayRef<Value *> Args,
- FMFSource FMFSource = {},
- const Twine &Name = "");
+ LLVM_...
[truncated]
``````````
</details>
https://github.com/llvm/llvm-project/pull/202738
More information about the llvm-commits
mailing list