summaryrefslogtreecommitdiff
path: root/gcc/tree-phinodes.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/tree-phinodes.c')
-rw-r--r--gcc/tree-phinodes.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/gcc/tree-phinodes.c b/gcc/tree-phinodes.c
index 2cef1c4ab23..da7bf5be978 100644
--- a/gcc/tree-phinodes.c
+++ b/gcc/tree-phinodes.c
@@ -25,6 +25,7 @@ along with GCC; see the file COPYING3. If not see
#include "ggc.h"
#include "basic-block.h"
#include "gimple.h"
+#include "gimple-iterator.h"
#include "gimple-ssa.h"
#include "tree-phinodes.h"
#include "ssa-iterators.h"
@@ -504,5 +505,18 @@ degenerate_phi_result (gimple phi)
return (i == gimple_phi_num_args (phi) ? val : NULL);
}
+/* Set PHI nodes of a basic block BB to SEQ. */
+
+void
+set_phi_nodes (basic_block bb, gimple_seq seq)
+{
+ gimple_stmt_iterator i;
+
+ gcc_checking_assert (!(bb->flags & BB_RTL));
+ bb->il.gimple.phi_nodes = seq;
+ if (seq)
+ for (i = gsi_start (seq); !gsi_end_p (i); gsi_next (&i))
+ gimple_set_bb (gsi_stmt (i), bb);
+}
#include "gt-tree-phinodes.h"