summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordmalcolm <dmalcolm@138bc75d-0d04-0410-961f-82ee72b054a4>2014-09-05 14:19:35 +0000
committerdmalcolm <dmalcolm@138bc75d-0d04-0410-961f-82ee72b054a4>2014-09-05 14:19:35 +0000
commit50876c20b0eda33ced2d6c8163232f597a767742 (patch)
tree799808559635f7ac9d1292343c33da8e98893afb
parenta5412d60c609db239430746e571acd32cd3a0ef1 (diff)
downloadgcc-50876c20b0eda33ced2d6c8163232f597a767742.tar.gz
Convert set_block_for_insn from a macro to an inline function
gcc/ChangeLog: 2014-09-05 David Malcolm <dmalcolm@redhat.com> * basic-block.h (set_block_for_insn): Eliminate this macro in favor of... * rtl.h (set_block_for_insn): New inline function, imposing the requirement that the "insn" param is an rtx_insn *. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@214963 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog7
-rw-r--r--gcc/basic-block.h2
-rw-r--r--gcc/rtl.h5
3 files changed, 12 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 6ca2c64d235..0a7e49957ae 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,12 @@
2014-09-05 David Malcolm <dmalcolm@redhat.com>
+ * basic-block.h (set_block_for_insn): Eliminate this macro in
+ favor of...
+ * rtl.h (set_block_for_insn): New inline function, imposing the
+ requirement that the "insn" param is an rtx_insn *.
+
+2014-09-05 David Malcolm <dmalcolm@redhat.com>
+
* caller-save.c (setup_save_areas): Strengthen local "insn" from
rtx to rtx_insn *.
* final.c (get_call_reg_set_usage): Likewise for first param,
diff --git a/gcc/basic-block.h b/gcc/basic-block.h
index dd727c2776f..fb1c498bb5d 100644
--- a/gcc/basic-block.h
+++ b/gcc/basic-block.h
@@ -385,8 +385,6 @@ struct GTY(()) control_flow_graph {
/* The two blocks that are always in the cfg. */
#define NUM_FIXED_BLOCKS (2)
-#define set_block_for_insn(INSN, BB) (BLOCK_FOR_INSN (INSN) = BB)
-
extern void compute_bb_for_insn (void);
extern unsigned int free_bb_for_insn (void);
extern void update_bb_for_insn (basic_block);
diff --git a/gcc/rtl.h b/gcc/rtl.h
index cd2f2e7ae15..b36fc3dfed4 100644
--- a/gcc/rtl.h
+++ b/gcc/rtl.h
@@ -1353,6 +1353,11 @@ inline basic_block& BLOCK_FOR_INSN (rtx insn)
return XBBDEF (insn, 2);
}
+inline void set_block_for_insn (rtx_insn *insn, basic_block bb)
+{
+ BLOCK_FOR_INSN (insn) = bb;
+}
+
/* The body of an insn. */
inline rtx PATTERN (const_rtx insn)
{