projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6e8410a
)
replace a loop with a constant time check.
author
Chris Lattner
<sabre@nondot.org>
Fri, 11 Jan 2008 18:55:10 +0000
(18:55 +0000)
committer
Chris Lattner
<sabre@nondot.org>
Fri, 11 Jan 2008 18:55:10 +0000
(18:55 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45875
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/Transforms/IPO/ArgumentPromotion.cpp
patch
|
blob
|
history
diff --git
a/lib/Transforms/IPO/ArgumentPromotion.cpp
b/lib/Transforms/IPO/ArgumentPromotion.cpp
index 91b3766fa20e63bafe8c49a5e077f62cee90d503..071d0e92cbbeee9eeba8257b9ddbf139cde00804 100644
(file)
--- a/
lib/Transforms/IPO/ArgumentPromotion.cpp
+++ b/
lib/Transforms/IPO/ArgumentPromotion.cpp
@@
-125,9
+125,8
@@
bool ArgPromotion::PromoteArguments(CallGraphNode *CGN) {
// Ensure that this call site is CALLING the function, not passing it as
// an argument.
- for (CallSite::arg_iterator AI = CS.arg_begin(), E = CS.arg_end();
- AI != E; ++AI)
- if (*AI == F) return false; // Passing the function address in!
+ if (UI.getOperandNo() != 0)
+ return false;
}
// Check to see which arguments are promotable. If an argument is not