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 .
diff --git a/src/IceTargetLoweringARM32.cpp b/src/IceTargetLoweringARM32.cpp index f83eb59..237d085 100644 --- a/src/IceTargetLoweringARM32.cpp +++ b/src/IceTargetLoweringARM32.cpp
@@ -1058,12 +1058,12 @@ 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())