[NFC] Name invariant load parameters after base pointer

This just makes the debug output nices sometimes.

llvm-svn: 251947
This commit is contained in:
Johannes Doerfert 2015-11-03 16:49:59 +00:00
parent 475d8e3f42
commit e071f6d637
1 changed files with 4 additions and 0 deletions

View File

@ -1537,6 +1537,10 @@ __isl_give isl_id *Scop::getIdForParam(const SCEV *Parameter) {
if (const SCEVUnknown *ValueParameter = dyn_cast<SCEVUnknown>(Parameter)) {
Value *Val = ValueParameter->getValue();
ParameterName = Val->getName();
if (!Val->hasName())
if (LoadInst *LI = dyn_cast<LoadInst>(Val))
ParameterName =
LI->getPointerOperand()->stripInBoundsOffsets()->getName();
}
if (ParameterName == "" || ParameterName.substr(0, 2) == "p_")