summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2005-02-23 16:53:04 +0000
committerChris Lattner <sabre@nondot.org>2005-02-23 16:53:04 +0000
commit25169caa805fa1abdb0383da83b3879bd249cd3d (patch)
tree1758ebc2bd053c15ede2bd0e61e805011d4f7ef3 /llvm/lib/Transforms
parentd36552f34f47200c344a4b39f66b1b8b51458bca (diff)
downloadbcm5719-llvm-25169caa805fa1abdb0383da83b3879bd249cd3d.tar.gz
bcm5719-llvm-25169caa805fa1abdb0383da83b3879bd249cd3d.zip
make this more efficient. Scan up to 16 nodes, not the whole list.
llvm-svn: 20289
Diffstat (limited to 'llvm/lib/Transforms')
-rw-r--r--llvm/lib/Transforms/IPO/GlobalOpt.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/IPO/GlobalOpt.cpp b/llvm/lib/Transforms/IPO/GlobalOpt.cpp
index 59ea4a6f6f0..4c874007296 100644
--- a/llvm/lib/Transforms/IPO/GlobalOpt.cpp
+++ b/llvm/lib/Transforms/IPO/GlobalOpt.cpp
@@ -377,7 +377,7 @@ static GlobalVariable *SRAGlobal(GlobalVariable *GV) {
else
assert(0 && "Unknown aggregate sequential type!");
- if (NumElements > 16 && GV->getNumUses() > 16)
+ if (NumElements > 16 && GV->hasNUsesOrMore(16))
return 0; // It's not worth it.
NewGlobals.reserve(NumElements);
for (unsigned i = 0, e = NumElements; i != e; ++i) {
OpenPOWER on IntegriCloud