comparison lib/Analysis/PHITransAddr.cpp @ 121:803732b1fca8

LLVM 5.0
author kono
date Fri, 27 Oct 2017 17:07:41 +0900
parents 1172e4bd9c6f
children
comparison
equal deleted inserted replaced
120:1172e4bd9c6f 121:803732b1fca8
225 if (!AnyChanged) 225 if (!AnyChanged)
226 return GEP; 226 return GEP;
227 227
228 // Simplify the GEP to handle 'gep x, 0' -> x etc. 228 // Simplify the GEP to handle 'gep x, 0' -> x etc.
229 if (Value *V = SimplifyGEPInst(GEP->getSourceElementType(), 229 if (Value *V = SimplifyGEPInst(GEP->getSourceElementType(),
230 GEPOps, DL, TLI, DT, AC)) { 230 GEPOps, {DL, TLI, DT, AC})) {
231 for (unsigned i = 0, e = GEPOps.size(); i != e; ++i) 231 for (unsigned i = 0, e = GEPOps.size(); i != e; ++i)
232 RemoveInstInputs(GEPOps[i], InstInputs); 232 RemoveInstInputs(GEPOps[i], InstInputs);
233 233
234 return AddAsInput(V); 234 return AddAsInput(V);
235 } 235 }
274 AddAsInput(LHS); 274 AddAsInput(LHS);
275 } 275 }
276 } 276 }
277 277
278 // See if the add simplifies away. 278 // See if the add simplifies away.
279 if (Value *Res = SimplifyAddInst(LHS, RHS, isNSW, isNUW, DL, TLI, DT, AC)) { 279 if (Value *Res = SimplifyAddInst(LHS, RHS, isNSW, isNUW, {DL, TLI, DT, AC})) {
280 // If we simplified the operands, the LHS is no longer an input, but Res 280 // If we simplified the operands, the LHS is no longer an input, but Res
281 // is. 281 // is.
282 RemoveInstInputs(LHS, InstInputs); 282 RemoveInstInputs(LHS, InstInputs);
283 return AddAsInput(Res); 283 return AddAsInput(Res);
284 } 284 }