This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[dataflow] some inlines


This cannot hurt, I'm going ahead and committing it
as soon as bootstrap/regtest finishes.

Paolo
2007-03-28  Paolo Bonzini  <bonzini@gnu.org>

	* df.h (df_ru_get_bb_info, df_rd_get_bb_info, df_lr_get_bb_info,
	df_ur_get_bb_info, df_live_get_bb_info, df_urec_get_bb_info,
	df_scan_get_bb_info): New inlines.
	* df-problems.c (df_ru_get_bb_info, df_rd_get_bb_info,
	df_lr_get_bb_info, df_ur_get_bb_info, df_live_get_bb_info,
	df_urec_get_bb_info, df_scan_get_bb_info): Delete.

Index: df.h
===================================================================
--- df.h	(revision 123155)
+++ df.h	(working copy)
@@ -526,6 +526,80 @@ struct df
   enum df_changeable_flags changeable_flags;
 };
 
+/* Get basic block info.  */
+
+static inline struct df_ru_bb_info *
+df_ru_get_bb_info (unsigned int index)
+{
+  if (index < df_ru->block_info_size)
+    return (struct df_ru_bb_info *) df_ru->block_info[index];
+  else
+    return NULL;
+}
+
+static inline struct df_rd_bb_info *
+df_rd_get_bb_info (unsigned int index)
+{
+  if (index < df_rd->block_info_size)
+    return (struct df_rd_bb_info *) df_rd->block_info[index];
+  else
+    return NULL;
+}
+
+static inline struct df_lr_bb_info *
+df_lr_get_bb_info (unsigned int index)
+{
+  if (index < df_lr->block_info_size)
+    return (struct df_lr_bb_info *) df_lr->block_info[index];
+  else
+    return NULL;
+}
+
+static inline struct df_ur_bb_info *
+df_ur_get_bb_info (unsigned int index)
+{
+  if (index < df_ur->block_info_size)
+    return (struct df_ur_bb_info *) df_ur->block_info[index];
+  else
+    return NULL;
+}
+
+static inline struct df_live_bb_info *
+df_live_get_bb_info (unsigned int index)
+{
+  if (index < df_live->block_info_size)
+    return (struct df_live_bb_info *) df_live->block_info[index];
+  else
+    return NULL;
+}
+
+static inline struct df_urec_bb_info *
+df_urec_get_bb_info (unsigned int index)
+{
+  if (index < df_urec->block_info_size)
+    return (struct df_urec_bb_info *) df_urec->block_info[index];
+  else
+    return NULL;
+}
+
+static inline struct df_ru_bb_info *
+df_ru_get_bb_info (unsigned int index)
+{
+  if (index < df_ru->block_info_size)
+    return (struct df_ru_bb_info *) df_ru->block_info[index];
+  else
+    return NULL;
+}
+
+static inline struct df_rd_bb_info *
+df_rd_get_bb_info (unsigned int index)
+{
+  if (index < df_rd->block_info_size)
+    return (struct df_rd_bb_info *) df_rd->block_info[index];
+  else
+    return NULL;
+}
+
 #define DF_SCAN_BB_INFO(BB) (df_scan_get_bb_info((BB)->index))
 #define DF_RU_BB_INFO(BB) (df_ru_get_bb_info((BB)->index))
 #define DF_RD_BB_INFO(BB) (df_rd_get_bb_info((BB)->index))
@@ -888,21 +962,15 @@ extern void df_grow_bb_info (struct data
 extern void df_chain_dump (struct df_link *, FILE *);
 extern void df_print_bb_index (basic_block bb, FILE *file);
 extern void df_ru_add_problem (void);
-extern struct df_ru_bb_info *df_ru_get_bb_info (unsigned int);
 extern void df_rd_add_problem (void);
-extern struct df_rd_bb_info *df_rd_get_bb_info (unsigned int);
-extern struct df_lr_bb_info *df_lr_get_bb_info (unsigned int);
 extern void df_lr_simulate_artificial_refs_at_end (basic_block, bitmap);
 extern void df_lr_simulate_one_insn (basic_block, rtx, bitmap);
 extern void df_lr_add_problem (void);
 extern void df_lr_verify_transfer_functions (void);
 extern void df_ur_add_problem (void);
 extern void df_ur_verify_transfer_functions (void);
-extern struct df_ur_bb_info *df_ur_get_bb_info (unsigned int);
 extern void df_live_add_problem (void);
-extern struct df_live_bb_info *df_live_get_bb_info (unsigned int);
 extern void df_urec_add_problem (void);
-extern struct df_urec_bb_info *df_urec_get_bb_info (unsigned int);
 extern void df_chain_add_problem (enum df_chain_flags);
 extern void df_ri_add_problem (enum df_ri_flags);
 extern bitmap df_ri_get_setjmp_crosses (void);
@@ -910,7 +978,6 @@ extern bitmap df_ri_get_setjmp_crosses (
 /* Functions defined in df-scan.c.  */
 
 extern void df_scan_alloc (bitmap);
-extern struct df_scan_bb_info *df_scan_get_bb_info (unsigned int);
 extern void df_scan_add_problem (void);
 extern void df_grow_reg_info (void);
 extern void df_grow_insn_info (void);

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]