LLVM 20.0.0git
Functions
Constant Expressions

Functions in this group correspond to APIs on llvm::ConstantExpr. More...

Collaboration diagram for Constant Expressions:

Functions

LLVMOpcode LLVMGetConstOpcode (LLVMValueRef ConstantVal)
 
LLVMValueRef LLVMAlignOf (LLVMTypeRef Ty)
 
LLVMValueRef LLVMSizeOf (LLVMTypeRef Ty)
 
LLVMValueRef LLVMConstNeg (LLVMValueRef ConstantVal)
 
LLVMValueRef LLVMConstNSWNeg (LLVMValueRef ConstantVal)
 
 LLVM_ATTRIBUTE_C_DEPRECATED (LLVMValueRef LLVMConstNUWNeg(LLVMValueRef ConstantVal), "Use LLVMConstNull instead.")
 
LLVMValueRef LLVMConstNot (LLVMValueRef ConstantVal)
 
LLVMValueRef LLVMConstAdd (LLVMValueRef LHSConstant, LLVMValueRef RHSConstant)
 
LLVMValueRef LLVMConstNSWAdd (LLVMValueRef LHSConstant, LLVMValueRef RHSConstant)
 
LLVMValueRef LLVMConstNUWAdd (LLVMValueRef LHSConstant, LLVMValueRef RHSConstant)
 
LLVMValueRef LLVMConstSub (LLVMValueRef LHSConstant, LLVMValueRef RHSConstant)
 
LLVMValueRef LLVMConstNSWSub (LLVMValueRef LHSConstant, LLVMValueRef RHSConstant)
 
LLVMValueRef LLVMConstNUWSub (LLVMValueRef LHSConstant, LLVMValueRef RHSConstant)
 
LLVMValueRef LLVMConstMul (LLVMValueRef LHSConstant, LLVMValueRef RHSConstant)
 
LLVMValueRef LLVMConstNSWMul (LLVMValueRef LHSConstant, LLVMValueRef RHSConstant)
 
LLVMValueRef LLVMConstNUWMul (LLVMValueRef LHSConstant, LLVMValueRef RHSConstant)
 
LLVMValueRef LLVMConstXor (LLVMValueRef LHSConstant, LLVMValueRef RHSConstant)
 
LLVMValueRef LLVMConstGEP2 (LLVMTypeRef Ty, LLVMValueRef ConstantVal, LLVMValueRef *ConstantIndices, unsigned NumIndices)
 
LLVMValueRef LLVMConstInBoundsGEP2 (LLVMTypeRef Ty, LLVMValueRef ConstantVal, LLVMValueRef *ConstantIndices, unsigned NumIndices)
 
LLVMValueRef LLVMConstGEPWithNoWrapFlags (LLVMTypeRef Ty, LLVMValueRef ConstantVal, LLVMValueRef *ConstantIndices, unsigned NumIndices, LLVMGEPNoWrapFlags NoWrapFlags)
 Creates a constant GetElementPtr expression.
 
LLVMValueRef LLVMConstTrunc (LLVMValueRef ConstantVal, LLVMTypeRef ToType)
 
LLVMValueRef LLVMConstPtrToInt (LLVMValueRef ConstantVal, LLVMTypeRef ToType)
 
LLVMValueRef LLVMConstIntToPtr (LLVMValueRef ConstantVal, LLVMTypeRef ToType)
 
LLVMValueRef LLVMConstBitCast (LLVMValueRef ConstantVal, LLVMTypeRef ToType)
 
LLVMValueRef LLVMConstAddrSpaceCast (LLVMValueRef ConstantVal, LLVMTypeRef ToType)
 
LLVMValueRef LLVMConstTruncOrBitCast (LLVMValueRef ConstantVal, LLVMTypeRef ToType)
 
LLVMValueRef LLVMConstPointerCast (LLVMValueRef ConstantVal, LLVMTypeRef ToType)
 
LLVMValueRef LLVMConstExtractElement (LLVMValueRef VectorConstant, LLVMValueRef IndexConstant)
 
