aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.8/gcc/cfgexpand.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.8/gcc/cfgexpand.c')
-rw-r--r--gcc-4.8/gcc/cfgexpand.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/gcc-4.8/gcc/cfgexpand.c b/gcc-4.8/gcc/cfgexpand.c
index 5acc42d73..884e97a33 100644
--- a/gcc-4.8/gcc/cfgexpand.c
+++ b/gcc-4.8/gcc/cfgexpand.c
@@ -331,7 +331,7 @@ stack_var_conflict_p (size_t x, size_t y)
enter its partition number into bitmap DATA. */
static bool
-visit_op (gimple stmt ATTRIBUTE_UNUSED, tree op, void *data)
+visit_op (gimple, tree op, tree, void *data)
{
bitmap active = (bitmap)data;
op = get_base_address (op);
@@ -351,7 +351,7 @@ visit_op (gimple stmt ATTRIBUTE_UNUSED, tree op, void *data)
from bitmap DATA. */
static bool
-visit_conflict (gimple stmt ATTRIBUTE_UNUSED, tree op, void *data)
+visit_conflict (gimple, tree op, tree, void *data)
{
bitmap active = (bitmap)data;
op = get_base_address (op);
@@ -385,7 +385,7 @@ add_scope_conflicts_1 (basic_block bb, bitmap work, bool for_conflict)
edge e;
edge_iterator ei;
gimple_stmt_iterator gsi;
- bool (*visit)(gimple, tree, void *);
+ walk_stmt_load_store_addr_fn visit;
bitmap_clear (work);
FOR_EACH_EDGE (e, ei, bb->preds)
@@ -4707,13 +4707,17 @@ gimple_expand_cfg (void)
if (e->insns.r)
{
rebuild_jump_labels_chain (e->insns.r);
- /* Avoid putting insns before parm_birth_insn. */
+ /* Put insns after parm birth, but before
+ NOTE_INSNS_FUNCTION_BEG. */
if (e->src == ENTRY_BLOCK_PTR
- && single_succ_p (ENTRY_BLOCK_PTR)
- && parm_birth_insn)
+ && single_succ_p (ENTRY_BLOCK_PTR))
{
rtx insns = e->insns.r;
e->insns.r = NULL_RTX;
+ if (NOTE_P (parm_birth_insn)
+ && NOTE_KIND (parm_birth_insn) == NOTE_INSN_FUNCTION_BEG)
+ emit_insn_before_noloc (insns, parm_birth_insn, e->dest);
+ else
emit_insn_after_noloc (insns, parm_birth_insn, e->dest);
}
else