projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
26917db
)
[SCCP] If we replace with a constant, we can't replace with a range.
author
Davide Italiano
<davide@freebsd.org>
Tue, 21 Nov 2017 00:21:52 +0000
(
00:21
+0000)
committer
Davide Italiano
<davide@freebsd.org>
Tue, 21 Nov 2017 00:21:52 +0000
(
00:21
+0000)
This microoptimization is NFC.
llvm-svn: 318711
llvm/lib/Transforms/Scalar/SCCP.cpp
patch
|
blob
|
history
diff --git
a/llvm/lib/Transforms/Scalar/SCCP.cpp
b/llvm/lib/Transforms/Scalar/SCCP.cpp
index
1e4bf2e
..
192ba13
100644
(file)
--- a/
llvm/lib/Transforms/Scalar/SCCP.cpp
+++ b/
llvm/lib/Transforms/Scalar/SCCP.cpp
@@
-1866,8
+1866,10
@@
static bool runIPSCCP(Module &M, const DataLayout &DL,
if (Solver.isBlockExecutable(&F.front()))
for (Function::arg_iterator AI = F.arg_begin(), E = F.arg_end(); AI != E;
++AI) {
- if (!AI->use_empty() && tryToReplaceWithConstant(Solver, &*AI))
+ if (!AI->use_empty() && tryToReplaceWithConstant(Solver, &*AI))
{
++IPNumArgsElimed;
+ continue;
+ }
if (!AI->use_empty() && tryToReplaceWithConstantRange(Solver, &*AI))
++IPNumRangeInfoUsed;