/* Shrink-wrapping related optimizations.
- Copyright (C) 1987-2014 Free Software Foundation, Inc.
+ Copyright (C) 1987-2015 Free Software Foundation, Inc.
This file is part of GCC.
#include "coretypes.h"
#include "tm.h"
#include "rtl-error.h"
+#include "alias.h"
+#include "symtab.h"
#include "tree.h"
+#include "fold-const.h"
#include "stor-layout.h"
#include "varasm.h"
#include "stringpool.h"
#include "flags.h"
#include "except.h"
+#include "hard-reg-set.h"
#include "function.h"
+#include "rtl.h"
+#include "insn-config.h"
+#include "expmed.h"
+#include "dojump.h"
+#include "explow.h"
+#include "calls.h"
+#include "emit-rtl.h"
+#include "stmt.h"
#include "expr.h"
+#include "insn-codes.h"
#include "optabs.h"
#include "libfuncs.h"
#include "regs.h"
-#include "hard-reg-set.h"
-#include "insn-config.h"
#include "recog.h"
#include "output.h"
-#include "hashtab.h"
#include "tm_p.h"
#include "langhooks.h"
#include "target.h"
#include "gimplify.h"
#include "tree-pass.h"
#include "predict.h"
+#include "dominance.h"
+#include "cfg.h"
+#include "cfgrtl.h"
+#include "basic-block.h"
#include "df.h"
#include "params.h"
#include "bb-reorder.h"
#include "regcprop.h"
#include "rtl-iter.h"
-#ifdef HAVE_simple_return
/* Return true if INSN requires the stack frame to be set up.
PROLOGUE_USED contains the hard registers used in the function
case SUBREG:
case STRICT_LOW_PART:
case PC:
+ case LO_SUM:
/* Ok. Continue. */
break;
break;
}
- if (flag_shrink_wrap && HAVE_simple_return
+ if (SHRINK_WRAPPING_ENABLED
&& (targetm.profile_before_prologue () || !crtl->profile)
&& nonempty_prologue && !crtl->calls_eh_return)
{
FOR_EACH_BB_REVERSE_FN (bb, cfun)
{
basic_block copy_bb, tbb;
- rtx_insn *insert_point;
int eflags;
if (!bitmap_clear_bit (&bb_tail, bb->index))
BB_COPY_PARTITION (copy_bb, bb);
}
- insert_point = emit_note_after (NOTE_INSN_DELETED,
- BB_END (copy_bb));
+ rtx_note *insert_point = emit_note_after (NOTE_INSN_DELETED,
+ BB_END (copy_bb));
emit_barrier_after (BB_END (copy_bb));
tbb = bb;
else if (*pdest_bb == NULL)
{
basic_block bb;
- rtx_insn *start;
bb = create_basic_block (NULL, NULL, exit_pred);
BB_COPY_PARTITION (bb, e->src);
- start = emit_jump_insn_after (gen_simple_return (),
- BB_END (bb));
+ rtx_insn *ret = targetm.gen_simple_return ();
+ rtx_jump_insn *start = emit_jump_insn_after (ret, BB_END (bb));
JUMP_LABEL (start) = simple_return_rtx;
emit_barrier_after (start);
}
}
}
-
-#endif