LLVMValueRef LLVMConstInsertElement (LLVMValueRef VectorConstant, LLVMValueRef ElementValueConstant, LLVMValueRef IndexConstant)
 
LLVMValueRef LLVMConstShuffleVector (LLVMValueRef VectorAConstant, LLVMValueRef VectorBConstant, LLVMValueRef MaskConstant)
 
LLVMValueRef LLVMBlockAddress (LLVMValueRef F, LLVMBasicBlockRef BB)
 
LLVMValueRef LLVMGetBlockAddressFunction (LLVMValueRef BlockAddr)
 Gets the function associated with a given BlockAddress constant value.
 
LLVMBasicBlockRef LLVMGetBlockAddressBasicBlock (LLVMValueRef BlockAddr)
 Gets the basic block associated with a given BlockAddress constant value.
 
LLVMValueRef LLVMConstInlineAsm (LLVMTypeRef Ty, const char *AsmString, const char *Constraints, LLVMBool HasSideEffects, LLVMBool IsAlignStack)
 Deprecated: Use LLVMGetInlineAsm instead.
 

Detailed Description

Functions in this group correspond to APIs on llvm::ConstantExpr.

See also
llvm::ConstantExpr.

Function Documentation

◆ LLVM_ATTRIBUTE_C_DEPRECATED()

LLVM_ATTRIBUTE_C_DEPRECATED ( LLVMValueRef   LLVMConstNUWNegLLVMValueRef ConstantVal,
"Use LLVMConstNull instead."   
)

◆ LLVMAlignOf()

LLVMValueRef LLVMAlignOf ( LLVMTypeRef  Ty)

Definition at line 1744 of file Core.cpp.

References llvm::ConstantExpr::getAlignOf(), unwrap(), and llvm::wrap().

◆ LLVMBlockAddress()

LLVMValueRef LLVMBlockAddress ( LLVMValueRef  F,
LLVMBasicBlockRef  BB 
)

Definition at line 1924 of file Core.cpp.

References F, llvm::BlockAddress::get(), unwrap(), and llvm::wrap().

◆ LLVMConstAdd()

LLVMValueRef LLVMConstAdd ( LLVMValueRef  LHSConstant,
LLVMValueRef  RHSConstant 
)

Definition at line 1769 of file Core.cpp.

References llvm::ConstantExpr::getAdd(), and llvm::wrap().

◆ LLVMConstAddrSpaceCast()

LLVMValueRef LLVMConstAddrSpaceCast ( LLVMValueRef  ConstantVal,
LLVMTypeRef  ToType 
)

Definition at line 1874 of file Core.cpp.

References llvm::ConstantExpr::getAddrSpaceCast(), unwrap(), and llvm::wrap().

◆ LLVMConstBitCast()

LLVMValueRef LLVMConstBitCast ( LLVMValueRef  ConstantVal,
LLVMTypeRef  ToType 
)

Definition at line 1869 of file Core.cpp.

References llvm::ConstantExpr::getBitCast(), unwrap(), and llvm::wrap().

◆ LLVMConstExtractElement()

LLVMValueRef LLVMConstExtractElement ( LLVMValueRef  VectorConstant,
LLVMValueRef  IndexConstant 
)

Definition at line 1892 of file Core.cpp.

References llvm::ConstantExpr::getExtractElement(), and llvm::wrap().

◆ LLVMConstGEP2()

LLVMValueRef LLVMConstGEP2 ( LLVMTypeRef  Ty,
LLVMValueRef  ConstantVal,
LLVMValueRef ConstantIndices,
unsigned  NumIndices 
)

Definition at line 1825 of file Core.cpp.

References llvm::ConstantExpr::getGetElementPtr(), unwrap(), and llvm::wrap().

◆ LLVMConstGEPWithNoWrapFlags()

LLVMValueRef LLVMConstGEPWithNoWrapFlags ( LLVMTypeRef  Ty,
LLVMValueRef  ConstantVal,
LLVMValueRef ConstantIndices,
unsigned  NumIndices,
LLVMGEPNoWrapFlags  NoWrapFlags 
)

Creates a constant GetElementPtr expression.

Similar to LLVMConstGEP2, but allows specifying the no-wrap flags.

See also
llvm::ConstantExpr::getGetElementPtr()

Definition at line 1842 of file Core.cpp.

References llvm::ConstantExpr::getGetElementPtr(), mapFromLLVMGEPNoWrapFlags(), unwrap(), and llvm::wrap().

◆ LLVMConstInBoundsGEP2()

LLVMValueRef LLVMConstInBoundsGEP2 ( LLVMTypeRef  Ty,
LLVMValueRef  ConstantVal,
LLVMValueRef ConstantIndices,
unsigned  NumIndices 
)

Definition at line 1833 of file Core.cpp.

References llvm::ConstantExpr::getInBoundsGetElementPtr(), unwrap(), and llvm::wrap().

◆ LLVMConstInlineAsm()

LLVMValueRef LLVMConstInlineAsm ( LLVMTypeRef  Ty,
const char AsmString,
const char Constraints,
LLVMBool  HasSideEffects,
LLVMBool  IsAlignStack 
)

Deprecated: Use LLVMGetInlineAsm instead.

Definition at line 1916 of file Core.cpp.

References llvm::InlineAsm::get(), unwrap(), and llvm::wrap().

◆ LLVMConstInsertElement()

LLVMValueRef LLVMConstInsertElement ( LLVMValueRef  VectorConstant,
LLVMValueRef  ElementValueConstant,
LLVMValueRef  IndexConstant 
)

Definition at line 1898 of file Core.cpp.

References llvm::ConstantExpr::getInsertElement(), and llvm::wrap().

◆ LLVMConstIntToPtr()

LLVMValueRef LLVMConstIntToPtr ( LLVMValueRef  ConstantVal,
LLVMTypeRef  ToType 
)

Definition at line 1864 of file Core.cpp.

References llvm::ConstantExpr::getIntToPtr(), unwrap(), and llvm::wrap().

◆ LLVMConstMul()

LLVMValueRef LLVMConstMul ( LLVMValueRef  LHSConstant,
LLVMValueRef  RHSConstant 
)

Definition at line 1803 of file Core.cpp.

References llvm::ConstantExpr::getMul(), and llvm::wrap().

◆ LLVMConstNeg()

LLVMValueRef LLVMConstNeg ( LLVMValueRef  ConstantVal)

Definition at line 1752 of file Core.cpp.

References llvm::ConstantExpr::getNeg(), and llvm::wrap().

◆ LLVMConstNot()

LLVMValueRef LLVMConstNot ( LLVMValueRef  ConstantVal)

Definition at line 1765 of file Core.cpp.

References llvm::ConstantExpr::getNot(), and llvm::wrap().

◆ LLVMConstNSWAdd()

LLVMValueRef LLVMConstNSWAdd ( LLVMValueRef  LHSConstant,
LLVMValueRef  RHSConstant 
)

Definition at line 1774 of file Core.cpp.

References llvm::ConstantExpr::getNSWAdd(), and llvm::wrap().

◆ LLVMConstNSWMul()

LLVMValueRef LLVMConstNSWMul ( LLVMValueRef  LHSConstant,
LLVMValueRef  RHSConstant 
)

Definition at line 1808 of file Core.cpp.

References llvm::ConstantExpr::getNSWMul(), and llvm::wrap().

◆ LLVMConstNSWNeg()

LLVMValueRef LLVMConstNSWNeg ( LLVMValueRef  ConstantVal)

Definition at line 1756 of file Core.cpp.

References llvm::ConstantExpr::getNSWNeg(), and llvm::wrap().

◆ LLVMConstNSWSub()

LLVMValueRef LLVMConstNSWSub ( LLVMValueRef  LHSConstant,
LLVMValueRef  RHSConstant 
)

Definition at line 1791 of file Core.cpp.

References llvm::ConstantExpr::getNSWSub(), and llvm::wrap().

◆ LLVMConstNUWAdd()

LLVMValueRef LLVMConstNUWAdd ( LLVMValueRef  LHSConstant,
LLVMValueRef  RHSConstant 
)

