[llvm-commits] [llvm] r83740 - in /llvm/trunk: include/llvm/Transforms/Utils/SSAUpdater.h lib/Transforms/Utils/SSAUpdater.cpp

Chris Lattner sabre at nondot.org
Sat Oct 10 15:41:58 PDT 2009


Author: lattner
Date: Sat Oct 10 17:41:58 2009
New Revision: 83740

URL: http://llvm.org/viewvc/llvm-project?rev=83740&view=rev
Log:
rename GetValueInBlock -> GetValueAtEndOfBlock to better reflect 
what it does.

Modified:
    llvm/trunk/include/llvm/Transforms/Utils/SSAUpdater.h
    llvm/trunk/lib/Transforms/Utils/SSAUpdater.cpp

Modified: llvm/trunk/include/llvm/Transforms/Utils/SSAUpdater.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Transforms/Utils/SSAUpdater.h?rev=83740&r1=83739&r2=83740&view=diff

==============================================================================
--- llvm/trunk/include/llvm/Transforms/Utils/SSAUpdater.h (original)
+++ llvm/trunk/include/llvm/Transforms/Utils/SSAUpdater.h Sat Oct 10 17:41:58 2009
@@ -52,16 +52,16 @@
   /// specified block with the specified value.
   void AddAvailableValue(BasicBlock *BB, Value *V);
   
-  /// GetValueInBlock - Construct SSA form, materializing a value in the
-  /// specified block.
-  Value *GetValueInBlock(BasicBlock *BB);
+  /// GetValueAtEndOfBlock - Construct SSA form, materializing a value that is
+  /// live at the end of the specified block.
+  Value *GetValueAtEndOfBlock(BasicBlock *BB);
   
   /// RewriteUse - Rewrite a use of the symbolic value.  This handles PHI nodes,
   /// which use their value in the corresponding predecessor.
   void RewriteUse(Use &U);
   
 private:
-  Value *GetValueInBlockInternal(BasicBlock *BB);
+  Value *GetValueAtEndOfBlockInternal(BasicBlock *BB);
   void operator=(const SSAUpdater&); // DO NOT IMPLEMENT
   SSAUpdater(const SSAUpdater&);     // DO NOT IMPLEMENT
 };

Modified: llvm/trunk/lib/Transforms/Utils/SSAUpdater.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Utils/SSAUpdater.cpp?rev=83740&r1=83739&r2=83740&view=diff

==============================================================================
--- llvm/trunk/lib/Transforms/Utils/SSAUpdater.cpp (original)
+++ llvm/trunk/lib/Transforms/Utils/SSAUpdater.cpp Sat Oct 10 17:41:58 2009
@@ -64,11 +64,11 @@
   getAvailableVals(AV)[BB] = V;
 }
 
-/// GetValueInBlock - Construct SSA form, materializing a value in the
+/// GetValueAtEndOfBlock - Construct SSA form, materializing a value in the
 /// specified block.
-Value *SSAUpdater::GetValueInBlock(BasicBlock *BB) {
+Value *SSAUpdater::GetValueAtEndOfBlock(BasicBlock *BB) {
   assert(getIncomingPredInfo(IPI).empty() && "Unexpected Internal State");
-  Value *Res = GetValueInBlockInternal(BB);
+  Value *Res = GetValueAtEndOfBlockInternal(BB);
   assert(getIncomingPredInfo(IPI).empty() && "Unexpected Internal State");
   return Res;
 }
@@ -81,16 +81,16 @@
   if (PHINode *UserPN = dyn_cast<PHINode>(User))
     UseBB = UserPN->getIncomingBlock(U);
   
-  U.set(GetValueInBlock(UseBB));
+  U.set(GetValueAtEndOfBlock(UseBB));
 }
 
 
-/// GetValueInBlock - Check to see if AvailableVals has an entry for the
-/// specified BB and if so, return it.  If not, construct SSA form by walking
-/// predecessors inserting PHI nodes as needed until we get to a block where the
-/// value is available.
+/// GetValueAtEndOfBlockInternal - Check to see if AvailableVals has an entry
+/// for the specified BB and if so, return it.  If not, construct SSA form by
+/// walking predecessors inserting PHI nodes as needed until we get to a block
+/// where the value is available.
 ///
-Value *SSAUpdater::GetValueInBlockInternal(BasicBlock *BB) {
+Value *SSAUpdater::GetValueAtEndOfBlockInternal(BasicBlock *BB) {
   AvailableValsTy &AvailableVals = getAvailableVals(AV);
   
   // Query AvailableVals by doing an insertion of null.
@@ -138,7 +138,7 @@
   if (PHINode *SomePhi = dyn_cast<PHINode>(BB->begin())) {
     for (unsigned i = 0, e = SomePhi->getNumIncomingValues(); i != e; ++i) {
       BasicBlock *PredBB = SomePhi->getIncomingBlock(i);
-      Value *PredVal = GetValueInBlockInternal(PredBB);
+      Value *PredVal = GetValueAtEndOfBlockInternal(PredBB);
       IncomingPredInfo.push_back(std::make_pair(PredBB, PredVal));
       
       // Compute SingularValue.
@@ -151,7 +151,7 @@
     bool isFirstPred = true;
     for (pred_iterator PI = pred_begin(BB), E = pred_end(BB); PI != E; ++PI) {
       BasicBlock *PredBB = *PI;
-      Value *PredVal = GetValueInBlockInternal(PredBB);
+      Value *PredVal = GetValueAtEndOfBlockInternal(PredBB);
       IncomingPredInfo.push_back(std::make_pair(PredBB, PredVal));
       
       // Compute SingularValue.





More information about the llvm-commits mailing list