aboutsummaryrefslogtreecommitdiff
path: root/lib/Transforms
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-10-10 22:41:58 +0000
committerChris Lattner <sabre@nondot.org>2009-10-10 22:41:58 +0000
commit5fb107287fd8d35b8fc39aa3e6b084fb2871a8ff (patch)
tree7c768c3d0b12d158f55af724a4db185efdce796b /lib/Transforms
parent8f8e9f08300f62db802767c9fb23b40aab66e51e (diff)
rename GetValueInBlock -> GetValueAtEndOfBlock to better reflect
what it does. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83740 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms')
-rw-r--r--lib/Transforms/Utils/SSAUpdater.cpp22
1 files changed, 11 insertions, 11 deletions
diff --git a/lib/Transforms/Utils/SSAUpdater.cpp b/lib/Transforms/Utils/SSAUpdater.cpp
index 0baa5a8ca6..be9d147409 100644
--- a/lib/Transforms/Utils/SSAUpdater.cpp
+++ b/lib/Transforms/Utils/SSAUpdater.cpp
@@ -64,11 +64,11 @@ void SSAUpdater::AddAvailableValue(BasicBlock *BB, Value *V) {
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 @@ void SSAUpdater::RewriteUse(Use &U) {
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 @@ Value *SSAUpdater::GetValueInBlockInternal(BasicBlock *BB) {
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 @@ Value *SSAUpdater::GetValueInBlockInternal(BasicBlock *BB) {
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.