summaryrefslogtreecommitdiff
path: root/gcc/df.h
diff options
context:
space:
mode:
authorSteven Bosscher <steven@gcc.gnu.org>2012-10-14 19:30:59 +0000
committerSteven Bosscher <steven@gcc.gnu.org>2012-10-14 19:30:59 +0000
commitbf744527f1616d14a437abd9c8e5d16cd55b76a3 (patch)
tree3654fdb428a81ff03c682364de4dd6c378669f51 /gcc/df.h
parent6e74642b2c37305436269a8c036f1519b4c8c111 (diff)
re PR rtl-optimization/38711 (ira should not be using df-lr except at -O1.)
PR rtl-optimization/38711 * df.h (df_get_live_out, df_get_live_in): Make static inline functions. * df-problems.c (df_get_live_out, df_get_live_in): Moved to df.h. * ira-lives.c (process_bb_node_lives): Use df_get_live_out instead of DF_LR_OUT. * ira-build.c (create_bb_allocnos): Likewise. (create_loop_allocnos): Likewise, and use df_get_live_in instead of DF_LR_IN. * ira-emit.c (generate_edge_moves): Likewise. (add_ranges_and_copies): Likewise. * ira-color.c (ira_loop_edge_freq): Use df_get_live_out instead of DF_LR_OUT, and df_get_live_in instead of DF_LR_IN. * ira.c (mark_elimination): Update DF_LR and DF_LIVE. (build_insn_chain): Use df_get_live_out instead of DF_LR_OUT. (do_reload): Remove the DF_LIVE problem for -O1. From-SVN: r192440
Diffstat (limited to 'gcc/df.h')
-rw-r--r--gcc/df.h40
1 files changed, 37 insertions, 3 deletions
diff --git a/gcc/df.h b/gcc/df.h
index e7031d0bb2f..c0902b16d7a 100644
--- a/gcc/df.h
+++ b/gcc/df.h
@@ -951,8 +951,6 @@ extern void debug_df_chain (struct df_link *);
extern struct df_link *df_chain_create (df_ref, df_ref);
extern void df_chain_unlink (df_ref);
extern void df_chain_copy (df_ref, struct df_link *);
-extern bitmap df_get_live_in (basic_block);
-extern bitmap df_get_live_out (basic_block);
extern void df_grow_bb_info (struct dataflow *);
extern void df_chain_dump (struct df_link *, FILE *);
extern void df_print_bb_index (basic_block bb, FILE *file);
@@ -1023,7 +1021,10 @@ extern void df_compute_regs_ever_live (bool);
extern bool df_read_modify_subreg_p (rtx);
extern void df_scan_verify (void);
-/* Get basic block info. */
+
+/*----------------------------------------------------------------------------
+ Public functions access functions for the dataflow problems.
+----------------------------------------------------------------------------*/
static inline struct df_scan_bb_info *
df_scan_get_bb_info (unsigned int index)
@@ -1079,6 +1080,39 @@ df_word_lr_get_bb_info (unsigned int index)
return NULL;
}
+/* Get the live at out set for BB no matter what problem happens to be
+ defined. This function is used by the register allocators who
+ choose different dataflow problems depending on the optimization
+ level. */
+
+static inline bitmap
+df_get_live_out (basic_block bb)
+{
+ gcc_checking_assert (df_lr);
+
+ if (df_live)
+ return DF_LIVE_OUT (bb);
+ else
+ return DF_LR_OUT (bb);
+}
+
+/* Get the live at in set for BB no matter what problem happens to be
+ defined. This function is used by the register allocators who
+ choose different dataflow problems depending on the optimization
+ level. */
+
+static inline bitmap
+df_get_live_in (basic_block bb)
+{
+ gcc_checking_assert (df_lr);
+
+ if (df_live)
+ return DF_LIVE_IN (bb);
+ else
+ return DF_LR_IN (bb);
+}
+
+/* Get basic block info. */
/* Get the artificial defs for a basic block. */
static inline df_ref *