Definition at line 1780 of file Core.cpp.

References llvm::ConstantExpr::getNUWAdd(), and llvm::wrap().

◆ LLVMConstNUWMul()

LLVMValueRef LLVMConstNUWMul ( LLVMValueRef  LHSConstant,
LLVMValueRef  RHSConstant 
)

Definition at line 1814 of file Core.cpp.

References llvm::ConstantExpr::getNUWMul(), and llvm::wrap().

◆ LLVMConstNUWSub()

LLVMValueRef LLVMConstNUWSub ( LLVMValueRef  LHSConstant,
LLVMValueRef  RHSConstant 
)

Definition at line 1797 of file Core.cpp.

References llvm::ConstantExpr::getNUWSub(), and llvm::wrap().

◆ LLVMConstPointerCast()

LLVMValueRef LLVMConstPointerCast ( LLVMValueRef  ConstantVal,
LLVMTypeRef  ToType 
)

Definition at line 1886 of file Core.cpp.

References llvm::ConstantExpr::getPointerCast(), unwrap(), and llvm::wrap().

◆ LLVMConstPtrToInt()

LLVMValueRef LLVMConstPtrToInt ( LLVMValueRef  ConstantVal,
LLVMTypeRef  ToType 
)

Definition at line 1859 of file Core.cpp.

References llvm::ConstantExpr::getPtrToInt(), unwrap(), and llvm::wrap().

◆ LLVMConstShuffleVector()

LLVMValueRef LLVMConstShuffleVector ( LLVMValueRef  VectorAConstant,
LLVMValueRef  VectorBConstant,
LLVMValueRef  MaskConstant 
)

◆ LLVMConstSub()

LLVMValueRef LLVMConstSub ( LLVMValueRef  LHSConstant,
LLVMValueRef  RHSConstant 
)

Definition at line 1786 of file Core.cpp.

References llvm::ConstantExpr::getSub(), and llvm::wrap().

◆ LLVMConstTrunc()

LLVMValueRef LLVMConstTrunc ( LLVMValueRef  ConstantVal,
LLVMTypeRef  ToType 
)

Definition at line 1854 of file Core.cpp.

References llvm::ConstantExpr::getTrunc(), unwrap(), and llvm::wrap().

◆ LLVMConstTruncOrBitCast()

LLVMValueRef LLVMConstTruncOrBitCast ( LLVMValueRef  ConstantVal,
LLVMTypeRef  ToType 
)

Definition at line 1880 of file Core.cpp.

References llvm::ConstantExpr::getTruncOrBitCast(), unwrap(), and llvm::wrap().

◆ LLVMConstXor()

LLVMValueRef LLVMConstXor ( LLVMValueRef  LHSConstant,
LLVMValueRef  RHSConstant 
)

Definition at line 1820 of file Core.cpp.

References llvm::ConstantExpr::getXor(), and llvm::wrap().

◆ LLVMGetBlockAddressBasicBlock()

LLVMBasicBlockRef LLVMGetBlockAddressBasicBlock ( LLVMValueRef  BlockAddr)

Gets the basic block associated with a given BlockAddress constant value.

Definition at line 1932 of file Core.cpp.

References llvm::wrap().

◆ LLVMGetBlockAddressFunction()

LLVMValueRef LLVMGetBlockAddressFunction ( LLVMValueRef  BlockAddr)

Gets the function associated with a given BlockAddress constant value.

Definition at line 1928 of file Core.cpp.

References getFunction(), and llvm::wrap().

◆ LLVMGetConstOpcode()

LLVMOpcode LLVMGetConstOpcode ( LLVMValueRef  ConstantVal)

Definition at line 1740 of file Core.cpp.

References getOpcode(), and map_to_llvmopcode().

◆ LLVMSizeOf()

LLVMValueRef LLVMSizeOf ( LLVMTypeRef  Ty)

Definition at line 1748 of file Core.cpp.

References llvm::ConstantExpr::getSizeOf(), unwrap(), and llvm::wrap().