aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-12-07 19:45:30 +0000
committerChris Lattner <sabre@nondot.org>2009-12-07 19:45:30 +0000
commite05a188cd630448cc25143ee8e69a36ab2e69544 (patch)
treeb300ecb63cb2d24ad51bae0925b10afd3e7015de
parentfe81f96b869192fa5294e3bc84e0e9ec91ce3e54 (diff)
downloadexternal_llvm-e05a188cd630448cc25143ee8e69a36ab2e69544.zip
external_llvm-e05a188cd630448cc25143ee8e69a36ab2e69544.tar.gz
external_llvm-e05a188cd630448cc25143ee8e69a36ab2e69544.tar.bz2
add accessor, improve comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90792 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--include/llvm/Analysis/PHITransAddr.h4
-rw-r--r--lib/Analysis/PHITransAddr.cpp2
2 files changed, 4 insertions, 2 deletions
diff --git a/include/llvm/Analysis/PHITransAddr.h b/include/llvm/Analysis/PHITransAddr.h
index ed5ddca..678d405 100644
--- a/include/llvm/Analysis/PHITransAddr.h
+++ b/include/llvm/Analysis/PHITransAddr.h
@@ -47,6 +47,8 @@ public:
InstInputs.push_back(I);
}
+ Value *getAddr() const { return Addr; }
+
/// NeedsPHITranslationFromBlock - Return true if moving from the specified
/// BasicBlock to its predecessors requires PHI translation.
bool NeedsPHITranslationFromBlock(BasicBlock *BB) const {
@@ -65,7 +67,7 @@ public:
/// PHITranslateValue - PHI translate the current address up the CFG from
/// CurBB to Pred, updating our state the reflect any needed changes. This
- /// returns true on failure.
+ /// returns true on failure and sets Addr to null.
bool PHITranslateValue(BasicBlock *CurBB, BasicBlock *PredBB);
/// PHITranslateWithInsertion - PHI translate this value into the specified
diff --git a/lib/Analysis/PHITransAddr.cpp b/lib/Analysis/PHITransAddr.cpp
index 40800b4..9935b92 100644
--- a/lib/Analysis/PHITransAddr.cpp
+++ b/lib/Analysis/PHITransAddr.cpp
@@ -195,7 +195,7 @@ Value *PHITransAddr::PHITranslateSubExpr(Value *V, BasicBlock *CurBB,
/// PHITranslateValue - PHI translate the current address up the CFG from
/// CurBB to Pred, updating our state the reflect any needed changes. This
-/// returns true on failure.
+/// returns true on failure and sets Addr to null.
bool PHITransAddr::PHITranslateValue(BasicBlock *CurBB, BasicBlock *PredBB) {
Addr = PHITranslateSubExpr(Addr, CurBB, PredBB);
return Addr == 0;