diff options
author | Jakub Jelinek <jakub@redhat.com> | 2010-07-30 16:36:56 +0200 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2010-07-30 16:36:56 +0200 |
commit | f0fc0803eacde9850a7ff4a12d2f4ad29f1bcb2c (patch) | |
tree | 0a83c3adb8609c51590489ead2d7d994656b6183 /gcc/emit-rtl.c | |
parent | f53ea4f08975910c2e92eda9ebe0785845e42247 (diff) | |
download | gcc-f0fc0803eacde9850a7ff4a12d2f4ad29f1bcb2c.zip gcc-f0fc0803eacde9850a7ff4a12d2f4ad29f1bcb2c.tar.gz gcc-f0fc0803eacde9850a7ff4a12d2f4ad29f1bcb2c.tar.bz2 |
re PR debug/45055 (another -fcompare-debug failure with uninitialised read in walk_gimple_stmt)
PR debug/45055
PR rtl-optimization/45137
* rtl.h (prev_nonnote_nondebug_insn, next_nonnote_nondebug_insn): New
prototypes.
* emit-rtl.c (prev_nonnote_nondebug_insn, next_nonnote_nondebug_insn):
New functions.
* combine.c (next_nonnote_nondebug_insn): Removed.
* ifcvt.c (noce_process_if_block): Use prev_nonnote_nondebug_insn.
* haifa-sched.c (queue_to_ready): Use next_nonnote_nondebug_insn.
* sched-deps.c (sched_analyze_insn): Likewise.
(fixup_sched_groups, deps_start_bb): Use prev_nonnote_nondebug_insn.
* rtlanal.c (canonicalize_condition): Likewise.
* postreload.c (reload_combine_recognize_pattern): Likewise.
(reload_cse_move2add): Use next_nonnote_nondebug_insn.
* gcc.dg/pr45055.c: New test.
From-SVN: r162714
Diffstat (limited to 'gcc/emit-rtl.c')
-rw-r--r-- | gcc/emit-rtl.c | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/gcc/emit-rtl.c b/gcc/emit-rtl.c index 32741dc..fe8de9b 100644 --- a/gcc/emit-rtl.c +++ b/gcc/emit-rtl.c @@ -3135,6 +3135,38 @@ prev_nondebug_insn (rtx insn) return insn; } +/* Return the next insn after INSN that is not a NOTE nor DEBUG_INSN. + This routine does not look inside SEQUENCEs. */ + +rtx +next_nonnote_nondebug_insn (rtx insn) +{ + while (insn) + { + insn = NEXT_INSN (insn); + if (insn == 0 || (!NOTE_P (insn) && !DEBUG_INSN_P (insn))) + break; + } + + return insn; +} + +/* Return the previous insn before INSN that is not a NOTE nor DEBUG_INSN. + This routine does not look inside SEQUENCEs. */ + +rtx +prev_nonnote_nondebug_insn (rtx insn) +{ + while (insn) + { + insn = PREV_INSN (insn); + if (insn == 0 || (!NOTE_P (insn) && !DEBUG_INSN_P (insn))) + break; + } + + return insn; +} + /* Return the next INSN, CALL_INSN or JUMP_INSN after INSN; or 0, if there is none. This routine does not look inside SEQUENCEs. */ |