diff options
| author | Chris Lattner <sabre@nondot.org> | 2009-10-10 23:41:48 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2009-10-10 23:41:48 +0000 |
| commit | 9c382cebc5ec8ff2f81840967f7acf0de4e3ceca (patch) | |
| tree | e09c985409e9d209187a412c06d39e459ec75b85 /llvm/lib/Transforms | |
| parent | 249265de06c3287a48f701c830e4a01f91bd9886 (diff) | |
| download | bcm5719-llvm-9c382cebc5ec8ff2f81840967f7acf0de4e3ceca.tar.gz bcm5719-llvm-9c382cebc5ec8ff2f81840967f7acf0de4e3ceca.zip | |
add a simple helper method.
llvm-svn: 83745
Diffstat (limited to 'llvm/lib/Transforms')
| -rw-r--r-- | llvm/lib/Transforms/Utils/SSAUpdater.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/llvm/lib/Transforms/Utils/SSAUpdater.cpp b/llvm/lib/Transforms/Utils/SSAUpdater.cpp index 2fb742bb445..780ee263894 100644 --- a/llvm/lib/Transforms/Utils/SSAUpdater.cpp +++ b/llvm/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) { |

