From 2daa0fe12d450b31d9b79e66edd08e65623adbbc Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Sat, 10 Oct 2009 23:41:48 +0000 Subject: add a simple helper method. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83745 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Transforms/Utils/SSAUpdater.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'lib/Transforms') diff --git a/lib/Transforms/Utils/SSAUpdater.cpp b/lib/Transforms/Utils/SSAUpdater.cpp index 2fb742b..780ee26 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) { -- cgit v1.1