diff options
author | Chris Lattner <sabre@nondot.org> | 2009-10-30 22:33:29 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-10-30 22:33:29 +0000 |
commit | 74eb5d71a3c698ad9a1b44603018b530c825f249 (patch) | |
tree | 7c86d6e9c36476aae52053703e6f61baec7a70a0 /llvm/lib/VMCore/BasicBlock.cpp | |
parent | c7415bf53612bf48cfc4eae140996ef6955b03f1 (diff) | |
download | bcm5719-llvm-74eb5d71a3c698ad9a1b44603018b530c825f249.tar.gz bcm5719-llvm-74eb5d71a3c698ad9a1b44603018b530c825f249.zip |
make hasAddressTaken() constant time by storing a refcount in BB's subclass data.
llvm-svn: 85625
Diffstat (limited to 'llvm/lib/VMCore/BasicBlock.cpp')
-rw-r--r-- | llvm/lib/VMCore/BasicBlock.cpp | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/llvm/lib/VMCore/BasicBlock.cpp b/llvm/lib/VMCore/BasicBlock.cpp index ede2d124510..e8069c0f053 100644 --- a/llvm/lib/VMCore/BasicBlock.cpp +++ b/llvm/lib/VMCore/BasicBlock.cpp @@ -278,11 +278,3 @@ BasicBlock *BasicBlock::splitBasicBlock(iterator I, const Twine &BBName) { return New; } -/// hasAddressTaken - returns true if there are any uses of this basic block -/// other than direct branches, switches, etc. to it. -bool BasicBlock::hasAddressTaken() const { - for (Value::use_const_iterator I = use_begin(), E = use_end(); I != E; ++I) - if (isa<BlockAddress>(*I)) - return true; - return false; -} |