Commit 51a904c9 by Zack Weinberg Committed by Zack Weinberg

basic-block.h (BB_SET_PARTITION): Clear old value first.

	* basic-block.h (BB_SET_PARTITION): Clear old value first.
	* cfg.c (clear_bb_flags): Don't clear partition setting.

From-SVN: r86537
parent 4c5f37d5
2004-08-25 Zack Weinberg <zack@codesourcery.com>
* basic-block.h (BB_SET_PARTITION): Clear old value first.
* cfg.c (clear_bb_flags): Don't clear partition setting.
2004-08-25 Alan Modra <amodra@bigpond.net.au> 2004-08-25 Alan Modra <amodra@bigpond.net.au>
PR target/17052 PR target/17052
......
...@@ -318,7 +318,12 @@ typedef struct reorder_block_def ...@@ -318,7 +318,12 @@ typedef struct reorder_block_def
/* Partitions, to be used when partitioning hot and cold basic blocks into /* Partitions, to be used when partitioning hot and cold basic blocks into
separate sections. */ separate sections. */
#define BB_PARTITION(bb) ((bb)->flags & (BB_HOT_PARTITION|BB_COLD_PARTITION)) #define BB_PARTITION(bb) ((bb)->flags & (BB_HOT_PARTITION|BB_COLD_PARTITION))
#define BB_SET_PARTITION(bb, part) ((bb)->flags |= (part)) #define BB_SET_PARTITION(bb, part) do { \
basic_block bb_ = (bb); \
bb_->flags = ((bb_->flags & ~(BB_HOT_PARTITION|BB_COLD_PARTITION)) \
| (part)); \
} while (0)
#define BB_COPY_PARTITION(dstbb, srcbb) \ #define BB_COPY_PARTITION(dstbb, srcbb) \
BB_SET_PARTITION (dstbb, BB_PARTITION (srcbb)) BB_SET_PARTITION (dstbb, BB_PARTITION (srcbb))
......
...@@ -462,13 +462,14 @@ redirect_edge_pred (edge e, basic_block new_pred) ...@@ -462,13 +462,14 @@ redirect_edge_pred (edge e, basic_block new_pred)
e->src = new_pred; e->src = new_pred;
} }
/* Clear all basic block flags, with the exception of partitioning. */
void void
clear_bb_flags (void) clear_bb_flags (void)
{ {
basic_block bb; basic_block bb;
FOR_BB_BETWEEN (bb, ENTRY_BLOCK_PTR, NULL, next_bb) FOR_BB_BETWEEN (bb, ENTRY_BLOCK_PTR, NULL, next_bb)
bb->flags = 0; bb->flags = BB_PARTITION (bb);
} }
/* Check the consistency of profile information. We can't do that /* Check the consistency of profile information. We can't do that
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment