20 #ifndef LLVM_ANALYSIS_CONSTANTFOLDING_H
21 #define LLVM_ANALYSIS_CONSTANTFOLDING_H
28 class TargetLibraryInfo;
40 const TargetLibraryInfo *TLI = 0);
46 const DataLayout *
TD = 0,
47 const TargetLibraryInfo *TLI = 0);
56 ArrayRef<Constant *> Ops,
57 const DataLayout *
TD = 0,
58 const TargetLibraryInfo *TLI = 0);
66 const DataLayout *
TD = 0,
67 const TargetLibraryInfo *TLI = 0);
73 ArrayRef<unsigned> Idxs);
90 ArrayRef<Constant*> Indices);
99 const TargetLibraryInfo *TLI = 0);
COFF::RelocationTypeX86 Type
Constant * ConstantFoldLoadThroughGEPConstantExpr(Constant *C, ConstantExpr *CE)
bool canConstantFoldCallTo(const Function *F)
Constant * ConstantFoldConstantExpression(const ConstantExpr *CE, const DataLayout *TD=0, const TargetLibraryInfo *TLI=0)
Constant * ConstantFoldInstruction(Instruction *I, const DataLayout *TD=0, const TargetLibraryInfo *TLI=0)
Constant * ConstantFoldInsertValueInstruction(Constant *Agg, Constant *Val, ArrayRef< unsigned > Idxs)
Constant * ConstantFoldCall(Function *F, ArrayRef< Constant * > Operands, const TargetLibraryInfo *TLI=0)
Constant * ConstantFoldCompareInstOperands(unsigned Predicate, Constant *LHS, Constant *RHS, const DataLayout *TD=0, const TargetLibraryInfo *TLI=0)
Constant * ConstantFoldLoadFromConstPtr(Constant *C, const DataLayout *TD=0)
Constant * ConstantFoldInstOperands(unsigned Opcode, Type *DestTy, ArrayRef< Constant * > Ops, const DataLayout *TD=0, const TargetLibraryInfo *TLI=0)
Constant * ConstantFoldLoadThroughGEPIndices(Constant *C, ArrayRef< Constant * > Indices)
INITIALIZE_PASS(GlobalMerge,"global-merge","Global Merge", false, false) bool GlobalMerge const DataLayout * TD