mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-01-27 10:44:13 +08:00
re PR rtl-optimization/12628 (Segfault with -fno-expensive-optimizations -fno-rerun-loop-opt)
PR optimization/12628 * toplev.c (rest_of_handle_jump_bypass): Call reg_scan. * regclass.c (reg_scan): Include allocate_reg_info time in TV_REG_SCAN. Minor clean-ups. (reg_scan_update): Minor clean-ups. * gcc.dg/20031201-1.c: New test case. From-SVN: r74125
This commit is contained in:
parent
ea91ed0989
commit
28cb2b1448
@ -1,3 +1,11 @@
|
||||
2003-12-01 Roger Sayle <roger@eyesopen.com>
|
||||
|
||||
PR optimization/12628
|
||||
* toplev.c (rest_of_handle_jump_bypass): Call reg_scan.
|
||||
* regclass.c (reg_scan): Include allocate_reg_info time in
|
||||
TV_REG_SCAN. Minor clean-ups.
|
||||
(reg_scan_update): Minor clean-ups.
|
||||
|
||||
2003-12-01 Ulrich Weigand <uweigand@de.ibm.com>
|
||||
|
||||
* config.gcc (s390x-ibm-tpf*): Add extra_parts.
|
||||
|
@ -2293,21 +2293,20 @@ reg_scan (rtx f, unsigned int nregs, int repeat ATTRIBUTE_UNUSED)
|
||||
{
|
||||
rtx insn;
|
||||
|
||||
timevar_push (TV_REG_SCAN);
|
||||
|
||||
allocate_reg_info (nregs, TRUE, FALSE);
|
||||
max_parallel = 3;
|
||||
max_set_parallel = 0;
|
||||
|
||||
timevar_push (TV_REG_SCAN);
|
||||
|
||||
for (insn = f; insn; insn = NEXT_INSN (insn))
|
||||
if (GET_CODE (insn) == INSN
|
||||
|| GET_CODE (insn) == CALL_INSN
|
||||
|| GET_CODE (insn) == JUMP_INSN)
|
||||
if (INSN_P (insn))
|
||||
{
|
||||
if (GET_CODE (PATTERN (insn)) == PARALLEL
|
||||
&& XVECLEN (PATTERN (insn), 0) > max_parallel)
|
||||
max_parallel = XVECLEN (PATTERN (insn), 0);
|
||||
reg_scan_mark_refs (PATTERN (insn), insn, 0, 0);
|
||||
rtx pat = PATTERN (insn);
|
||||
if (GET_CODE (pat) == PARALLEL
|
||||
&& XVECLEN (pat, 0) > max_parallel)
|
||||
max_parallel = XVECLEN (pat, 0);
|
||||
reg_scan_mark_refs (pat, insn, 0, 0);
|
||||
|
||||
if (REG_NOTES (insn))
|
||||
reg_scan_mark_refs (REG_NOTES (insn), insn, 1, 0);
|
||||
@ -2331,14 +2330,13 @@ reg_scan_update (rtx first, rtx last, unsigned int old_max_regno)
|
||||
allocate_reg_info (max_reg_num (), FALSE, FALSE);
|
||||
|
||||
for (insn = first; insn != last; insn = NEXT_INSN (insn))
|
||||
if (GET_CODE (insn) == INSN
|
||||
|| GET_CODE (insn) == CALL_INSN
|
||||
|| GET_CODE (insn) == JUMP_INSN)
|
||||
if (INSN_P (insn))
|
||||
{
|
||||
if (GET_CODE (PATTERN (insn)) == PARALLEL
|
||||
&& XVECLEN (PATTERN (insn), 0) > max_parallel)
|
||||
max_parallel = XVECLEN (PATTERN (insn), 0);
|
||||
reg_scan_mark_refs (PATTERN (insn), insn, 0, old_max_regno);
|
||||
rtx pat = PATTERN (insn);
|
||||
if (GET_CODE (pat) == PARALLEL
|
||||
&& XVECLEN (pat, 0) > max_parallel)
|
||||
max_parallel = XVECLEN (pat, 0);
|
||||
reg_scan_mark_refs (pat, insn, 0, old_max_regno);
|
||||
|
||||
if (REG_NOTES (insn))
|
||||
reg_scan_mark_refs (REG_NOTES (insn), insn, 1, old_max_regno);
|
||||
|
@ -1,3 +1,8 @@
|
||||
2003-12-01 Roger Sayle <roger@eyesopen.com>
|
||||
|
||||
PR optimization/12628
|
||||
* gcc.dg/20031201-1.c: New test case.
|
||||
|
||||
2003-12-01 Eric Botcazou <ebotcazou@libertysurf.fr>
|
||||
|
||||
* gcc.dg/unaligned-1.c: New test.
|
||||
|
20
gcc/testsuite/gcc.dg/20031201-1.c
Normal file
20
gcc/testsuite/gcc.dg/20031201-1.c
Normal file
@ -0,0 +1,20 @@
|
||||
/* PR optimization/12628 */
|
||||
/* The following test used to ICE in init_alias_analysis because the
|
||||
given command line options meant that reg_scan wasn't (re)run before
|
||||
the jump bypassing pass. */
|
||||
|
||||
/* { dg-do compile } */
|
||||
/* { dg-options "-O2 -fno-expensive-optimizations -fno-rerun-loop-opt" } */
|
||||
|
||||
int outbuf[100];
|
||||
int outcnt;
|
||||
int bi_buf;
|
||||
void send_bits(void)
|
||||
{
|
||||
bi_buf = 0;
|
||||
outbuf[outcnt++] = 8;
|
||||
outbuf[outcnt++] = 8;
|
||||
if (outcnt)
|
||||
bi_buf = 1;
|
||||
}
|
||||
|
@ -2571,6 +2571,7 @@ rest_of_handle_jump_bypass (tree decl, rtx insns)
|
||||
open_dump_file (DFI_bypass, decl);
|
||||
|
||||
cleanup_cfg (CLEANUP_EXPENSIVE);
|
||||
reg_scan (insns, max_reg_num (), 1);
|
||||
|
||||
if (bypass_jumps (rtl_dump_file))
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user