LLVM  8.0.1
Classes | Namespaces | Functions
ConstantFolding.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  llvm::ArrayRef< T >
 ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory), i.e. More...
 

Namespaces

 llvm
 This class represents lattice values for constants.
 

Functions

bool llvm::IsConstantOffsetFromGlobal (Constant *C, GlobalValue *&GV, APInt &Offset, const DataLayout &DL)
 If this constant is a constant offset from a global, return the global and the constant. More...
 
Constantllvm::ConstantFoldInstruction (Instruction *I, const DataLayout &DL, const TargetLibraryInfo *TLI=nullptr)
 ConstantFoldInstruction - Try to constant fold the specified instruction. More...
 
Constantllvm::ConstantFoldConstant (const Constant *C, const DataLayout &DL, const TargetLibraryInfo *TLI=nullptr)
 ConstantFoldConstant - Attempt to fold the constant using the specified DataLayout. More...
 
Constantllvm::ConstantFoldInstOperands (Instruction *I, ArrayRef< Constant *> Ops, const DataLayout &DL, const TargetLibraryInfo *TLI=nullptr)
 ConstantFoldInstOperands - Attempt to constant fold an instruction with the specified operands. More...
 
Constantllvm::ConstantFoldCompareInstOperands (unsigned Predicate, Constant *LHS, Constant *RHS, const DataLayout &DL, const TargetLibraryInfo *TLI=nullptr)
 ConstantFoldCompareInstOperands - Attempt to constant fold a compare instruction (icmp/fcmp) with the specified operands. More...
 
Constantllvm::ConstantFoldBinaryOpOperands (unsigned Opcode, Constant *LHS, Constant *RHS, const DataLayout &DL)
 Attempt to constant fold a binary operation with the specified operands. More...
 
Constantllvm::ConstantFoldSelectInstruction (Constant *Cond, Constant *V1, Constant *V2)
 Attempt to constant fold a select instruction with the specified operands. More...
 
Constantllvm::ConstantFoldCastOperand (unsigned Opcode, Constant *C, Type *DestTy, const DataLayout &DL)
 Attempt to constant fold a cast with the specified operand. More...
 
Constantllvm::ConstantFoldInsertValueInstruction (Constant *Agg, Constant *Val, ArrayRef< unsigned > Idxs)
 ConstantFoldInsertValueInstruction - Attempt to constant fold an insertvalue instruction with the specified operands and indices. More...
 
Constantllvm::ConstantFoldExtractValueInstruction (Constant *Agg, ArrayRef< unsigned > Idxs)
 Attempt to constant fold an extractvalue instruction with the specified operands and indices. More...
 
Constantllvm::ConstantFoldInsertElementInstruction (Constant *Val, Constant *Elt, Constant *Idx)
 Attempt to constant fold an insertelement instruction with the specified operands and indices. More...
 
Constantllvm::ConstantFoldExtractElementInstruction (Constant *Val, Constant *Idx)
 Attempt to constant fold an extractelement instruction with the specified operands and indices. More...
 
Constantllvm::ConstantFoldShuffleVectorInstruction (Constant *V1, Constant *V2, Constant *Mask)
 Attempt to constant fold a shufflevector instruction with the specified operands and indices. More...
 
Constantllvm::ConstantFoldLoadFromConstPtr (Constant *C, Type *Ty, const DataLayout &DL)
 ConstantFoldLoadFromConstPtr - Return the value that a load from C would produce if it is constant and determinable. More...
 
Constantllvm::ConstantFoldLoadThroughGEPConstantExpr (Constant *C, ConstantExpr *CE)
 ConstantFoldLoadThroughGEPConstantExpr - Given a constant and a getelementptr constantexpr, return the constant value being addressed by the constant expression, or null if something is funny and we can't decide. More...
 
Constantllvm::ConstantFoldLoadThroughGEPIndices (Constant *C, ArrayRef< Constant *> Indices)
 ConstantFoldLoadThroughGEPIndices - Given a constant and getelementptr indices (with an implied zero pointer index that is not in the list), return the constant value being addressed by a virtual load, or null if something is funny and we can't decide. More...
 
bool llvm::canConstantFoldCallTo (ImmutableCallSite CS, const Function *F)
 canConstantFoldCallTo - Return true if its even possible to fold a call to the specified function. More...
 
Constantllvm::ConstantFoldCall (ImmutableCallSite CS, Function *F, ArrayRef< Constant *> Operands, const TargetLibraryInfo *TLI=nullptr)
 ConstantFoldCall - Attempt to constant fold a call to the specified function with the specified arguments, returning null if unsuccessful. More...
 
Constantllvm::ConstantFoldLoadThroughBitcast (Constant *C, Type *DestTy, const DataLayout &DL)
 ConstantFoldLoadThroughBitcast - try to cast constant to destination type returning null if unsuccessful. More...
 
bool llvm::isMathLibCallNoop (CallSite CS, const TargetLibraryInfo *TLI)
 Check whether the given call has no side-effects. More...