summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Scalar/SCCP.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Transforms/Scalar/SCCP.cpp')
-rw-r--r--llvm/lib/Transforms/Scalar/SCCP.cpp13
1 files changed, 3 insertions, 10 deletions
diff --git a/llvm/lib/Transforms/Scalar/SCCP.cpp b/llvm/lib/Transforms/Scalar/SCCP.cpp
index 02ffad47bee..61905a34246 100644
--- a/llvm/lib/Transforms/Scalar/SCCP.cpp
+++ b/llvm/lib/Transforms/Scalar/SCCP.cpp
@@ -1766,11 +1766,8 @@ 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() || AI->getType()->isStructTy()) continue;
-
- // TODO: Could use getStructLatticeValueFor to find out if the entire
- // result is a constant and replace it entirely if so.
-
+ if (AI->use_empty())
+ continue;
if (tryToReplaceWithConstant(Solver, &*AI))
++IPNumArgsElimed;
}
@@ -1793,12 +1790,8 @@ static bool runIPSCCP(Module &M, const DataLayout &DL,
for (BasicBlock::iterator BI = BB->begin(), E = BB->end(); BI != E; ) {
Instruction *Inst = &*BI++;
- if (Inst->getType()->isVoidTy() || Inst->getType()->isStructTy())
+ if (Inst->getType()->isVoidTy())
continue;
-
- // TODO: Could use getStructLatticeValueFor to find out if the entire
- // result is a constant and replace it entirely if so.
-
if (tryToReplaceInstWithConstant(
Solver, Inst,
!isa<CallInst>(Inst) &&
OpenPOWER on IntegriCloud