32 #ifndef LLVM_ANALYSIS_INSTRUCTIONSIMPLIFY_H
33 #define LLVM_ANALYSIS_INSTRUCTIONSIMPLIFY_H
44 class TargetLibraryInfo;
51 const DataLayout *
TD = 0,
52 const TargetLibraryInfo *TLI = 0,
53 const DominatorTree *DT = 0);
58 const DataLayout *
TD = 0,
59 const TargetLibraryInfo *TLI = 0,
60 const DominatorTree *DT = 0);
65 const DataLayout *
TD = 0,
66 const TargetLibraryInfo *TLI = 0,
67 const DominatorTree *DT = 0);
72 const DataLayout *
TD = 0,
73 const TargetLibraryInfo *TLI = 0,
74 const DominatorTree *DT = 0);
80 const DataLayout *
TD = 0,
81 const TargetLibraryInfo *TLI = 0,
82 const DominatorTree *DT = 0);
87 const TargetLibraryInfo *TLI = 0,
88 const DominatorTree *DT = 0);
93 const TargetLibraryInfo *TLI = 0,
94 const DominatorTree *DT = 0);
99 const TargetLibraryInfo *TLI = 0,
100 const DominatorTree *DT = 0);
105 const TargetLibraryInfo *TLI = 0,
106 const DominatorTree *DT = 0);
111 const TargetLibraryInfo *TLI = 0,
112 const DominatorTree *DT = 0);
117 const TargetLibraryInfo *TLI = 0,
118 const DominatorTree *DT = 0);
123 const TargetLibraryInfo *TLI = 0,
124 const DominatorTree *DT = 0);
129 const DataLayout *
TD = 0,
130 const TargetLibraryInfo *TLI = 0,
131 const DominatorTree *DT = 0);
136 const DataLayout *
TD = 0,
137 const TargetLibraryInfo *TLI = 0,
138 const DominatorTree *DT = 0);
143 const DataLayout *
TD = 0,
144 const TargetLibraryInfo *TLI = 0,
145 const DominatorTree *DT = 0);
150 const TargetLibraryInfo *TLI = 0,
151 const DominatorTree *DT = 0);
156 const TargetLibraryInfo *TLI = 0,
157 const DominatorTree *DT = 0);
162 const TargetLibraryInfo *TLI = 0,
163 const DominatorTree *DT = 0);
168 const DataLayout *
TD = 0,
169 const TargetLibraryInfo *TLI = 0,
170 const DominatorTree *DT = 0);
175 const DataLayout *
TD = 0,
176 const TargetLibraryInfo *TLI = 0,
177 const DominatorTree *DT = 0);
182 const DataLayout *
TD = 0,
183 const TargetLibraryInfo *TLI = 0,
184 const DominatorTree *DT = 0);
189 const TargetLibraryInfo *TLI = 0,
190 const DominatorTree *DT = 0);
195 ArrayRef<unsigned> Idxs,
196 const DataLayout *
TD = 0,
197 const TargetLibraryInfo *TLI = 0,
198 const DominatorTree *DT = 0);
203 const TargetLibraryInfo *TLI = 0,
204 const DominatorTree *DT = 0);
212 const DataLayout *
TD = 0,
213 const TargetLibraryInfo *TLI = 0,
214 const DominatorTree *DT = 0);
218 Value *
SimplifyBinOp(
unsigned Opcode, Value *LHS, Value *RHS,
219 const DataLayout *
TD = 0,
220 const TargetLibraryInfo *TLI = 0,
221 const DominatorTree *DT = 0);
229 const TargetLibraryInfo *TLI = 0,
230 const DominatorTree *DT = 0);
237 const DataLayout *
TD = 0,
238 const TargetLibraryInfo *TLI = 0,
239 const DominatorTree *DT = 0);
244 const TargetLibraryInfo *TLI = 0,
245 const DominatorTree *DT = 0);
257 const DataLayout *
TD = 0,
258 const TargetLibraryInfo *TLI = 0,
259 const DominatorTree *DT = 0);
268 const DataLayout *
TD = 0,
269 const TargetLibraryInfo *TLI = 0,
270 const DominatorTree *DT = 0);
COFF::RelocationTypeX86 Type
Value * SimplifyTruncInst(Value *Op, Type *Ty, const DataLayout *TD=0, const TargetLibraryInfo *TLI=0, const DominatorTree *DT=0)
Value * SimplifyFSubInst(Value *LHS, Value *RHS, FastMathFlags FMF, const DataLayout *TD=0, const TargetLibraryInfo *TLI=0, const DominatorTree *DT=0)
Value * SimplifyAddInst(Value *LHS, Value *RHS, bool isNSW, bool isNUW, const DataLayout *TD=0, const TargetLibraryInfo *TLI=0, const DominatorTree *DT=0)
Value * SimplifyInsertValueInst(Value *Agg, Value *Val, ArrayRef< unsigned > Idxs, const DataLayout *TD=0, const TargetLibraryInfo *TLI=0, const DominatorTree *DT=0)
Value * SimplifyFCmpInst(unsigned Predicate, Value *LHS, Value *RHS, const DataLayout *TD=0, const TargetLibraryInfo *TLI=0, const DominatorTree *DT=0)
Value * SimplifyUDivInst(Value *LHS, Value *RHS, const DataLayout *TD=0, const TargetLibraryInfo *TLI=0, const DominatorTree *DT=0)
Value * SimplifySDivInst(Value *LHS, Value *RHS, const DataLayout *TD=0, const TargetLibraryInfo *TLI=0, const DominatorTree *DT=0)
Value * SimplifyAndInst(Value *LHS, Value *RHS, const DataLayout *TD=0, const TargetLibraryInfo *TLI=0, const DominatorTree *DT=0)
bool replaceAndRecursivelySimplify(Instruction *I, Value *SimpleV, const DataLayout *TD=0, const TargetLibraryInfo *TLI=0, const DominatorTree *DT=0)
Replace all uses of 'I' with 'SimpleV' and simplify the uses recursively.
Value * SimplifyFMulInst(Value *LHS, Value *RHS, FastMathFlags FMF, const DataLayout *TD=0, const TargetLibraryInfo *TLI=0, const DominatorTree *DT=0)
Value * SimplifyICmpInst(unsigned Predicate, Value *LHS, Value *RHS, const DataLayout *TD=0, const TargetLibraryInfo *TLI=0, const DominatorTree *DT=0)
Value * SimplifyGEPInst(ArrayRef< Value * > Ops, const DataLayout *TD=0, const TargetLibraryInfo *TLI=0, const DominatorTree *DT=0)
Value * SimplifyShlInst(Value *Op0, Value *Op1, bool isNSW, bool isNUW, const DataLayout *TD=0, const TargetLibraryInfo *TLI=0, const DominatorTree *DT=0)
Value * SimplifyInstruction(Instruction *I, const DataLayout *TD=0, const TargetLibraryInfo *TLI=0, const DominatorTree *DT=0)
Value * SimplifyBinOp(unsigned Opcode, Value *LHS, Value *RHS, const DataLayout *TD=0, const TargetLibraryInfo *TLI=0, const DominatorTree *DT=0)
Value * SimplifyCmpInst(unsigned Predicate, Value *LHS, Value *RHS, const DataLayout *TD=0, const TargetLibraryInfo *TLI=0, const DominatorTree *DT=0)
Value * SimplifyXorInst(Value *LHS, Value *RHS, const DataLayout *TD=0, const TargetLibraryInfo *TLI=0, const DominatorTree *DT=0)
Value * SimplifySRemInst(Value *LHS, Value *RHS, const DataLayout *TD=0, const TargetLibraryInfo *TLI=0, const DominatorTree *DT=0)
Value * SimplifySelectInst(Value *Cond, Value *TrueVal, Value *FalseVal, const DataLayout *TD=0, const TargetLibraryInfo *TLI=0, const DominatorTree *DT=0)
Value * SimplifyOrInst(Value *LHS, Value *RHS, const DataLayout *TD=0, const TargetLibraryInfo *TLI=0, const DominatorTree *DT=0)
Value * SimplifyFDivInst(Value *LHS, Value *RHS, const DataLayout *TD=0, const TargetLibraryInfo *TLI=0, const DominatorTree *DT=0)
Value * SimplifyURemInst(Value *LHS, Value *RHS, const DataLayout *TD=0, const TargetLibraryInfo *TLI=0, const DominatorTree *DT=0)
Value * SimplifyCall(Value *V, User::op_iterator ArgBegin, User::op_iterator ArgEnd, const DataLayout *TD=0, const TargetLibraryInfo *TLI=0, const DominatorTree *DT=0)
Given a function and iterators over arguments, see if we can fold the result.
Value * SimplifyLShrInst(Value *Op0, Value *Op1, bool isExact, const DataLayout *TD=0, const TargetLibraryInfo *TLI=0, const DominatorTree *DT=0)
Value * SimplifyFRemInst(Value *LHS, Value *RHS, const DataLayout *TD=0, const TargetLibraryInfo *TLI=0, const DominatorTree *DT=0)
Value * SimplifyAShrInst(Value *Op0, Value *Op1, bool isExact, const DataLayout *TD=0, const TargetLibraryInfo *TLI=0, const DominatorTree *DT=0)
Value * SimplifySubInst(Value *LHS, Value *RHS, bool isNSW, bool isNUW, const DataLayout *TD=0, const TargetLibraryInfo *TLI=0, const DominatorTree *DT=0)
INITIALIZE_PASS(GlobalMerge,"global-merge","Global Merge", false, false) bool GlobalMerge const DataLayout * TD
Value * SimplifyMulInst(Value *LHS, Value *RHS, const DataLayout *TD=0, const TargetLibraryInfo *TLI=0, const DominatorTree *DT=0)
Value * SimplifyFAddInst(Value *LHS, Value *RHS, FastMathFlags FMF, const DataLayout *TD=0, const TargetLibraryInfo *TLI=0, const DominatorTree *DT=0)
bool recursivelySimplifyInstruction(Instruction *I, const DataLayout *TD=0, const TargetLibraryInfo *TLI=0, const DominatorTree *DT=0)
Recursively attempt to simplify an instruction.