mirror of git://gcc.gnu.org/git/gcc.git
re PR rtl-optimization/56957 (ICE in add_insn_after, at emit-rtl.c:3783)
PR rtl-optimization/56957
PR rtl-optimization/57105
* sel-sched.c (move_op_orig_expr_found): Remove insn_emitted
variable. Use just INSN_UID for determining whether an insn
should be only disconnected from the insn stream.
* sel-sched-ir.h (EXPR_WAS_CHANGED): Remove.
* gcc.dg/pr57105.c: New test.
From-SVN: r198449
This commit is contained in:
parent
abc27962b8
commit
54b8379a26
|
|
@ -1,3 +1,13 @@
|
||||||
|
2013-04-30 Andrey Belevantsev <abel@ispras.ru>
|
||||||
|
|
||||||
|
PR rtl-optimization/56957
|
||||||
|
PR rtl-optimization/57105
|
||||||
|
|
||||||
|
* sel-sched.c (move_op_orig_expr_found): Remove insn_emitted
|
||||||
|
variable. Use just INSN_UID for determining whether an insn
|
||||||
|
should be only disconnected from the insn stream.
|
||||||
|
* sel-sched-ir.h (EXPR_WAS_CHANGED): Remove.
|
||||||
|
|
||||||
2013-04-30 Jakub Jelinek <jakub@redhat.com>
|
2013-04-30 Jakub Jelinek <jakub@redhat.com>
|
||||||
|
|
||||||
PR tree-optimization/57104
|
PR tree-optimization/57104
|
||||||
|
|
|
||||||
|
|
@ -191,8 +191,6 @@ typedef expr_def *expr_t;
|
||||||
#define EXPR_WAS_RENAMED(EXPR) ((EXPR)->was_renamed)
|
#define EXPR_WAS_RENAMED(EXPR) ((EXPR)->was_renamed)
|
||||||
#define EXPR_CANT_MOVE(EXPR) ((EXPR)->cant_move)
|
#define EXPR_CANT_MOVE(EXPR) ((EXPR)->cant_move)
|
||||||
|
|
||||||
#define EXPR_WAS_CHANGED(EXPR) (EXPR_HISTORY_OF_CHANGES (EXPR).length () > 0)
|
|
||||||
|
|
||||||
/* Insn definition for list of original insns in find_used_regs. */
|
/* Insn definition for list of original insns in find_used_regs. */
|
||||||
struct _def
|
struct _def
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -6051,14 +6051,13 @@ move_op_orig_expr_found (insn_t insn, expr_t expr,
|
||||||
cmpd_local_params_p lparams ATTRIBUTE_UNUSED,
|
cmpd_local_params_p lparams ATTRIBUTE_UNUSED,
|
||||||
void *static_params)
|
void *static_params)
|
||||||
{
|
{
|
||||||
bool only_disconnect, insn_emitted;
|
bool only_disconnect;
|
||||||
moveop_static_params_p params = (moveop_static_params_p) static_params;
|
moveop_static_params_p params = (moveop_static_params_p) static_params;
|
||||||
|
|
||||||
copy_expr_onside (params->c_expr, INSN_EXPR (insn));
|
copy_expr_onside (params->c_expr, INSN_EXPR (insn));
|
||||||
track_scheduled_insns_and_blocks (insn);
|
track_scheduled_insns_and_blocks (insn);
|
||||||
insn_emitted = handle_emitting_transformations (insn, expr, params);
|
handle_emitting_transformations (insn, expr, params);
|
||||||
only_disconnect = (params->uid == INSN_UID (insn)
|
only_disconnect = params->uid == INSN_UID (insn);
|
||||||
&& ! insn_emitted && ! EXPR_WAS_CHANGED (expr));
|
|
||||||
|
|
||||||
/* Mark that we've disconnected an insn. */
|
/* Mark that we've disconnected an insn. */
|
||||||
if (only_disconnect)
|
if (only_disconnect)
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,8 @@
|
||||||
|
2013-04-30 Andrey Belevantsev <abel@ispras.ru>
|
||||||
|
|
||||||
|
PR rtl-optimization/57105
|
||||||
|
* gcc.dg/pr57105.c: New test.
|
||||||
|
|
||||||
2013-04-30 Jakub Jelinek <jakub@redhat.com>
|
2013-04-30 Jakub Jelinek <jakub@redhat.com>
|
||||||
|
|
||||||
PR tree-optimization/57104
|
PR tree-optimization/57104
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,18 @@
|
||||||
|
/* { dg-do compile { target powerpc*-*-* ia64-*-* i?86-*-* x86_64-*-* } } */
|
||||||
|
/* { dg-options "-Os -fselective-scheduling2 -g" } */
|
||||||
|
int bar (int);
|
||||||
|
int *baz (int *);
|
||||||
|
|
||||||
|
void
|
||||||
|
foo (int a)
|
||||||
|
{
|
||||||
|
while (bar (0))
|
||||||
|
{
|
||||||
|
int *c = baz (0);
|
||||||
|
if (a)
|
||||||
|
{
|
||||||
|
int i = *baz (c);
|
||||||
|
}
|
||||||
|
bar (*baz (c));
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue