diff options
author | Davide Italiano <davide@freebsd.org> | 2016-07-14 20:25:54 +0000 |
---|---|---|
committer | Davide Italiano <davide@freebsd.org> | 2016-07-14 20:25:54 +0000 |
commit | 6f73588fb9d1d9f555abd9ef3b44e92ff2d2a1b1 (patch) | |
tree | 01b7ec676e13133379eb60705a8bae7a879ec19d /llvm/lib/Transforms | |
parent | 40f993df25ab8aca38a089ab7d137ccc8dc7670d (diff) | |
download | bcm5719-llvm-6f73588fb9d1d9f555abd9ef3b44e92ff2d2a1b1.tar.gz bcm5719-llvm-6f73588fb9d1d9f555abd9ef3b44e92ff2d2a1b1.zip |
[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!
llvm-svn: 275468
Diffstat (limited to 'llvm/lib/Transforms')
-rw-r--r-- | llvm/lib/Transforms/Scalar/SCCP.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Transforms/Scalar/SCCP.cpp b/llvm/lib/Transforms/Scalar/SCCP.cpp index 6ef7a2013f0..d7a541dbe5c 100644 --- a/llvm/lib/Transforms/Scalar/SCCP.cpp +++ b/llvm/lib/Transforms/Scalar/SCCP.cpp @@ -1510,7 +1510,7 @@ bool SCCPSolver::ResolvedUndefsIn(Function &F) { return false; } -static bool tryToReplaceWithConstant(SCCPSolver Solver, Value *V) { +static bool tryToReplaceWithConstant(SCCPSolver &Solver, Value *V) { Constant *Const = nullptr; if (V->getType()->isStructTy()) { std::vector<LatticeVal> IVs = Solver.getStructLatticeValueFor(V); @@ -1540,7 +1540,7 @@ static bool tryToReplaceWithConstant(SCCPSolver Solver, Value *V) { return true; } -static bool tryToReplaceInstWithConstant(SCCPSolver Solver, Instruction *Inst, +static bool tryToReplaceInstWithConstant(SCCPSolver &Solver, Instruction *Inst, bool shouldEraseFromParent) { if (!tryToReplaceWithConstant(Solver, Inst)) return false; |