diff options
author | Cary Coutant <ccoutant@google.com> | 2009-07-24 22:37:05 +0000 |
---|---|---|
committer | Cary Coutant <ccoutant@gcc.gnu.org> | 2009-07-24 15:37:05 -0700 |
commit | cbea518e5bed234467f0c1108a623fd49a251b80 (patch) | |
tree | 6458eefa49d090a1d57d4fe791e5a56f2a987f5e /gcc/tree-cfg.c | |
parent | 2e0814c8d67b6a80fc68cfefd90865bc4e2b87ec (diff) | |
download | gcc-cbea518e5bed234467f0c1108a623fd49a251b80.zip gcc-cbea518e5bed234467f0c1108a623fd49a251b80.tar.gz gcc-cbea518e5bed234467f0c1108a623fd49a251b80.tar.bz2 |
cfghooks.c (split_block): Copy discriminator to new block.
* cfghooks.c (split_block): Copy discriminator to new block.
* tree-cfg.c (assign_discriminator): Check location of last
instruction in block as well as first.
From-SVN: r150065
Diffstat (limited to 'gcc/tree-cfg.c')
-rw-r--r-- | gcc/tree-cfg.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/gcc/tree-cfg.c b/gcc/tree-cfg.c index 964a537..d818b6b 100644 --- a/gcc/tree-cfg.c +++ b/gcc/tree-cfg.c @@ -756,13 +756,15 @@ same_line_p (location_t locus1, location_t locus2) static void assign_discriminator (location_t locus, basic_block bb) { - gimple to_stmt; + gimple first_in_to_bb, last_in_to_bb; if (locus == 0 || bb->discriminator != 0) return; - to_stmt = first_non_label_stmt (bb); - if (to_stmt && same_line_p (locus, gimple_location (to_stmt))) + first_in_to_bb = first_non_label_stmt (bb); + last_in_to_bb = last_stmt (bb); + if (first_in_to_bb && same_line_p (locus, gimple_location (first_in_to_bb)) + || last_in_to_bb && same_line_p (locus, gimple_location (last_in_to_bb))) bb->discriminator = next_discriminator_for_locus (locus); } |