mirror of git://gcc.gnu.org/git/gcc.git
graphite-isl-ast-to-gimple.c: Include ssa.h and tree-ssa.h.
2017-10-06 Richard Biener <rguenther@suse.de> * graphite-isl-ast-to-gimple.c: Include ssa.h and tree-ssa.h. (translate_isl_ast_to_gimple::translate_pending_phi_nodes, translate_isl_ast_to_gimple::is_valid_rename, translate_isl_ast_to_gimple::get_rename, translate_isl_ast_to_gimple::get_def_bb_for_const, translate_isl_ast_to_gimple::get_new_name, translate_isl_ast_to_gimple::collect_all_ssa_names, translate_isl_ast_to_gimple::copy_loop_phi_args, translate_isl_ast_to_gimple::collect_all_ssa_names, translate_isl_ast_to_gimple::copy_loop_phi_args, translate_isl_ast_to_gimple::copy_loop_phi_nodes, translate_isl_ast_to_gimple::add_close_phis_to_merge_points, translate_isl_ast_to_gimple::add_close_phis_to_outer_loops, translate_isl_ast_to_gimple::copy_loop_close_phi_args, translate_isl_ast_to_gimple::copy_loop_close_phi_nodes, translate_isl_ast_to_gimple::copy_cond_phi_args, translate_isl_ast_to_gimple::copy_cond_phi_nodes, translate_isl_ast_to_gimple::edge_for_new_close_phis, translate_isl_ast_to_gimple::add_phi_arg_for_new_expr, translate_isl_ast_to_gimple::rename_uses, translate_isl_ast_to_gimple::rename_all_uses): Remove. (translate_isl_ast_to_gimple::get_rename_from_scev): Simplify. (set_rename_for_each_def): Likewise. (graphite_copy_stmts_from_block): Handle debug stmt resetting here. Handle rewriting SCEV analyzable uses here. (copy_bb_and_scalar_dependences): Generate code for PHI copy-in/outs. (graphite_regenerate_ast_isl): Adjust. * graphite-scop-detection.c (trivially_empty_bb_p): Move to sese.[ch]. (add_write, add_read): New functions. (build_cross_bb_scalars_def): Use it and simplify. (build_cross_bb_scalars_use): Likewise. (graphite_find_cross_bb_scalar_vars): Inline into... (try_generate_gimple_bb): ...here. Add dependences for PHIs, simulating out-of-SSA. Compute liveout and add dependencies. (build_scops): Force an empty entry block. * sese.h (sese_info_t::liveout, sese_info_t::debug_liveout): New members. (sese_build_liveouts): Declare. (sese_trivially_empty_bb_p): Likewise. * sese.c (sese_build_liveouts_bb): Properly handle PHIs, compute liveout and debug_liveout. (sese_bad_liveouts_use): Remove. (sese_reset_debug_liveouts_bb): Likewise. (sese_reset_debug_liveouts): Rewrite in terms of debug_liveout. (sese_build_liveouts): Build liveout and debug_liveout and store it in region. (new_sese_info): Adjust. (free_sese_info): Likewise. (sese_insert_phis_for_liveouts): Reset debug stmts from here, do not build liveout here. (move_sese_in_condition): Adjust region entry. (scev_analyzable_p): Match up with chrec_apply requirements. (sese_trivially_empty_bb_p): New. * tree-into-ssa.c (get_reaching_def): Properly support generating default-defs for incremental rewrite of anonymous names. * gcc.dg/graphite/id-15.c: No longer expect a code generation error. * gcc.dg/graphite/id-16.c: Likewise. * gcc.dg/graphite/pr46168.c: Likewise. * gcc.dg/graphite/pr68756.c: Likewise. * gcc.dg/graphite/pr69728.c: Likewise. * gcc.dg/graphite/pr71575-2.c: Likewise. * gcc.dg/graphite/pr77362.c: Likewise. * gcc.dg/graphite/pr81373.c: Likewise. * gcc.dg/graphite/run-id-pr67700-1.c: Likewise. * gfortran.dg/graphite/interchange-1.f: Likewise. * gfortran.dg/graphite/pr42334-1.f: Likewise. * gfortran.dg/graphite/pr42393-1.f90: Likewise. * gfortran.dg/graphite/pr42393.f90: Likewise. * gfortran.dg/graphite/pr47019.f: Likewise. * gfortran.dg/graphite/id-17.f: Likewise. * gfortran.dg/graphite/id-19.f: Likewise. * gfortran.dg/graphite/run-id-2.f90: Likewise. * gfortran.dg/graphite/pr42326-1.f90: Likewise. * gfortran.dg/graphite/pr42326.f90: Likewise. * gfortran.dg/graphite/pr68550-2.f90: Likewise. * gfortran.dg/graphite/pr29581.f90: Likewise. No longer expect a code generation error. * gfortran.dg/graphite/run-id-3.f90: Likewise. * gfortran.dg/graphite/pr29832.f90: Likewise. From-SVN: r253475
This commit is contained in:
parent
57cfa17228
commit
bd8d431f44
|
|
@ -1,3 +1,62 @@
|
|||
2017-10-06 Richard Biener <rguenther@suse.de>
|
||||
|
||||
* graphite-isl-ast-to-gimple.c: Include ssa.h and tree-ssa.h.
|
||||
(translate_isl_ast_to_gimple::translate_pending_phi_nodes,
|
||||
translate_isl_ast_to_gimple::is_valid_rename,
|
||||
translate_isl_ast_to_gimple::get_rename,
|
||||
translate_isl_ast_to_gimple::get_def_bb_for_const,
|
||||
translate_isl_ast_to_gimple::get_new_name,
|
||||
translate_isl_ast_to_gimple::collect_all_ssa_names,
|
||||
translate_isl_ast_to_gimple::copy_loop_phi_args,
|
||||
translate_isl_ast_to_gimple::collect_all_ssa_names,
|
||||
translate_isl_ast_to_gimple::copy_loop_phi_args,
|
||||
translate_isl_ast_to_gimple::copy_loop_phi_nodes,
|
||||
translate_isl_ast_to_gimple::add_close_phis_to_merge_points,
|
||||
translate_isl_ast_to_gimple::add_close_phis_to_outer_loops,
|
||||
translate_isl_ast_to_gimple::copy_loop_close_phi_args,
|
||||
translate_isl_ast_to_gimple::copy_loop_close_phi_nodes,
|
||||
translate_isl_ast_to_gimple::copy_cond_phi_args,
|
||||
translate_isl_ast_to_gimple::copy_cond_phi_nodes,
|
||||
translate_isl_ast_to_gimple::edge_for_new_close_phis,
|
||||
translate_isl_ast_to_gimple::add_phi_arg_for_new_expr,
|
||||
translate_isl_ast_to_gimple::rename_uses,
|
||||
translate_isl_ast_to_gimple::rename_all_uses): Remove.
|
||||
(translate_isl_ast_to_gimple::get_rename_from_scev): Simplify.
|
||||
(set_rename_for_each_def): Likewise.
|
||||
(graphite_copy_stmts_from_block): Handle debug stmt resetting
|
||||
here. Handle rewriting SCEV analyzable uses here.
|
||||
(copy_bb_and_scalar_dependences): Generate code for PHI
|
||||
copy-in/outs.
|
||||
(graphite_regenerate_ast_isl): Adjust.
|
||||
* graphite-scop-detection.c (trivially_empty_bb_p): Move to sese.[ch].
|
||||
(add_write, add_read): New functions.
|
||||
(build_cross_bb_scalars_def): Use it and simplify.
|
||||
(build_cross_bb_scalars_use): Likewise.
|
||||
(graphite_find_cross_bb_scalar_vars): Inline into...
|
||||
(try_generate_gimple_bb): ...here. Add dependences for PHIs,
|
||||
simulating out-of-SSA. Compute liveout and add dependencies.
|
||||
(build_scops): Force an empty entry block.
|
||||
* sese.h (sese_info_t::liveout, sese_info_t::debug_liveout): New
|
||||
members.
|
||||
(sese_build_liveouts): Declare.
|
||||
(sese_trivially_empty_bb_p): Likewise.
|
||||
* sese.c (sese_build_liveouts_bb): Properly handle PHIs,
|
||||
compute liveout and debug_liveout.
|
||||
(sese_bad_liveouts_use): Remove.
|
||||
(sese_reset_debug_liveouts_bb): Likewise.
|
||||
(sese_reset_debug_liveouts): Rewrite in terms of debug_liveout.
|
||||
(sese_build_liveouts): Build liveout and debug_liveout and store
|
||||
it in region.
|
||||
(new_sese_info): Adjust.
|
||||
(free_sese_info): Likewise.
|
||||
(sese_insert_phis_for_liveouts): Reset debug stmts from here,
|
||||
do not build liveout here.
|
||||
(move_sese_in_condition): Adjust region entry.
|
||||
(scev_analyzable_p): Match up with chrec_apply requirements.
|
||||
(sese_trivially_empty_bb_p): New.
|
||||
* tree-into-ssa.c (get_reaching_def): Properly support generating
|
||||
default-defs for incremental rewrite of anonymous names.
|
||||
|
||||
2017-10-06 Richard Biener <rguenther@suse.de>
|
||||
|
||||
* graphite-sese-to-poly.c (extract_affine): For casts increasing
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -254,21 +254,6 @@ dot_cfg ()
|
|||
scops.release ();
|
||||
}
|
||||
|
||||
/* Return true if BB is empty, contains only DEBUG_INSNs. */
|
||||
|
||||
static bool
|
||||
trivially_empty_bb_p (basic_block bb)
|
||||
{
|
||||
gimple_stmt_iterator gsi;
|
||||
|
||||
for (gsi = gsi_start_bb (bb); !gsi_end_p (gsi); gsi_next (&gsi))
|
||||
if (gimple_code (gsi_stmt (gsi)) != GIMPLE_DEBUG
|
||||
&& gimple_code (gsi_stmt (gsi)) != GIMPLE_LABEL)
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/* Can all ivs be represented by a signed integer?
|
||||
As isl might generate negative values in its expressions, signed loop ivs
|
||||
are required in the backend. */
|
||||
|
|
@ -471,7 +456,7 @@ scop_detection::get_sese (loop_p loop)
|
|||
canonicalize_loop_closed_ssa makes sure that is in proper shape. */
|
||||
if (! single_pred_p (scop_end->dest)
|
||||
|| ! single_succ_p (scop_end->dest)
|
||||
|| ! trivially_empty_bb_p (scop_end->dest))
|
||||
|| ! sese_trivially_empty_bb_p (scop_end->dest))
|
||||
gcc_unreachable ();
|
||||
scop_end = single_succ_edge (scop_end->dest);
|
||||
|
||||
|
|
@ -1346,13 +1331,35 @@ find_scop_parameters (scop_p scop)
|
|||
scop_set_nb_params (scop, nbp);
|
||||
}
|
||||
|
||||
static void
|
||||
add_write (vec<tree> *writes, tree def)
|
||||
{
|
||||
writes->safe_push (def);
|
||||
DEBUG_PRINT (dp << "Adding scalar write: ";
|
||||
print_generic_expr (dump_file, def);
|
||||
dp << "\nFrom stmt: ";
|
||||
print_gimple_stmt (dump_file,
|
||||
SSA_NAME_DEF_STMT (def), 0));
|
||||
}
|
||||
|
||||
static void
|
||||
add_read (vec<scalar_use> *reads, tree use, gimple *use_stmt)
|
||||
{
|
||||
DEBUG_PRINT (dp << "Adding scalar read: ";
|
||||
print_generic_expr (dump_file, use);
|
||||
dp << "\nFrom stmt: ";
|
||||
print_gimple_stmt (dump_file, use_stmt, 0));
|
||||
reads->safe_push (std::make_pair (use_stmt, use));
|
||||
}
|
||||
|
||||
|
||||
/* Record DEF if it is used in other bbs different than DEF_BB in the SCOP. */
|
||||
|
||||
static void
|
||||
build_cross_bb_scalars_def (scop_p scop, tree def, basic_block def_bb,
|
||||
vec<tree> *writes)
|
||||
{
|
||||
if (!def || !is_gimple_reg (def))
|
||||
if (!is_gimple_reg (def))
|
||||
return;
|
||||
|
||||
bool scev_analyzable = scev_analyzable_p (def, scop->scop_info->region);
|
||||
|
|
@ -1366,16 +1373,9 @@ build_cross_bb_scalars_def (scop_p scop, tree def, basic_block def_bb,
|
|||
/* But gather SESE liveouts as we otherwise fail to rewrite their
|
||||
exit PHIs. */
|
||||
|| ! bb_in_sese_p (gimple_bb (use_stmt), scop->scop_info->region))
|
||||
&& ((def_bb != gimple_bb (use_stmt) && !is_gimple_debug (use_stmt))
|
||||
/* PHIs have their effect at "BBs" on the edges. See PR79622. */
|
||||
|| gimple_code (SSA_NAME_DEF_STMT (def)) == GIMPLE_PHI))
|
||||
&& (def_bb != gimple_bb (use_stmt) && !is_gimple_debug (use_stmt)))
|
||||
{
|
||||
writes->safe_push (def);
|
||||
DEBUG_PRINT (dp << "Adding scalar write: ";
|
||||
print_generic_expr (dump_file, def);
|
||||
dp << "\nFrom stmt: ";
|
||||
print_gimple_stmt (dump_file,
|
||||
SSA_NAME_DEF_STMT (def), 0));
|
||||
add_write (writes, def);
|
||||
/* This is required by the FOR_EACH_IMM_USE_STMT when we want to break
|
||||
before all the uses have been visited. */
|
||||
BREAK_FROM_IMM_USE_STMT (imm_iter);
|
||||
|
|
@ -1389,7 +1389,6 @@ static void
|
|||
build_cross_bb_scalars_use (scop_p scop, tree use, gimple *use_stmt,
|
||||
vec<scalar_use> *reads)
|
||||
{
|
||||
gcc_assert (use);
|
||||
if (!is_gimple_reg (use))
|
||||
return;
|
||||
|
||||
|
|
@ -1399,46 +1398,8 @@ build_cross_bb_scalars_use (scop_p scop, tree use, gimple *use_stmt,
|
|||
return;
|
||||
|
||||
gimple *def_stmt = SSA_NAME_DEF_STMT (use);
|
||||
if (gimple_bb (def_stmt) != gimple_bb (use_stmt)
|
||||
/* PHIs have their effect at "BBs" on the edges. See PR79622. */
|
||||
|| gimple_code (def_stmt) == GIMPLE_PHI)
|
||||
{
|
||||
DEBUG_PRINT (dp << "Adding scalar read: ";
|
||||
print_generic_expr (dump_file, use);
|
||||
dp << "\nFrom stmt: ";
|
||||
print_gimple_stmt (dump_file, use_stmt, 0));
|
||||
reads->safe_push (std::make_pair (use_stmt, use));
|
||||
}
|
||||
}
|
||||
|
||||
/* Record all scalar variables that are defined and used in different BBs of the
|
||||
SCOP. */
|
||||
|
||||
static void
|
||||
graphite_find_cross_bb_scalar_vars (scop_p scop, gimple *stmt,
|
||||
vec<scalar_use> *reads, vec<tree> *writes)
|
||||
{
|
||||
tree def;
|
||||
|
||||
if (gimple_code (stmt) == GIMPLE_ASSIGN)
|
||||
def = gimple_assign_lhs (stmt);
|
||||
else if (gimple_code (stmt) == GIMPLE_CALL)
|
||||
def = gimple_call_lhs (stmt);
|
||||
else if (gimple_code (stmt) == GIMPLE_PHI)
|
||||
def = gimple_phi_result (stmt);
|
||||
else
|
||||
return;
|
||||
|
||||
|
||||
build_cross_bb_scalars_def (scop, def, gimple_bb (stmt), writes);
|
||||
|
||||
ssa_op_iter iter;
|
||||
use_operand_p use_p;
|
||||
FOR_EACH_PHI_OR_STMT_USE (use_p, stmt, iter, SSA_OP_USE)
|
||||
{
|
||||
tree use = USE_FROM_PTR (use_p);
|
||||
build_cross_bb_scalars_use (scop, use, stmt, reads);
|
||||
}
|
||||
if (gimple_bb (def_stmt) != gimple_bb (use_stmt))
|
||||
add_read (reads, use, use_stmt);
|
||||
}
|
||||
|
||||
/* Generates a polyhedral black box only if the bb contains interesting
|
||||
|
|
@ -1467,13 +1428,89 @@ try_generate_gimple_bb (scop_p scop, basic_block bb)
|
|||
continue;
|
||||
|
||||
graphite_find_data_references_in_stmt (nest, loop, stmt, &drs);
|
||||
graphite_find_cross_bb_scalar_vars (scop, stmt, &reads, &writes);
|
||||
|
||||
tree def = gimple_get_lhs (stmt);
|
||||
if (def)
|
||||
build_cross_bb_scalars_def (scop, def, gimple_bb (stmt), &writes);
|
||||
|
||||
ssa_op_iter iter;
|
||||
tree use;
|
||||
FOR_EACH_SSA_TREE_OPERAND (use, stmt, iter, SSA_OP_USE)
|
||||
build_cross_bb_scalars_use (scop, use, stmt, &reads);
|
||||
}
|
||||
|
||||
/* Handle defs and uses in PHIs. Those need special treatment given
|
||||
that we have to present ISL with sth that looks like we've rewritten
|
||||
the IL out-of-SSA. */
|
||||
for (gphi_iterator psi = gsi_start_phis (bb); !gsi_end_p (psi);
|
||||
gsi_next (&psi))
|
||||
if (!virtual_operand_p (gimple_phi_result (psi.phi ())))
|
||||
graphite_find_cross_bb_scalar_vars (scop, psi.phi (), &reads, &writes);
|
||||
{
|
||||
gphi *phi = psi.phi ();
|
||||
tree res = gimple_phi_result (phi);
|
||||
if (virtual_operand_p (res)
|
||||
|| scev_analyzable_p (res, scop->scop_info->region))
|
||||
continue;
|
||||
/* To simulate out-of-SSA the block containing the PHI node has
|
||||
reads of the PHI destination. And to preserve SSA dependences
|
||||
we also write to it (the out-of-SSA decl and the SSA result
|
||||
are coalesced for dependence purposes which is good enough). */
|
||||
add_read (&reads, res, phi);
|
||||
add_write (&writes, res);
|
||||
}
|
||||
basic_block bb_for_succs = bb;
|
||||
if (bb_for_succs == bb_for_succs->loop_father->latch
|
||||
&& bb_in_sese_p (bb_for_succs, scop->scop_info->region)
|
||||
&& sese_trivially_empty_bb_p (bb_for_succs))
|
||||
bb_for_succs = NULL;
|
||||
while (bb_for_succs)
|
||||
{
|
||||
basic_block latch = NULL;
|
||||
edge_iterator ei;
|
||||
edge e;
|
||||
FOR_EACH_EDGE (e, ei, bb_for_succs->succs)
|
||||
{
|
||||
for (gphi_iterator psi = gsi_start_phis (e->dest); !gsi_end_p (psi);
|
||||
gsi_next (&psi))
|
||||
{
|
||||
gphi *phi = psi.phi ();
|
||||
tree res = gimple_phi_result (phi);
|
||||
if (virtual_operand_p (res))
|
||||
continue;
|
||||
/* To simulate out-of-SSA the predecessor of edges into PHI nodes
|
||||
has a copy from the PHI argument to the PHI destination. */
|
||||
if (! scev_analyzable_p (res, scop->scop_info->region))
|
||||
add_write (&writes, res);
|
||||
tree use = PHI_ARG_DEF_FROM_EDGE (phi, e);
|
||||
if (TREE_CODE (use) == SSA_NAME
|
||||
&& ! SSA_NAME_IS_DEFAULT_DEF (use)
|
||||
&& gimple_bb (SSA_NAME_DEF_STMT (use)) != bb_for_succs
|
||||
&& ! scev_analyzable_p (use, scop->scop_info->region))
|
||||
add_read (&reads, use, phi);
|
||||
}
|
||||
if (e->dest == bb_for_succs->loop_father->latch
|
||||
&& bb_in_sese_p (e->dest, scop->scop_info->region)
|
||||
&& sese_trivially_empty_bb_p (e->dest))
|
||||
latch = e->dest;
|
||||
}
|
||||
/* Handle empty latch block PHIs here, otherwise we confuse ISL
|
||||
with extra conditional code where it then peels off the last
|
||||
iteration just because of that. It would be simplest if we
|
||||
just didn't force simple latches (thus remove the forwarder). */
|
||||
bb_for_succs = latch;
|
||||
}
|
||||
|
||||
/* For the region exit block add reads for all live-out vars. */
|
||||
if (bb == scop->scop_info->region.exit->src)
|
||||
{
|
||||
sese_build_liveouts (scop->scop_info);
|
||||
unsigned i;
|
||||
bitmap_iterator bi;
|
||||
EXECUTE_IF_SET_IN_BITMAP (scop->scop_info->liveout, 0, i, bi)
|
||||
{
|
||||
tree use = ssa_name (i);
|
||||
add_read (&reads, use, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
if (drs.is_empty () && writes.is_empty () && reads.is_empty ())
|
||||
return NULL;
|
||||
|
|
@ -1700,6 +1737,10 @@ build_scops (vec<scop_p> *scops)
|
|||
sese_l *s;
|
||||
FOR_EACH_VEC_ELT (scops_l, i, s)
|
||||
{
|
||||
/* For our out-of-SSA we need a block on s->entry, similar to how
|
||||
we include the LCSSA block in the region. */
|
||||
s->entry = single_pred_edge (split_edge (s->entry));
|
||||
|
||||
scop_p scop = new_scop (s->entry, s->exit);
|
||||
|
||||
/* Record all basic blocks and their conditions in REGION. */
|
||||
|
|
|
|||
129
gcc/sese.c
129
gcc/sese.c
|
|
@ -68,84 +68,58 @@ sese_build_liveouts_use (sese_info_p region, bitmap liveouts, basic_block bb,
|
|||
used in BB that is outside of the REGION. */
|
||||
|
||||
static void
|
||||
sese_build_liveouts_bb (sese_info_p region, bitmap liveouts, basic_block bb)
|
||||
sese_build_liveouts_bb (sese_info_p region, basic_block bb)
|
||||
{
|
||||
edge e;
|
||||
edge_iterator ei;
|
||||
ssa_op_iter iter;
|
||||
use_operand_p use_p;
|
||||
|
||||
FOR_EACH_EDGE (e, ei, bb->succs)
|
||||
for (gphi_iterator bsi = gsi_start_phis (e->dest); !gsi_end_p (bsi);
|
||||
for (gphi_iterator bsi = gsi_start_phis (bb); !gsi_end_p (bsi);
|
||||
gsi_next (&bsi))
|
||||
sese_build_liveouts_use (region, liveouts, bb,
|
||||
PHI_ARG_DEF_FROM_EDGE (bsi.phi (), e));
|
||||
FOR_EACH_PHI_ARG (use_p, bsi.phi (), iter, SSA_OP_USE)
|
||||
sese_build_liveouts_use (region, region->liveout,
|
||||
bb, USE_FROM_PTR (use_p));
|
||||
|
||||
for (gimple_stmt_iterator bsi = gsi_start_bb (bb); !gsi_end_p (bsi);
|
||||
gsi_next (&bsi))
|
||||
{
|
||||
gimple *stmt = gsi_stmt (bsi);
|
||||
|
||||
bitmap liveouts = region->liveout;
|
||||
if (is_gimple_debug (stmt))
|
||||
continue;
|
||||
liveouts = region->debug_liveout;
|
||||
|
||||
FOR_EACH_SSA_USE_OPERAND (use_p, stmt, iter, SSA_OP_ALL_USES)
|
||||
FOR_EACH_SSA_USE_OPERAND (use_p, stmt, iter, SSA_OP_USE)
|
||||
sese_build_liveouts_use (region, liveouts, bb, USE_FROM_PTR (use_p));
|
||||
}
|
||||
}
|
||||
|
||||
/* For a USE in BB, return true if BB is outside REGION and it's not
|
||||
in the LIVEOUTS set. */
|
||||
|
||||
static bool
|
||||
sese_bad_liveouts_use (sese_info_p region, bitmap liveouts, basic_block bb,
|
||||
tree use)
|
||||
{
|
||||
gcc_assert (!bb_in_sese_p (bb, region->region));
|
||||
|
||||
if (TREE_CODE (use) != SSA_NAME)
|
||||
return false;
|
||||
|
||||
unsigned ver = SSA_NAME_VERSION (use);
|
||||
|
||||
/* If it's in liveouts, the variable will get a new PHI node, and
|
||||
the debug use will be properly adjusted. */
|
||||
if (bitmap_bit_p (liveouts, ver))
|
||||
return false;
|
||||
|
||||
basic_block def_bb = gimple_bb (SSA_NAME_DEF_STMT (use));
|
||||
|
||||
if (!def_bb || !bb_in_sese_p (def_bb, region->region))
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/* Reset debug stmts that reference SSA_NAMES defined in REGION that
|
||||
are not marked as liveouts. */
|
||||
|
||||
static void
|
||||
sese_reset_debug_liveouts_bb (sese_info_p region, bitmap liveouts,
|
||||
basic_block bb)
|
||||
sese_reset_debug_liveouts (sese_info_p region)
|
||||
{
|
||||
gimple_stmt_iterator bsi;
|
||||
ssa_op_iter iter;
|
||||
use_operand_p use_p;
|
||||
|
||||
for (bsi = gsi_start_bb (bb); !gsi_end_p (bsi); gsi_next (&bsi))
|
||||
bitmap_iterator bi;
|
||||
unsigned i;
|
||||
EXECUTE_IF_AND_COMPL_IN_BITMAP (region->debug_liveout, region->liveout,
|
||||
0, i, bi)
|
||||
{
|
||||
gimple *stmt = gsi_stmt (bsi);
|
||||
|
||||
if (!is_gimple_debug (stmt))
|
||||
tree name = ssa_name (i);
|
||||
auto_vec<gimple *, 4> stmts;
|
||||
gimple *use_stmt;
|
||||
imm_use_iterator use_iter;
|
||||
FOR_EACH_IMM_USE_STMT (use_stmt, use_iter, name)
|
||||
{
|
||||
if (! is_gimple_debug (use_stmt)
|
||||
|| bb_in_sese_p (gimple_bb (use_stmt), region->region))
|
||||
continue;
|
||||
|
||||
FOR_EACH_SSA_USE_OPERAND (use_p, stmt, iter, SSA_OP_ALL_USES)
|
||||
if (sese_bad_liveouts_use (region, liveouts, bb,
|
||||
USE_FROM_PTR (use_p)))
|
||||
stmts.safe_push (use_stmt);
|
||||
}
|
||||
while (!stmts.is_empty ())
|
||||
{
|
||||
gimple *stmt = stmts.pop ();
|
||||
gimple_debug_bind_reset_value (stmt);
|
||||
update_stmt (stmt);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -153,21 +127,21 @@ sese_reset_debug_liveouts_bb (sese_info_p region, bitmap liveouts,
|
|||
/* Build the LIVEOUTS of REGION: the set of variables defined inside
|
||||
and used outside the REGION. */
|
||||
|
||||
static void
|
||||
sese_build_liveouts (sese_info_p region, bitmap liveouts)
|
||||
void
|
||||
sese_build_liveouts (sese_info_p region)
|
||||
{
|
||||
basic_block bb;
|
||||
|
||||
/* FIXME: We could start iterating form the successor of sese. */
|
||||
FOR_EACH_BB_FN (bb, cfun)
|
||||
if (!bb_in_sese_p (bb, region->region))
|
||||
sese_build_liveouts_bb (region, liveouts, bb);
|
||||
gcc_assert (region->liveout == NULL
|
||||
&& region->debug_liveout == NULL);
|
||||
|
||||
region->liveout = BITMAP_ALLOC (NULL);
|
||||
region->debug_liveout = BITMAP_ALLOC (NULL);
|
||||
|
||||
/* FIXME: We could start iterating form the successor of sese. */
|
||||
if (MAY_HAVE_DEBUG_STMTS)
|
||||
FOR_EACH_BB_FN (bb, cfun)
|
||||
if (!bb_in_sese_p (bb, region->region))
|
||||
sese_reset_debug_liveouts_bb (region, liveouts, bb);
|
||||
sese_build_liveouts_bb (region, bb);
|
||||
}
|
||||
|
||||
/* Builds a new SESE region from edges ENTRY and EXIT. */
|
||||
|
|
@ -179,6 +153,8 @@ new_sese_info (edge entry, edge exit)
|
|||
|
||||
region->region.entry = entry;
|
||||
region->region.exit = exit;
|
||||
region->liveout = NULL;
|
||||
region->debug_liveout = NULL;
|
||||
region->params.create (3);
|
||||
region->rename_map = new rename_map_t;
|
||||
region->parameter_rename_map = new parameter_rename_map_t;
|
||||
|
|
@ -196,6 +172,8 @@ void
|
|||
free_sese_info (sese_info_p region)
|
||||
{
|
||||
region->params.release ();
|
||||
BITMAP_FREE (region->liveout);
|
||||
BITMAP_FREE (region->debug_liveout);
|
||||
|
||||
for (rename_map_t::iterator it = region->rename_map->begin ();
|
||||
it != region->rename_map->end (); ++it)
|
||||
|
|
@ -246,17 +224,14 @@ void
|
|||
sese_insert_phis_for_liveouts (sese_info_p region, basic_block bb,
|
||||
edge false_e, edge true_e)
|
||||
{
|
||||
if (MAY_HAVE_DEBUG_STMTS)
|
||||
sese_reset_debug_liveouts (region);
|
||||
|
||||
unsigned i;
|
||||
bitmap_iterator bi;
|
||||
bitmap liveouts = BITMAP_ALLOC (NULL);
|
||||
|
||||
sese_build_liveouts (region, liveouts);
|
||||
|
||||
EXECUTE_IF_SET_IN_BITMAP (liveouts, 0, i, bi)
|
||||
EXECUTE_IF_SET_IN_BITMAP (region->liveout, 0, i, bi)
|
||||
if (!virtual_operand_p (ssa_name (i)))
|
||||
sese_add_exit_phis_edge (bb, ssa_name (i), false_e, true_e);
|
||||
|
||||
BITMAP_FREE (liveouts);
|
||||
}
|
||||
|
||||
/* Returns the outermost loop in SCOP that contains BB. */
|
||||
|
|
@ -369,6 +344,8 @@ move_sese_in_condition (sese_info_p region)
|
|||
if_region->true_region->region.exit
|
||||
= single_succ_edge (split_edge (true_edge));
|
||||
|
||||
region->region = if_region->false_region->region;
|
||||
|
||||
return if_region;
|
||||
}
|
||||
|
||||
|
|
@ -471,7 +448,10 @@ scev_analyzable_p (tree def, sese_l ®ion)
|
|||
&& (TREE_CODE (scev) != SSA_NAME
|
||||
|| !defined_in_sese_p (scev, region))
|
||||
&& (tree_does_not_contain_chrecs (scev)
|
||||
|| evolution_function_is_affine_p (scev));
|
||||
|| evolution_function_is_affine_p (scev))
|
||||
&& (! loop
|
||||
|| ! loop_in_sese_p (loop, region)
|
||||
|| ! chrec_contains_symbols_defined_in_loop (scev, loop->num));
|
||||
}
|
||||
|
||||
/* Returns the scalar evolution of T in REGION. Every variable that
|
||||
|
|
@ -518,6 +498,21 @@ scalar_evolution_in_region (const sese_l ®ion, loop_p loop, tree t)
|
|||
return instantiate_scev (before, loop, t);
|
||||
}
|
||||
|
||||
/* Return true if BB is empty, contains only DEBUG_INSNs. */
|
||||
|
||||
bool
|
||||
sese_trivially_empty_bb_p (basic_block bb)
|
||||
{
|
||||
gimple_stmt_iterator gsi;
|
||||
|
||||
for (gsi = gsi_start_bb (bb); !gsi_end_p (gsi); gsi_next (&gsi))
|
||||
if (gimple_code (gsi_stmt (gsi)) != GIMPLE_DEBUG
|
||||
&& gimple_code (gsi_stmt (gsi)) != GIMPLE_LABEL)
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/* Pretty print edge E to FILE. */
|
||||
|
||||
void
|
||||
|
|
|
|||
|
|
@ -83,6 +83,12 @@ typedef struct sese_info_t
|
|||
/* The SESE region. */
|
||||
sese_l region;
|
||||
|
||||
/* Liveout vars. */
|
||||
bitmap liveout;
|
||||
|
||||
/* Liveout in debug stmts. */
|
||||
bitmap debug_liveout;
|
||||
|
||||
/* Parameters used within the SCOP. */
|
||||
vec<tree> params;
|
||||
|
||||
|
|
@ -116,6 +122,8 @@ extern struct loop *outermost_loop_in_sese (sese_l &, basic_block);
|
|||
extern tree scalar_evolution_in_region (const sese_l &, loop_p, tree);
|
||||
extern bool scev_analyzable_p (tree, sese_l &);
|
||||
extern bool invariant_in_sese_p_rec (tree, const sese_l &, bool *);
|
||||
extern void sese_build_liveouts (sese_info_p);
|
||||
extern bool sese_trivially_empty_bb_p (basic_block);
|
||||
|
||||
/* The number of parameters in REGION. */
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,30 @@
|
|||
2017-10-06 Richard Biener <rguenther@suse.de>
|
||||
|
||||
* gcc.dg/graphite/id-15.c: No longer expect a code generation error.
|
||||
* gcc.dg/graphite/id-16.c: Likewise.
|
||||
* gcc.dg/graphite/pr46168.c: Likewise.
|
||||
* gcc.dg/graphite/pr68756.c: Likewise.
|
||||
* gcc.dg/graphite/pr69728.c: Likewise.
|
||||
* gcc.dg/graphite/pr71575-2.c: Likewise.
|
||||
* gcc.dg/graphite/pr77362.c: Likewise.
|
||||
* gcc.dg/graphite/pr81373.c: Likewise.
|
||||
* gcc.dg/graphite/run-id-pr67700-1.c: Likewise.
|
||||
* gfortran.dg/graphite/interchange-1.f: Likewise.
|
||||
* gfortran.dg/graphite/pr42334-1.f: Likewise.
|
||||
* gfortran.dg/graphite/pr42393-1.f90: Likewise.
|
||||
* gfortran.dg/graphite/pr42393.f90: Likewise.
|
||||
* gfortran.dg/graphite/pr47019.f: Likewise.
|
||||
* gfortran.dg/graphite/id-17.f: Likewise.
|
||||
* gfortran.dg/graphite/id-19.f: Likewise.
|
||||
* gfortran.dg/graphite/run-id-2.f90: Likewise.
|
||||
* gfortran.dg/graphite/pr42326-1.f90: Likewise.
|
||||
* gfortran.dg/graphite/pr42326.f90: Likewise.
|
||||
* gfortran.dg/graphite/pr68550-2.f90: Likewise.
|
||||
* gfortran.dg/graphite/pr29581.f90: Likewise. No longer expect
|
||||
a code generation error.
|
||||
* gfortran.dg/graphite/run-id-3.f90: Likewise.
|
||||
* gfortran.dg/graphite/pr29832.f90: Likewise.
|
||||
|
||||
2017-10-06 Richard Biener <rguenther@suse.de>
|
||||
|
||||
PR tree-optimization/82436
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
/* { dg-require-effective-target int32plus } */
|
||||
/* { dg-additional-options "--param graphite-allow-codegen-errors=1" { target ilp32 } } */
|
||||
|
||||
typedef long unsigned int size_t;
|
||||
extern void *memset (void *__s, int __c, size_t __n) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
|
||||
|
|
@ -118,5 +117,3 @@ mul_double (l1, h1, l2, h2, lv, hv)
|
|||
}
|
||||
return (*hv < 0 ? ~(toplow & tophigh) : toplow | tophigh) != 0;
|
||||
}
|
||||
|
||||
/* { dg-final { scan-tree-dump-times "code generation error" 1 "graphite" { target ilp32 } } } */
|
||||
|
|
|
|||
|
|
@ -1,5 +1,3 @@
|
|||
/* { dg-additional-options "--param graphite-allow-codegen-errors=1" } */
|
||||
|
||||
int transformation[(2*19 - 1) * (2*19 - 1)][8];
|
||||
|
||||
const int transformation2[8][2][2] = {
|
||||
|
|
@ -44,5 +42,3 @@ transformation_init (void)
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* { dg-final { scan-tree-dump-times "code generation error" 1 "graphite" } } */
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/* { dg-do compile } */
|
||||
/* { dg-options "-O -ftree-loop-linear -fdump-tree-graphite-details --param graphite-allow-codegen-errors=1" } */
|
||||
/* { dg-options "-O -ftree-loop-linear" } */
|
||||
|
||||
int
|
||||
foo (int a[4096], int mi, int mj)
|
||||
|
|
@ -13,5 +13,3 @@ foo (int a[4096], int mi, int mj)
|
|||
}
|
||||
return i16;
|
||||
}
|
||||
|
||||
/* { dg-final { scan-tree-dump-times "code generation error" 1 "graphite" } } */
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/* { dg-do compile } */
|
||||
/* { dg-options "-O1 -floop-nest-optimize -fdump-tree-graphite-details --param graphite-allow-codegen-errors=1" } */
|
||||
/* { dg-options "-O1 -floop-nest-optimize" } */
|
||||
|
||||
unsigned int z4, pz;
|
||||
int nn[2];
|
||||
|
|
@ -24,5 +24,3 @@ la (void)
|
|||
pz = xq (hn);
|
||||
}
|
||||
}
|
||||
|
||||
/* { dg-final { scan-tree-dump-times "code generation error" 1 "graphite" } } */
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/* { dg-do compile } */
|
||||
/* { dg-options "-O3 -floop-nest-optimize -fdump-tree-graphite-details --param graphite-allow-codegen-errors=1" } */
|
||||
/* { dg-options "-O3 -floop-nest-optimize" } */
|
||||
|
||||
int a[1];
|
||||
int b, c, d, e;
|
||||
|
|
@ -19,5 +19,3 @@ fn1 ()
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* { dg-final { scan-tree-dump-times "code generation error" 1 "graphite" } } */
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/* { dg-do compile } */
|
||||
/* { dg-options "-Ofast -floop-nest-optimize -fdump-tree-graphite-details --param graphite-allow-codegen-errors=1" } */
|
||||
/* { dg-options "-Ofast -floop-nest-optimize" } */
|
||||
|
||||
int *a;
|
||||
int b, c, d, e, g;
|
||||
|
|
@ -14,5 +14,3 @@ void fn1() {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* { dg-final { scan-tree-dump-times "code generation error" 1 "graphite" } } */
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/* { dg-do compile } */
|
||||
/* { dg-options "-O2 -floop-nest-optimize -fdump-tree-graphite-details --param graphite-allow-codegen-errors=1" } */
|
||||
/* { dg-options "-O2 -floop-nest-optimize" } */
|
||||
|
||||
int mc[2];
|
||||
int f2, sk;
|
||||
|
|
@ -18,5 +18,3 @@ zm (void)
|
|||
++hm;
|
||||
}
|
||||
}
|
||||
|
||||
/* { dg-final { scan-tree-dump-times "code generation error" 1 "graphite" } } */
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* { dg-options "-fno-tree-scev-cprop -fgraphite-identity -O -fdump-tree-graphite-all --param graphite-allow-codegen-errors=1" } */
|
||||
/* { dg-options "-fno-tree-scev-cprop -fgraphite-identity -O -fdump-tree-graphite-all" } */
|
||||
|
||||
void bar (void);
|
||||
|
||||
|
|
@ -38,4 +38,3 @@ int toto()
|
|||
}
|
||||
|
||||
/* { dg-final { scan-tree-dump-times "number of SCoPs: 2" 1 "graphite"} } */
|
||||
/* { dg-final { scan-tree-dump-times "code generation error" 1 "graphite" } } */
|
||||
|
|
|
|||
|
|
@ -1,5 +1,3 @@
|
|||
/* { dg-additional-options "--param graphite-allow-codegen-errors=1" } */
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <assert.h>
|
||||
|
||||
|
|
@ -47,5 +45,3 @@ int main()
|
|||
assert (obj->elem1[8] == 45);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* { dg-final { scan-tree-dump-times "code generation error" 1 "graphite" } } */
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
! { dg-additional-options "-fdump-tree-graphite-details --param graphite-allow-codegen-errors=1" { target ilp32 } }
|
||||
SUBROUTINE SPECTOP(Dr,N)
|
||||
DIMENSION d1(0:32,0:32) , Dr(0:32,0:32) , x(0:32)
|
||||
DO k = 0 , N
|
||||
|
|
@ -15,4 +14,3 @@
|
|||
ENDDO
|
||||
ENDDO
|
||||
END
|
||||
! { dg-final { scan-tree-dump-times "code generation error" 1 "graphite" { target ilp32 } } }
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
! { dg-additional-options "-fdump-tree-graphite-details --param graphite-allow-codegen-errors=1" { target ilp32 } }
|
||||
SUBROUTINE ECCODR(FPQR)
|
||||
DIMENSION FPQR(25,25,25)
|
||||
INTEGER P,Q,R
|
||||
|
|
@ -14,4 +13,3 @@
|
|||
140 QM2= QM2+TWO
|
||||
150 PM2= PM2+TWO
|
||||
END
|
||||
! { dg-final { scan-tree-dump-times "code generation error" 1 "graphite" { target ilp32 } } }
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
! { dg-additional-options "--param graphite-allow-codegen-errors=1" }
|
||||
subroutine foo(f1,f2,f3,f4,f5,f6,f7,f8,f9,f0,g1,g2,g3)
|
||||
implicit none
|
||||
integer f4,f3,f2,f1
|
||||
|
|
@ -43,4 +42,3 @@
|
|||
! kernel from bwaves.
|
||||
|
||||
! { dg-final { scan-tree-dump-times "will be interchanged" 1 "graphite" { xfail *-*-* } } }
|
||||
! { dg-final { scan-tree-dump-times "code generation error" 1 "graphite" } }
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
! PR tree-optimization/29581
|
||||
! { dg-do run }
|
||||
! { dg-options "-O2 -ftree-loop-linear -fdump-tree-graphite-details --param graphite-allow-codegen-errors=1" }
|
||||
! { dg-skip-if "" { *-*-* } { "-O0" } { "" } }
|
||||
! { dg-additional-options "-ftree-loop-linear" }
|
||||
|
||||
SUBROUTINE FOO (K)
|
||||
INTEGER I, J, K, A(5,5), B
|
||||
|
|
@ -25,5 +26,3 @@
|
|||
A(1,1) = 0
|
||||
IF (ANY(A.NE.0)) CALL ABORT
|
||||
END
|
||||
|
||||
! { dg-final { scan-tree-dump-times "code generation error" 1 "graphite" } }
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
! { dg-do run }
|
||||
! { dg-options "-O2 -ftree-loop-linear" }
|
||||
! { dg-additional-options "-fdump-tree-graphite-details --param graphite-allow-codegen-errors=1" { target ilp32 } }
|
||||
! { dg-skip-if "" { *-*-* } { "-O0" } { "" } }
|
||||
! { dg-additional-options "-ftree-loop-linear" }
|
||||
|
||||
! Program to test the scalarizer
|
||||
program testarray
|
||||
|
|
@ -24,5 +24,3 @@ program testarray
|
|||
if (b(4, n) .ne. (6 - n)) call abort
|
||||
end do
|
||||
end program
|
||||
|
||||
! { dg-final { scan-tree-dump-times "code generation error" 1 "graphite" { target ilp32 } } }
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
! { dg-do compile { target i?86-*-* x86_64-*-* } }
|
||||
! { dg-require-effective-target ilp32 }
|
||||
! { dg-require-effective-target sse2 }
|
||||
! { dg-options "-O2 -floop-parallelize-all -fprefetch-loop-arrays -msse2 -fdump-tree-graphite-details --param graphite-allow-codegen-errors=1" }
|
||||
! { dg-options "-O2 -floop-parallelize-all -fprefetch-loop-arrays -msse2" }
|
||||
|
||||
subroutine phasad(t,i,ium)
|
||||
implicit none
|
||||
|
|
@ -16,5 +16,3 @@ subroutine phasad(t,i,ium)
|
|||
enddo
|
||||
return
|
||||
end subroutine phasad
|
||||
|
||||
! { dg-final { scan-tree-dump-times "code generation error" 1 "graphite" } }
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
! { dg-do compile { target i?86-*-* x86_64-*-* } }
|
||||
! { dg-require-effective-target ilp32 }
|
||||
! { dg-require-effective-target sse2 }
|
||||
! { dg-options "-O2 -floop-strip-mine -fprefetch-loop-arrays -msse2 -fdump-tree-graphite-details --param graphite-allow-codegen-errors=1" }
|
||||
! { dg-options "-O2 -floop-strip-mine -fprefetch-loop-arrays -msse2" }
|
||||
|
||||
subroutine blts ( ldmx, ldmy, v, tmp1, i, j, k)
|
||||
implicit none
|
||||
|
|
@ -33,5 +33,3 @@ subroutine phasad(t,i,ium)
|
|||
enddo
|
||||
return
|
||||
end subroutine phasad
|
||||
|
||||
! { dg-final { scan-tree-dump-times "code generation error" 1 "graphite" } }
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
! { dg-options "-O2 -floop-interchange -fdump-tree-graphite-details --param graphite-allow-codegen-errors=1" }
|
||||
! { dg-options "-O2 -floop-interchange" }
|
||||
|
||||
subroutine linel(icmdl,stre,anisox)
|
||||
real*8 stre(6),tkl(3,3),ekl(3,3),anisox(3,3,3,3)
|
||||
|
|
@ -14,5 +14,3 @@
|
|||
enddo
|
||||
stre(1)=tkl(1,1)
|
||||
end
|
||||
|
||||
! { dg-final { scan-tree-dump-times "code generation error" 1 "graphite" } }
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
! { dg-options "-O2 -fgraphite-identity -fno-loop-block -fno-loop-interchange -fno-loop-strip-mine -fdump-tree-graphite-details --param graphite-allow-codegen-errors=1" }
|
||||
! { dg-options "-O2 -fgraphite-identity -fno-loop-block -fno-loop-interchange -fno-loop-strip-mine" }
|
||||
|
||||
MODULE beta_gamma_psi
|
||||
INTEGER, PARAMETER :: dp=KIND(0.0D0)
|
||||
|
|
@ -22,5 +22,3 @@ CONTAINS
|
|||
fn_val = sum
|
||||
END FUNCTION basym
|
||||
END MODULE beta_gamma_psi
|
||||
|
||||
! { dg-final { scan-tree-dump-times "code generation error" 1 "graphite" } }
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
! { dg-options "-O2 -fgraphite-identity -fno-loop-block -fno-loop-interchange -fno-loop-strip-mine -fdump-tree-graphite-details --param graphite-allow-codegen-errors=1" }
|
||||
! { dg-options "-O2 -fgraphite-identity -fno-loop-block -fno-loop-interchange -fno-loop-strip-mine" }
|
||||
|
||||
MODULE beta_gamma_psi
|
||||
INTEGER, PARAMETER :: dp=KIND(0.0D0)
|
||||
|
|
@ -28,5 +28,3 @@ CONTAINS
|
|||
fn_val = e0*t*u*sum
|
||||
END FUNCTION basym
|
||||
END MODULE beta_gamma_psi
|
||||
|
||||
! { dg-final { scan-tree-dump-times "code generation error" 1 "graphite" } }
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
! { dg-options "-O -ftree-pre -fgraphite-identity -fno-tree-copy-prop -fdump-tree-graphite-details --param graphite-allow-codegen-errors=1" }
|
||||
! { dg-options "-O -ftree-pre -fgraphite-identity -fno-tree-copy-prop" }
|
||||
|
||||
subroutine foo (ldmx,ldmy,v)
|
||||
integer :: ldmx, ldmy, v, l, m
|
||||
|
|
@ -10,5 +10,3 @@
|
|||
v(m,3,2) = m
|
||||
end do
|
||||
end
|
||||
|
||||
! { dg-final { scan-tree-dump-times "code generation error" 1 "graphite" } }
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
! { dg-do compile }
|
||||
! { dg-options "-floop-nest-optimize -fcheck=bounds -O1" }
|
||||
! { dg-additional-options "-fdump-tree-graphite-details --param graphite-allow-codegen-errors=1" { target ilp32 } }
|
||||
|
||||
SUBROUTINE PD2VAL(RES,NDERIV,TG1,TG2,C0)
|
||||
INTEGER, PARAMETER :: dp=8
|
||||
|
|
@ -13,5 +12,3 @@ SUBROUTINE PD2VAL(RES,NDERIV,TG1,TG2,C0)
|
|||
RES(K)=RES(K)+DOT_PRODUCT(T1(0:3),C0(96:99,K))*T2(10)
|
||||
ENDDO
|
||||
END SUBROUTINE PD2VAL
|
||||
|
||||
! { dg-final { scan-tree-dump-times "code generation error" 1 "graphite" { target ilp32 } } }
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
! { dg-additional-options "-fdump-tree-graphite-details --param graphite-allow-codegen-errors=1" { target ilp32 } }
|
||||
IMPLICIT NONE
|
||||
INTEGER, PARAMETER :: dp=KIND(0.0D0)
|
||||
REAL(KIND=dp) :: res
|
||||
|
|
@ -65,4 +64,3 @@ CONTAINS
|
|||
END FUNCTION exp_radius_very_extended
|
||||
|
||||
END
|
||||
! { dg-final { scan-tree-dump-times "code generation error" 1 "graphite" { target ilp32 } } }
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
! { dg-do run }
|
||||
! { dg-options "-ffrontend-optimize -floop-nest-optimize" }
|
||||
! { dg-additional-options "-fdump-tree-graphite-details --param graphite-allow-codegen-errors=1" { target ilp32 } }
|
||||
! { dg-skip-if "" { *-*-* } { "-O0" } { "" } }
|
||||
! { dg-additional-options "-ffrontend-optimize -floop-nest-optimize" }
|
||||
! PR 56872 - wrong front-end optimization with a single constructor.
|
||||
! Original bug report by Rich Townsend.
|
||||
integer :: k
|
||||
|
|
@ -11,4 +11,3 @@
|
|||
res = SUM([(s**(REAL(k-1)/REAL(m-1)),k=1,m)])
|
||||
if (abs(res - 5.84732246) > 1e-6) call abort
|
||||
end
|
||||
! { dg-final { scan-tree-dump-times "code generation error" 1 "graphite" { target ilp32 } } }
|
||||
|
|
|
|||
|
|
@ -1226,6 +1226,8 @@ get_reaching_def (tree var)
|
|||
if (currdef == NULL_TREE)
|
||||
{
|
||||
tree sym = DECL_P (var) ? var : SSA_NAME_VAR (var);
|
||||
if (! sym)
|
||||
sym = create_tmp_reg (TREE_TYPE (var));
|
||||
currdef = get_or_create_ssa_default_def (cfun, sym);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue