LLVM  6.0.0svn
Public Member Functions | List of all members
llvm::ConstantFolder Class Reference

ConstantFolder - Create constants with minimum, target independent, folding. More...

#include "llvm/IR/ConstantFolder.h"

Public Member Functions

 ConstantFolder ()=default
 
ConstantCreateAdd (Constant *LHS, Constant *RHS, bool HasNUW=false, bool HasNSW=false) const
 
ConstantCreateFAdd (Constant *LHS, Constant *RHS) const
 
ConstantCreateSub (Constant *LHS, Constant *RHS, bool HasNUW=false, bool HasNSW=false) const
 
ConstantCreateFSub (Constant *LHS, Constant *RHS) const
 
ConstantCreateMul (Constant *LHS, Constant *RHS, bool HasNUW=false, bool HasNSW=false) const
 
ConstantCreateFMul (Constant *LHS, Constant *RHS) const
 
ConstantCreateUDiv (Constant *LHS, Constant *RHS, bool isExact=false) const
 
ConstantCreateSDiv (Constant *LHS, Constant *RHS, bool isExact=false) const
 
ConstantCreateFDiv (Constant *LHS, Constant *RHS) const
 
ConstantCreateURem (Constant *LHS, Constant *RHS) const
 
ConstantCreateSRem (Constant *LHS, Constant *RHS) const
 
ConstantCreateFRem (Constant *LHS, Constant *RHS) const
 
ConstantCreateShl (Constant *LHS, Constant *RHS, bool HasNUW=false, bool HasNSW=false) const
 
ConstantCreateLShr (Constant *LHS, Constant *RHS, bool isExact=false) const
 
ConstantCreateAShr (Constant *LHS, Constant *RHS, bool isExact=false) const
 
ConstantCreateAnd (Constant *LHS, Constant *RHS) const
 
ConstantCreateOr (Constant *LHS, Constant *RHS) const
 
ConstantCreateXor (Constant *LHS, Constant *RHS) const
 
ConstantCreateBinOp (Instruction::BinaryOps Opc, Constant *LHS, Constant *RHS) const
 
ConstantCreateNeg (Constant *C, bool HasNUW=false, bool HasNSW=false) const
 
ConstantCreateFNeg (Constant *C) const
 
ConstantCreateNot (Constant *C) const
 
ConstantCreateGetElementPtr (Type *Ty, Constant *C, ArrayRef< Constant *> IdxList) const
 
ConstantCreateGetElementPtr (Type *Ty, Constant *C, Constant *Idx) const
 
ConstantCreateGetElementPtr (Type *Ty, Constant *C, ArrayRef< Value *> IdxList) const
 
ConstantCreateInBoundsGetElementPtr (Type *Ty, Constant *C, ArrayRef< Constant *> IdxList) const
 
ConstantCreateInBoundsGetElementPtr (Type *Ty, Constant *C, Constant *Idx) const
 
ConstantCreateInBoundsGetElementPtr (Type *Ty, Constant *C, ArrayRef< Value *> IdxList) const
 
ConstantCreateCast (Instruction::CastOps Op, Constant *C, Type *DestTy) const
 
ConstantCreatePointerCast (Constant *C, Type *DestTy) const
 
ConstantCreatePointerBitCastOrAddrSpaceCast (Constant *C, Type *DestTy) const
 
ConstantCreateIntCast (Constant *C, Type *DestTy, bool isSigned) const
 
ConstantCreateFPCast (Constant *C, Type *DestTy) const
 
ConstantCreateBitCast (Constant *C, Type *DestTy) const
 
ConstantCreateIntToPtr (Constant *C, Type *DestTy) const
 
ConstantCreatePtrToInt (Constant *C, Type *DestTy) const
 
ConstantCreateZExtOrBitCast (Constant *C, Type *DestTy) const
 
ConstantCreateSExtOrBitCast (Constant *C, Type *DestTy) const
 
ConstantCreateTruncOrBitCast (Constant *C, Type *DestTy) const
 
ConstantCreateICmp (CmpInst::Predicate P, Constant *LHS, Constant *RHS) const
 
ConstantCreateFCmp (CmpInst::Predicate P, Constant *LHS, Constant *RHS) const
 
ConstantCreateSelect (Constant *C, Constant *True, Constant *False) const
 
ConstantCreateExtractElement (Constant *Vec, Constant *Idx) const
 
ConstantCreateInsertElement (Constant *Vec, Constant *NewElt, Constant *Idx) const
 
ConstantCreateShuffleVector (Constant *V1, Constant *V2, Constant *Mask) const
 
ConstantCreateExtractValue (Constant *Agg, ArrayRef< unsigned > IdxList) const
 
ConstantCreateInsertValue (Constant *Agg, Constant *Val, ArrayRef< unsigned > IdxList) const
 

Detailed Description

ConstantFolder - Create constants with minimum, target independent, folding.

Definition at line 28 of file ConstantFolder.h.

Constructor & Destructor Documentation

◆ ConstantFolder()

llvm::ConstantFolder::ConstantFolder ( )
explicitdefault

Member Function Documentation

◆ CreateAdd()

Constant* llvm::ConstantFolder::CreateAdd ( Constant LHS,
Constant RHS,
bool  HasNUW = false,
bool  HasNSW = false 
) const
inline

Definition at line 36 of file ConstantFolder.h.

References llvm::ConstantExpr::getAdd().

◆ CreateAnd()

Constant* llvm::ConstantFolder::CreateAnd ( Constant LHS,
Constant RHS 
) const
inline

Definition at line 104 of file ConstantFolder.h.

References llvm::ConstantExpr::getAnd().

◆ CreateAShr()

Constant* llvm::ConstantFolder::CreateAShr ( Constant LHS,
Constant RHS,
bool  isExact = false 
) const
inline

Definition at line 99 of file ConstantFolder.h.

References llvm::ConstantExpr::getAShr().

◆ CreateBinOp()

Constant* llvm::ConstantFolder::CreateBinOp ( Instruction::BinaryOps  Opc,
Constant LHS,
Constant RHS 
) const
inline

Definition at line 116 of file ConstantFolder.h.

References llvm::ConstantExpr::get().

◆ CreateBitCast()

Constant* llvm::ConstantFolder::CreateBitCast ( Constant C,
Type DestTy 
) const
inline

Definition at line 204 of file ConstantFolder.h.

References CreateCast().

◆ CreateCast()

Constant* llvm::ConstantFolder::CreateCast ( Instruction::CastOps  Op,
Constant C,
Type DestTy 
) const
inline

Definition at line 181 of file ConstantFolder.h.

References llvm::ConstantExpr::getCast().

Referenced by CreateBitCast(), CreateIntToPtr(), and CreatePtrToInt().

◆ CreateExtractElement()

Constant* llvm::ConstantFolder::CreateExtractElement ( Constant Vec,
Constant Idx 
) const
inline

Definition at line 250 of file ConstantFolder.h.

References llvm::ConstantExpr::getExtractElement().

◆ CreateExtractValue()

Constant* llvm::ConstantFolder::CreateExtractValue ( Constant Agg,
ArrayRef< unsigned IdxList 
) const
inline

Definition at line 264 of file ConstantFolder.h.

References llvm::ConstantExpr::getExtractValue().

◆ CreateFAdd()

Constant* llvm::ConstantFolder::CreateFAdd ( Constant LHS,
Constant RHS 
) const
inline

Definition at line 41 of file ConstantFolder.h.

References llvm::ConstantExpr::getFAdd().

◆ CreateFCmp()

Constant* llvm::ConstantFolder::CreateFCmp ( CmpInst::Predicate  P,
Constant LHS,
Constant RHS 
) const
inline

Definition at line 237 of file ConstantFolder.h.

References llvm::ConstantExpr::getCompare().

◆ CreateFDiv()

Constant* llvm::ConstantFolder::CreateFDiv ( Constant LHS,
Constant RHS 
) const
inline

Definition at line 73 of file ConstantFolder.h.

References llvm::ConstantExpr::getFDiv().

◆ CreateFMul()

Constant* llvm::ConstantFolder::CreateFMul ( Constant LHS,
Constant RHS 
) const
inline

Definition at line 59 of file ConstantFolder.h.

References llvm::ConstantExpr::getFMul().

◆ CreateFNeg()

Constant* llvm::ConstantFolder::CreateFNeg ( Constant C) const
inline

Definition at line 130 of file ConstantFolder.h.

References llvm::ConstantExpr::getFNeg().

◆ CreateFPCast()

Constant* llvm::ConstantFolder::CreateFPCast ( Constant C,
Type DestTy 
) const
inline

Definition at line 200 of file ConstantFolder.h.

References llvm::ConstantExpr::getFPCast().

◆ CreateFRem()

Constant* llvm::ConstantFolder::CreateFRem ( Constant LHS,
Constant RHS 
) const
inline

