From 74eb5d71a3c698ad9a1b44603018b530c825f249 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Fri, 30 Oct 2009 22:33:29 +0000 Subject: make hasAddressTaken() constant time by storing a refcount in BB's subclass data. llvm-svn: 85625 --- llvm/lib/VMCore/BasicBlock.cpp | 8 -------- 1 file changed, 8 deletions(-) (limited to 'llvm/lib/VMCore/BasicBlock.cpp') 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(*I)) - return true; - return false; -} -- cgit v1.2.3