From: Julian Seward Date: Wed, 9 Feb 2005 19:13:29 +0000 (+0000) Subject: Print useful diagnostics if reg-alloc bombs due to bogus live ranges X-Git-Tag: svn/VALGRIND_3_0_1^2~457 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ea1f136cd7b1d231f7f3130e399c97aef6fa4dd3;p=thirdparty%2Fvalgrind.git Print useful diagnostics if reg-alloc bombs due to bogus live ranges in the input code. git-svn-id: svn://svn.valgrind.org/vex/trunk@877 --- diff --git a/VEX/priv/host-generic/reg_alloc2.c b/VEX/priv/host-generic/reg_alloc2.c index 7e98067fcf..ecc82551fe 100644 --- a/VEX/priv/host-generic/reg_alloc2.c +++ b/VEX/priv/host-generic/reg_alloc2.c @@ -492,15 +492,29 @@ HInstrArray* doRegisterAllocation ( rreg_dead_before[k] = ii+1; break; case HRmRead: - if (rreg_live_after[k] == INVALID_INSTRNO) + if (rreg_live_after[k] == INVALID_INSTRNO) { + vex_printf("\nOFFENDING RREG = "); + (*ppReg)(available_real_regs[k]); + vex_printf("\n"); + vex_printf("\nOFFENDING instr = "); + (*ppInstr)(instrs_in->arr[ii]); + vex_printf("\n"); vpanic("doRegisterAllocation: " "first event for rreg is Read"); + } rreg_dead_before[k] = ii+1; break; case HRmModify: - if (rreg_live_after[k] == INVALID_INSTRNO) + if (rreg_live_after[k] == INVALID_INSTRNO) { + vex_printf("\nOFFENDING RREG = "); + (*ppReg)(available_real_regs[k]); + vex_printf("\n"); + vex_printf("\nOFFENDING instr = "); + (*ppInstr)(instrs_in->arr[ii]); + vex_printf("\n"); vpanic("doRegisterAllocation: " "first event for rreg is Modify"); + } rreg_dead_before[k] = ii+1; break; default: