diff options
author | Eric Botcazou <ebotcazou@adacore.com> | 2014-06-06 07:32:25 +0000 |
---|---|---|
committer | Eric Botcazou <ebotcazou@gcc.gnu.org> | 2014-06-06 07:32:25 +0000 |
commit | ffa4602f4d54c80b978b3f6c8c376fbf75b72277 (patch) | |
tree | fc8f51ea70b82f892ac226dafb7defa86a52c93b /gcc/cfgcleanup.c | |
parent | 28a4a292fc1717544e68ed2f6107b3f0cbe10aed (diff) | |
download | gcc-ffa4602f4d54c80b978b3f6c8c376fbf75b72277.zip gcc-ffa4602f4d54c80b978b3f6c8c376fbf75b72277.tar.gz gcc-ffa4602f4d54c80b978b3f6c8c376fbf75b72277.tar.bz2 |
rtl.h (insn_location): Declare.
* rtl.h (insn_location): Declare.
* cfgcleanup.c (try_forward_edges): Compare the locus of locations
with UNKNOWN_LOCATION.
* emit-rtl.c (insn_location): New function.
* final.c (notice_source_line): Check that the instruction has a
location before retrieving it and use insn_location.
* modulo-sched.c (loop_single_full_bb_p): Likewise.
* print-rtl.c (print_rtx): Likewise.
From-SVN: r211305
Diffstat (limited to 'gcc/cfgcleanup.c')
-rw-r--r-- | gcc/cfgcleanup.c | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/gcc/cfgcleanup.c b/gcc/cfgcleanup.c index 7c24a6d..26dfbe6 100644 --- a/gcc/cfgcleanup.c +++ b/gcc/cfgcleanup.c @@ -482,31 +482,30 @@ try_forward_edges (int mode, basic_block b) location_t new_locus = single_succ_edge (target)->goto_locus; location_t locus = goto_locus; - if (new_locus != UNKNOWN_LOCATION - && locus != UNKNOWN_LOCATION + if (LOCATION_LOCUS (new_locus) != UNKNOWN_LOCATION + && LOCATION_LOCUS (locus) != UNKNOWN_LOCATION && new_locus != locus) new_target = NULL; else { - rtx last; - - if (new_locus != UNKNOWN_LOCATION) + if (LOCATION_LOCUS (new_locus) != UNKNOWN_LOCATION) locus = new_locus; - last = BB_END (target); + rtx last = BB_END (target); if (DEBUG_INSN_P (last)) last = prev_nondebug_insn (last); + if (last && INSN_P (last)) + new_locus = INSN_LOCATION (last); + else + new_locus = UNKNOWN_LOCATION; - new_locus = last && INSN_P (last) - ? INSN_LOCATION (last) : 0; - - if (new_locus != UNKNOWN_LOCATION - && locus != UNKNOWN_LOCATION + if (LOCATION_LOCUS (new_locus) != UNKNOWN_LOCATION + && LOCATION_LOCUS (locus) != UNKNOWN_LOCATION && new_locus != locus) new_target = NULL; else { - if (new_locus != UNKNOWN_LOCATION) + if (LOCATION_LOCUS (new_locus) != UNKNOWN_LOCATION) locus = new_locus; goto_locus = locus; |