diff options
author | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2018-02-27 14:45:46 +0000 |
---|---|---|
committer | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2018-02-27 14:45:46 +0000 |
commit | 583ab4de1abbd4d79e72ddc2a992d3693c54088a (patch) | |
tree | 6ae23f6d1bba92d671a7f34cfc6c7b871fdf4f10 | |
parent | 2d99ce8c2148f7a3beed42f196cbc9c0ab8883ad (diff) |
2018-02-27 Richard Biener <rguenther@suse.de>
PR tree-optimization/84466
* graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
Adjust last change to less strictly validate use operands.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@258035 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/graphite-scop-detection.c | 13 |
2 files changed, 16 insertions, 3 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index a230b12df57f..d4e56b3bd9b1 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2018-02-27 Richard Biener <rguenther@suse.de> + + PR tree-optimization/84466 + * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p): + Adjust last change to less strictly validate use operands. + 2018-02-27 Martin Liska <mliska@suse.cz> PR gcov-profile/84548 diff --git a/gcc/graphite-scop-detection.c b/gcc/graphite-scop-detection.c index 70cb773186ac..2331dec69190 100644 --- a/gcc/graphite-scop-detection.c +++ b/gcc/graphite-scop-detection.c @@ -1028,16 +1028,23 @@ scop_detection::stmt_simple_for_scop_p (sese_l scop, gimple *stmt, case GIMPLE_ASSIGN: case GIMPLE_CALL: { - tree op; + tree op, lhs = gimple_get_lhs (stmt); ssa_op_iter i; + /* If we are not going to instantiate the stmt do not require + its operands to be instantiatable at this point. */ + if (lhs + && TREE_CODE (lhs) == SSA_NAME + && scev_analyzable_p (lhs, scop)) + return true; /* Verify that if we can analyze operands at their def site we also can represent them when analyzed at their uses. */ FOR_EACH_SSA_TREE_OPERAND (op, stmt, i, SSA_OP_USE) if (scev_analyzable_p (op, scop) - && !graphite_can_represent_expr (scop, bb->loop_father, op)) + && chrec_contains_undetermined + (scalar_evolution_in_region (scop, bb->loop_father, op))) { DEBUG_PRINT (dp << "[scop-detection-fail] " - << "Graphite cannot represent stmt:\n"; + << "Graphite cannot code-gen stmt:\n"; print_gimple_stmt (dump_file, stmt, 0, TDF_VOPS | TDF_MEMSYMS)); return false; |