mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-26 21:32:10 +00:00
Uniformize the InstructionSimplify interface by ensuring that all routines
take a TargetLibraryInfo parameter. Internally, rather than passing TD, TLI and DT parameters around all over the place, introduce a struct for holding them. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152623 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
61b1851a20
commit
0aa85eb231
@ -141,11 +141,13 @@ namespace llvm {
|
||||
/// the result. If not, this returns null.
|
||||
Value *SimplifySelectInst(Value *Cond, Value *TrueVal, Value *FalseVal,
|
||||
const TargetData *TD = 0,
|
||||
const TargetLibraryInfo *TLI = 0,
|
||||
const DominatorTree *DT = 0);
|
||||
|
||||
/// SimplifyGEPInst - Given operands for an GetElementPtrInst, see if we can
|
||||
/// fold the result. If not, this returns null.
|
||||
Value *SimplifyGEPInst(ArrayRef<Value *> Ops, const TargetData *TD = 0,
|
||||
const TargetLibraryInfo *TLI = 0,
|
||||
const DominatorTree *DT = 0);
|
||||
|
||||
/// SimplifyInsertValueInst - Given operands for an InsertValueInst, see if we
|
||||
@ -153,6 +155,7 @@ namespace llvm {
|
||||
Value *SimplifyInsertValueInst(Value *Agg, Value *Val,
|
||||
ArrayRef<unsigned> Idxs,
|
||||
const TargetData *TD = 0,
|
||||
const TargetLibraryInfo *TLI = 0,
|
||||
const DominatorTree *DT = 0);
|
||||
|
||||
//=== Helper functions for higher up the class hierarchy.
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -227,7 +227,7 @@ Value *PHITransAddr::PHITranslateSubExpr(Value *V, BasicBlock *CurBB,
|
||||
return GEP;
|
||||
|
||||
// Simplify the GEP to handle 'gep x, 0' -> x etc.
|
||||
if (Value *V = SimplifyGEPInst(GEPOps, TD, DT)) {
|
||||
if (Value *V = SimplifyGEPInst(GEPOps, TD, TLI, DT)) {
|
||||
for (unsigned i = 0, e = GEPOps.size(); i != e; ++i)
|
||||
RemoveInstInputs(GEPOps[i], InstInputs);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user