/* Convert a program in SSA form into Normal form.
- Copyright (C) 2004-2013 Free Software Foundation, Inc.
+ Copyright (C) 2004-2014 Free Software Foundation, Inc.
Contributed by Andrew Macleod <amacleod@redhat.com>
This file is part of GCC.
#include "tm.h"
#include "tree.h"
#include "stor-layout.h"
+#include "predict.h"
+#include "vec.h"
+#include "hashtab.h"
+#include "hash-set.h"
+#include "machmode.h"
+#include "hard-reg-set.h"
+#include "input.h"
+#include "function.h"
+#include "dominance.h"
+#include "cfg.h"
+#include "cfgrtl.h"
+#include "cfganal.h"
#include "basic-block.h"
#include "gimple-pretty-print.h"
#include "bitmap.h"
set_curr_insn_location (locus);
var = partition_to_var (SA.map, src);
- seq = emit_partition_copy (SA.partition_to_pseudo[dest],
- SA.partition_to_pseudo[src],
+ seq = emit_partition_copy (copy_rtx (SA.partition_to_pseudo[dest]),
+ copy_rtx (SA.partition_to_pseudo[src]),
TYPE_UNSIGNED (TREE_TYPE (var)),
var);
static void
insert_value_copy_on_edge (edge e, int dest, tree src, source_location locus)
{
- rtx seq, x;
- enum machine_mode dest_mode, src_mode;
+ rtx dest_rtx, seq, x;
+ machine_mode dest_mode, src_mode;
int unsignedp;
tree var;
fprintf (dump_file, "\n");
}
- gcc_assert (SA.partition_to_pseudo[dest]);
+ dest_rtx = copy_rtx (SA.partition_to_pseudo[dest]);
+ gcc_assert (dest_rtx);
set_location_for_edge (e);
/* If a locus is provided, override the default. */
var = SSA_NAME_VAR (partition_to_var (SA.map, dest));
src_mode = TYPE_MODE (TREE_TYPE (src));
- dest_mode = GET_MODE (SA.partition_to_pseudo[dest]);
+ dest_mode = GET_MODE (dest_rtx);
gcc_assert (src_mode == TYPE_MODE (TREE_TYPE (var)));
- gcc_assert (!REG_P (SA.partition_to_pseudo[dest])
+ gcc_assert (!REG_P (dest_rtx)
|| dest_mode == promote_decl_mode (var, &unsignedp));
if (src_mode != dest_mode)
}
else if (src_mode == BLKmode)
{
- x = SA.partition_to_pseudo[dest];
+ x = dest_rtx;
store_expr (src, x, 0, false);
}
else
- x = expand_expr (src, SA.partition_to_pseudo[dest],
- dest_mode, EXPAND_NORMAL);
+ x = expand_expr (src, dest_rtx, dest_mode, EXPAND_NORMAL);
- if (x != SA.partition_to_pseudo[dest])
- emit_move_insn (SA.partition_to_pseudo[dest], x);
+ if (x != dest_rtx)
+ emit_move_insn (dest_rtx, x);
seq = get_insns ();
end_sequence ();
mems. Usually we give the source. As we result from SSA names
the left and right size should be the same (and no WITH_SIZE_EXPR
involved), so it doesn't matter. */
- seq = emit_partition_copy (SA.partition_to_pseudo[dest],
+ seq = emit_partition_copy (copy_rtx (SA.partition_to_pseudo[dest]),
src, unsignedsrcp,
partition_to_var (SA.map, dest));
var = partition_to_var (SA.map, src);
seq = emit_partition_copy (dest,
- SA.partition_to_pseudo[src],
+ copy_rtx (SA.partition_to_pseudo[src]),
TYPE_UNSIGNED (TREE_TYPE (var)),
var);
tree var = TREE_CODE (name) == SSA_NAME ? SSA_NAME_VAR (name) : name;
tree type = TREE_TYPE (var);
int unsignedp;
- enum machine_mode reg_mode = promote_decl_mode (var, &unsignedp);
+ machine_mode reg_mode = promote_decl_mode (var, &unsignedp);
rtx x = gen_reg_rtx (reg_mode);
if (POINTER_TYPE_P (type))
mark_reg_pointer (x, TYPE_ALIGN (TREE_TYPE (TREE_TYPE (var))));
if (e->insns.r && (e->flags & EDGE_EH)
&& !single_pred_p (e->dest))
{
- rtx insns = e->insns.r;
+ rtx_insn *insns = e->insns.r;
basic_block bb;
- e->insns.r = NULL_RTX;
+ e->insns.r = NULL;
bb = split_edge (e);
single_pred_edge (bb)->insns.r = insns;
}