diff options
author | sayle <sayle@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-12-01 21:16:59 +0000 |
---|---|---|
committer | sayle <sayle@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-12-01 21:16:59 +0000 |
commit | a66cff91ecc1857e21bbcc2512c55508cfdd0902 (patch) | |
tree | 18d957d9350eae5a5ed2e6da6f7043459bd714b7 /gcc/regclass.c | |
parent | 1e2e4c80921d7ea214262a3bb0cb45ad3180390a (diff) | |
download | gcc-a66cff91ecc1857e21bbcc2512c55508cfdd0902.tar.gz |
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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@74125 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/regclass.c')
-rw-r--r-- | gcc/regclass.c | 30 |
1 files changed, 14 insertions, 16 deletions
diff --git a/gcc/regclass.c b/gcc/regclass.c index f16f03aa1b6..c2da744ca95 100644 --- a/gcc/regclass.c +++ b/gcc/regclass.c @@ -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); |