mirror of
https://github.com/RPCS3/llvm.git
synced 2025-01-08 13:00:50 +00:00
[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
This commit is contained in:
parent
a43274d789
commit
f3702b696c
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user