[SCCP] Simplify the code a bit. NFCI.

llvm-svn: 305583
This commit is contained in:
Davide Italiano 2017-06-16 20:50:31 +00:00
parent 79ac99b3e8
commit ec5b0257bf
1 changed files with 3 additions and 7 deletions

View File

@ -1815,15 +1815,11 @@ static bool runIPSCCP(Module &M, const DataLayout &DL,
if (F.isDeclaration())
continue;
if (Solver.isBlockExecutable(&F.front())) {
if (Solver.isBlockExecutable(&F.front()))
for (Function::arg_iterator AI = F.arg_begin(), E = F.arg_end(); AI != E;
++AI) {
if (AI->use_empty())
continue;
if (tryToReplaceWithConstant(Solver, &*AI))
++AI)
if (!AI->use_empty() && tryToReplaceWithConstant(Solver, &*AI))
++IPNumArgsElimed;
}
}
for (Function::iterator BB = F.begin(), E = F.end(); BB != E; ++BB) {
if (!Solver.isBlockExecutable(&*BB)) {