Definition at line 85 of file ConstantFolder.h.

References llvm::ConstantExpr::getFRem().

◆ CreateFSub()

Constant* llvm::ConstantFolder::CreateFSub ( Constant LHS,
Constant RHS 
) const
inline

Definition at line 50 of file ConstantFolder.h.

References llvm::ConstantExpr::getFSub().

◆ CreateGetElementPtr() [1/3]

Constant* llvm::ConstantFolder::CreateGetElementPtr ( Type Ty,
Constant C,
ArrayRef< Constant *>  IdxList 
) const
inline

Definition at line 142 of file ConstantFolder.h.

References llvm::ConstantExpr::getGetElementPtr().

◆ CreateGetElementPtr() [2/3]

Constant* llvm::ConstantFolder::CreateGetElementPtr ( Type Ty,
Constant C,
Constant Idx 
) const
inline

Definition at line 147 of file ConstantFolder.h.

References llvm::ConstantExpr::getGetElementPtr().

◆ CreateGetElementPtr() [3/3]

Constant* llvm::ConstantFolder::CreateGetElementPtr ( Type Ty,
Constant C,
ArrayRef< Value *>  IdxList 
) const
inline

Definition at line 154 of file ConstantFolder.h.

References llvm::ConstantExpr::getGetElementPtr().

◆ CreateICmp()

Constant* llvm::ConstantFolder::CreateICmp ( CmpInst::Predicate  P,
Constant LHS,
Constant RHS 
) const
inline

Definition at line 232 of file ConstantFolder.h.

References llvm::ConstantExpr::getCompare().

◆ CreateInBoundsGetElementPtr() [1/3]

Constant* llvm::ConstantFolder::CreateInBoundsGetElementPtr ( Type Ty,
Constant C,
ArrayRef< Constant *>  IdxList 
) const
inline

Definition at line 159 of file ConstantFolder.h.

References llvm::ConstantExpr::getInBoundsGetElementPtr().

◆ CreateInBoundsGetElementPtr() [2/3]

Constant* llvm::ConstantFolder::CreateInBoundsGetElementPtr ( Type Ty,
Constant C,
Constant Idx 
) const
inline

Definition at line 164 of file ConstantFolder.h.

References llvm::ConstantExpr::getInBoundsGetElementPtr().

◆ CreateInBoundsGetElementPtr() [3/3]

Constant* llvm::ConstantFolder::CreateInBoundsGetElementPtr ( Type Ty,
Constant C,
ArrayRef< Value *>  IdxList 
) const
inline

Definition at line 172 of file ConstantFolder.h.

References llvm::ConstantExpr::getInBoundsGetElementPtr().

◆ CreateInsertElement()

Constant* llvm::ConstantFolder::CreateInsertElement ( Constant Vec,
Constant NewElt,
Constant Idx 
) const
inline

Definition at line 254 of file ConstantFolder.h.

References llvm::ConstantExpr::getInsertElement().

◆ CreateInsertValue()

Constant* llvm::ConstantFolder::CreateInsertValue ( Constant Agg,
Constant Val,
ArrayRef< unsigned IdxList 
) const
inline

Definition at line 269 of file ConstantFolder.h.

References llvm::ConstantExpr::getInsertValue().

◆ CreateIntCast()

Constant* llvm::ConstantFolder::CreateIntCast ( Constant C,
Type DestTy,
bool  isSigned 
) const
inline

Definition at line 195 of file ConstantFolder.h.

References llvm::ConstantExpr::getIntegerCast().

◆ CreateIntToPtr()

Constant* llvm::ConstantFolder::CreateIntToPtr ( Constant C,
Type DestTy 
) const
inline

Definition at line 208 of file ConstantFolder.h.

References CreateCast().

◆ CreateLShr()

Constant* llvm::ConstantFolder::CreateLShr ( Constant LHS,
Constant RHS,
bool  isExact = false 
) const
inline

Definition at line 94 of file ConstantFolder.h.

References llvm::ConstantExpr::getLShr().

◆ CreateMul()

Constant* llvm::ConstantFolder::CreateMul ( Constant LHS,
Constant RHS,
bool  HasNUW = false,
bool  HasNSW = false 
) const
inline

Definition at line 54 of file ConstantFolder.h.

References llvm::ConstantExpr::getMul().

◆ CreateNeg()

Constant* llvm::ConstantFolder::CreateNeg ( Constant C,
bool  HasNUW = false,
bool  HasNSW = false 
) const
inline

Definition at line 125 of file ConstantFolder.h.

References llvm::ConstantExpr::getNeg().

◆ CreateNot()

Constant* llvm::ConstantFolder::CreateNot ( Constant C) const
inline

Definition at line 134 of file ConstantFolder.h.

References llvm::ConstantExpr::getNot().

◆ CreateOr()

Constant* llvm::ConstantFolder::CreateOr ( Constant LHS,
Constant RHS 
) const
inline

Definition at line 108 of file ConstantFolder.h.

References llvm::ConstantExpr::getOr().

◆ CreatePointerBitCastOrAddrSpaceCast()

Constant* llvm::ConstantFolder::CreatePointerBitCastOrAddrSpaceCast ( Constant C,
Type DestTy 
) const
inline

◆ CreatePointerCast()

Constant* llvm::ConstantFolder::CreatePointerCast ( Constant C,
Type DestTy 
) const
inline

Definition at line 186 of file ConstantFolder.h.

References llvm::ConstantExpr::getPointerCast().

◆ CreatePtrToInt()

Constant* llvm::ConstantFolder::CreatePtrToInt ( Constant C,
Type DestTy 
) const
inline

Definition at line 212 of file ConstantFolder.h.

References CreateCast().

◆ CreateSDiv()

Constant* llvm::ConstantFolder::CreateSDiv ( Constant LHS,
Constant RHS,
bool  isExact = false 
) const
inline

Definition at line 68 of file ConstantFolder.h.

References llvm::ConstantExpr::getSDiv().

◆ CreateSelect()

Constant* llvm::ConstantFolder::CreateSelect ( Constant C,
Constant True,
Constant False 
) const
inline

Definition at line 246 of file ConstantFolder.h.

References llvm::ConstantExpr::getSelect().

◆ CreateSExtOrBitCast()

Constant* llvm::ConstantFolder::CreateSExtOrBitCast ( Constant C,
Type DestTy 
) const
inline

Definition at line 220 of file ConstantFolder.h.

References llvm::ConstantExpr::getSExtOrBitCast().

◆ CreateShl()

Constant* llvm::ConstantFolder::CreateShl ( Constant LHS,
Constant RHS,
bool  HasNUW = false,
bool  HasNSW = false 
) const
inline

Definition at line 89 of file ConstantFolder.h.

References llvm::ConstantExpr::getShl().

◆ CreateShuffleVector()

Constant* llvm::ConstantFolder::CreateShuffleVector ( Constant V1,
Constant V2,
Constant Mask 
) const
inline

Definition at line 259 of file ConstantFolder.h.

References llvm::ConstantExpr::getShuffleVector().

◆ CreateSRem()

Constant* llvm::ConstantFolder::CreateSRem ( Constant LHS,
Constant RHS 
) const
inline

Definition at line 81 of file ConstantFolder.h.

References llvm::ConstantExpr::getSRem().

◆ CreateSub()

Constant* llvm::ConstantFolder::CreateSub ( Constant LHS,
Constant RHS,
bool  HasNUW = false,
bool  HasNSW = false 
) const
inline

Definition at line 45 of file ConstantFolder.h.

References llvm::ConstantExpr::getSub().

◆ CreateTruncOrBitCast()

Constant* llvm::ConstantFolder::CreateTruncOrBitCast ( Constant C,
Type DestTy 
) const
inline

Definition at line 224 of file ConstantFolder.h.

References llvm::ConstantExpr::getTruncOrBitCast().

◆ CreateUDiv()

Constant* llvm::ConstantFolder::CreateUDiv ( Constant LHS,
Constant RHS,
bool  isExact = false 
) const
inline

Definition at line 63 of file ConstantFolder.h.

References llvm::ConstantExpr::getUDiv().

◆ CreateURem()

Constant* llvm::ConstantFolder::CreateURem ( Constant LHS,
Constant RHS 
) const
inline

Definition at line 77 of file ConstantFolder.h.

References llvm::ConstantExpr::getURem().

◆ CreateXor()

Constant* llvm::ConstantFolder::CreateXor ( Constant LHS,
Constant RHS 
) const
inline

Definition at line 112 of file ConstantFolder.h.

References llvm::ConstantExpr::getXor().

◆ CreateZExtOrBitCast()

Constant* llvm::ConstantFolder::CreateZExtOrBitCast ( Constant C,
Type DestTy 
) const
inline

Definition at line 216 of file ConstantFolder.h.

References llvm::ConstantExpr::getZExtOrBitCast().


The documentation for this class was generated from the following file: