diff options
Diffstat (limited to 'src/jit/codegenlinear.cpp')
-rw-r--r-- | src/jit/codegenlinear.cpp | 29 |
1 files changed, 22 insertions, 7 deletions
diff --git a/src/jit/codegenlinear.cpp b/src/jit/codegenlinear.cpp index 2c0656d077..7da1896589 100644 --- a/src/jit/codegenlinear.cpp +++ b/src/jit/codegenlinear.cpp @@ -512,15 +512,30 @@ void CodeGen::genCodeForBBlist() // it up to date for vars that are not register candidates // (it would be nice to have a xor set function) - VARSET_TP extraLiveVars(VarSetOps::Diff(compiler, block->bbLiveOut, compiler->compCurLife)); - VarSetOps::UnionD(compiler, extraLiveVars, VarSetOps::Diff(compiler, compiler->compCurLife, block->bbLiveOut)); - VarSetOps::Iter extraLiveVarIter(compiler, extraLiveVars); - unsigned extraLiveVarIndex = 0; - while (extraLiveVarIter.NextElem(&extraLiveVarIndex)) + VARSET_TP mismatchLiveVars(VarSetOps::Diff(compiler, block->bbLiveOut, compiler->compCurLife)); + VarSetOps::UnionD(compiler, mismatchLiveVars, + VarSetOps::Diff(compiler, compiler->compCurLife, block->bbLiveOut)); + VarSetOps::Iter mismatchLiveVarIter(compiler, mismatchLiveVars); + unsigned mismatchLiveVarIndex = 0; + bool foundMismatchedRegVar = false; + while (mismatchLiveVarIter.NextElem(&mismatchLiveVarIndex)) { - unsigned varNum = compiler->lvaTrackedToVarNum[extraLiveVarIndex]; + unsigned varNum = compiler->lvaTrackedToVarNum[mismatchLiveVarIndex]; LclVarDsc* varDsc = compiler->lvaTable + varNum; - assert(!varDsc->lvIsRegCandidate()); + if (varDsc->lvIsRegCandidate()) + { + if (!foundMismatchedRegVar) + { + JITDUMP("Mismatched live reg vars after BB%02u:", block->bbNum); + foundMismatchedRegVar = true; + } + JITDUMP(" V%02u", varNum); + } + } + if (foundMismatchedRegVar) + { + assert(!"Found mismatched live reg var(s) after block"); + JITDUMP("\n"); } #endif |