llvm.org GIT mirror llvm / f3702b6
[SCCP] Pass the Solver by reference, copies are expensive ... .. enough to cause LTO compile time to regress insanely. Thanks *a lot* to Rafael for reporting the problem and testing the fix! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@275468 91177308-0d34-0410-b5e6-96231b3b80d8 Davide Italiano 4 years ago
1 changed file(s) with 2 addition(s) and 2 deletion(s). Raw diff Collapse all Expand all
15091509 return false;
15101510 }
15111511
1512 static bool tryToReplaceWithConstant(SCCPSolver Solver, Value *V) {
1512 static bool tryToReplaceWithConstant(SCCPSolver &Solver, Value *V) {
15131513 Constant *Const = nullptr;
15141514 if (V->getType()->isStructTy()) {
15151515 std::vector IVs = Solver.getStructLatticeValueFor(V);
15391539 return true;
15401540 }
15411541
1542 static bool tryToReplaceInstWithConstant(SCCPSolver Solver, Instruction *Inst,
1542 static bool tryToReplaceInstWithConstant(SCCPSolver &Solver, Instruction *Inst,
15431543 bool shouldEraseFromParent) {
15441544 if (!tryToReplaceWithConstant(Solver, Inst))
15451545 return false;