diff options
| author | Andrew Lenharth <andrewl@lenharth.org> | 2006-04-13 13:43:31 +0000 |
|---|---|---|
| committer | Andrew Lenharth <andrewl@lenharth.org> | 2006-04-13 13:43:31 +0000 |
| commit | 92cf71f6d799faf27ac7c3847bd0ef64dd02070f (patch) | |
| tree | f16a02e0bcd4ec7218f391d37fd42f78cb7c5ded /llvm/lib/Transforms | |
| parent | 9857229ababc3d90cd2307f8301079817cdc002d (diff) | |
| download | bcm5719-llvm-92cf71f6d799faf27ac7c3847bd0ef64dd02070f.tar.gz bcm5719-llvm-92cf71f6d799faf27ac7c3847bd0ef64dd02070f.zip | |
linear -> constant time
llvm-svn: 27652
Diffstat (limited to 'llvm/lib/Transforms')
| -rw-r--r-- | llvm/lib/Transforms/IPO/IndMemRemoval.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/Transforms/IPO/IndMemRemoval.cpp b/llvm/lib/Transforms/IPO/IndMemRemoval.cpp index 84a43072289..b5d0195a298 100644 --- a/llvm/lib/Transforms/IPO/IndMemRemoval.cpp +++ b/llvm/lib/Transforms/IPO/IndMemRemoval.cpp @@ -51,11 +51,11 @@ bool IndMemRemPass::runOnModule(Module &M) { //to intrinsics. Therefor, this goes through and finds where the //address of free or malloc are taken and replaces those with bounce //functions, ensuring that all malloc and free that might happen - //happens through intrinsics. + //happen through intrinsics. bool changed = false; if (Function* F = M.getNamedFunction("free")) { assert(F->isExternal() && "free not external?"); - if (F->getNumUses()) { + if (!F->use_empty()) { Function* FN = new Function(F->getFunctionType(), GlobalValue::LinkOnceLinkage, "free_llvm_bounce", &M); @@ -70,7 +70,7 @@ bool IndMemRemPass::runOnModule(Module &M) { } if (Function* F = M.getNamedFunction("malloc")) { assert(F->isExternal() && "malloc not external?"); - if (F->getNumUses()) { + if (!F->use_empty()) { Function* FN = new Function(F->getFunctionType(), GlobalValue::LinkOnceLinkage, "malloc_llvm_bounce", &M); |

