On 13-09-07 9:01 AM, Richard Sandiford wrote:
Jakub Jelinek <ja...@redhat.com> writes:
On Sat, Sep 07, 2013 at 12:37:14PM +0100, Richard Sandiford wrote:
Steven Bosscher <stevenb....@gmail.com> writes:
Can you please add a test case?
What kind of test would you suggest? Do we have a harness for testing
that -O2 and -O2 -g .text output is identical?
No, but we have -fcompare-debug, which is even stronger than that (compares
final RTL, so can catch even differences that aren't visible in the .s file,
but still are relevant). And, the default way of bootstrapping also
compares .text etc. after stripping, between stage2 (built without debug)
and stage3 (with debug).
Here's the patch again with an -fcompare-debug test. I spent a while
trying to whittle it down, but beyond this it gets very sensitive.
OK to install?
Ok. It looks reasonable for me too.
Thanks for the patch, Richard.
gcc/
* ira.c (update_equiv_regs): Only call set_paradoxical_subreg
for non-debug insns.
* lra.c (new_insn_reg): Take the containing insn as a parameter.
Only modify lra_reg_info[].biggest_mode if it's non-debug insn.
(collect_non_operand_hard_regs, add_regs_to_insn_regno_info): Update
accordingly.
gcc/testsuite/
* g++.dg/debug/ra1.C: New test.