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:
Duncan Sands
2012-03-13 11:42:19 +00:00
parent 61b1851a20
commit 0aa85eb231
3 changed files with 281 additions and 337 deletions

View File

@ -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);