[polly] r251947 - [NFC] Name invariant load parameters after base pointer

Johannes Doerfert via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 3 08:49:59 PST 2015


Author: jdoerfert
Date: Tue Nov  3 10:49:59 2015
New Revision: 251947

URL: http://llvm.org/viewvc/llvm-project?rev=251947&view=rev
Log:
[NFC] Name invariant load parameters after base pointer

  This just makes the debug output nices sometimes.

Modified:
    polly/trunk/lib/Analysis/ScopInfo.cpp

Modified: polly/trunk/lib/Analysis/ScopInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/Analysis/ScopInfo.cpp?rev=251947&r1=251946&r2=251947&view=diff
==============================================================================
--- polly/trunk/lib/Analysis/ScopInfo.cpp (original)
+++ polly/trunk/lib/Analysis/ScopInfo.cpp Tue Nov  3 10:49:59 2015
@@ -1537,6 +1537,10 @@ __isl_give isl_id *Scop::getIdForParam(c
   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_")




More information about the llvm-commits mailing list