aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-10-10 23:41:48 +0000
committerChris Lattner <sabre@nondot.org>2009-10-10 23:41:48 +0000
commit0bef562ea253878ee92a1eaf6db05b0c2edfa74c (patch)
treecf9ef80b3762d10e1886b63274e7debe89d30854 /lib
parentf5a1fb6b247611b92d9dec9476202b477661dbe8 (diff)
add a simple helper method.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83745 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/Transforms/Utils/SSAUpdater.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/Transforms/Utils/SSAUpdater.cpp b/lib/Transforms/Utils/SSAUpdater.cpp
index 2fb742bb44..780ee26389 100644
--- a/lib/Transforms/Utils/SSAUpdater.cpp
+++ b/lib/Transforms/Utils/SSAUpdater.cpp
@@ -56,6 +56,12 @@ void SSAUpdater::Initialize(Value *ProtoValue) {
PrototypeValue = ProtoValue;
}
+/// HasValueForBlock - Return true if the SSAUpdater already has a value for
+/// the specified block.
+bool SSAUpdater::HasValueForBlock(BasicBlock *BB) const {
+ return getAvailableVals(AV).count(BB);
+}
+
/// AddAvailableValue - Indicate that a rewritten value is available in the
/// specified block with the specified value.
void SSAUpdater::AddAvailableValue(BasicBlock *BB, Value *V) {