Commit 2943d77c by Jim Stichnoth

Subzero: Make liveness validation errors easier to interpret.

A portion of the translation workflow goes like this: dump #1 renumber instructions liveness + live range construction validateLiveness (exit on failure) dump #2 If there are liveness validation errors, instruction numbers are reported with respect to the new instruction numbers, yet the most recent dump output is with respect to the old instruction numbers. Confusion ensues. To fix this, we just do dump #2 before validateLiveness. BUG= none R=jpp@chromium.org Review URL: https://codereview.chromium.org/2080633004 .
parent c577727f
......@@ -1058,12 +1058,12 @@ void TargetARM32::translateO2() {
Func->liveness(Liveness_Intervals);
if (Func->hasError())
return;
// Validate the live range computations. The expensive validation call is
// deliberately only made when assertions are enabled.
assert(Func->validateLiveness());
// The post-codegen dump is done here, after liveness analysis and associated
// cleanup, to make the dump cleaner and more useful.
Func->dump("After initial ARM32 codegen");
// Validate the live range computations. The expensive validation call is
// deliberately only made when assertions are enabled.
assert(Func->validateLiveness());
Func->getVMetadata()->init(VMK_All);
regAlloc(RAK_Global);
if (Func->hasError())
......
......@@ -523,12 +523,12 @@ template <typename TraitsType> void TargetX86Base<TraitsType>::translateO2() {
Func->liveness(Liveness_Intervals);
if (Func->hasError())
return;
// Validate the live range computations. The expensive validation call is
// deliberately only made when assertions are enabled.
assert(Func->validateLiveness());
// The post-codegen dump is done here, after liveness analysis and associated
// cleanup, to make the dump cleaner and more useful.
Func->dump("After initial x8632 codegen");
// Validate the live range computations. The expensive validation call is
// deliberately only made when assertions are enabled.
assert(Func->validateLiveness());
Func->getVMetadata()->init(VMK_All);
regAlloc(RAK_Global);
if (Func->hasError())
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment