#include "graphite-poly.h"
#include "tree-ssa-propagate.h"
#include "graphite-scop-detection.h"
+#include "gimple-pretty-print.h"
/* Forward declarations. */
static void make_close_phi_nodes_unique (basic_block);
|| (gimple_code (stmt) == GIMPLE_CALL
&& !(gimple_call_flags (stmt) & (ECF_CONST | ECF_PURE)))
|| (gimple_code (stmt) == GIMPLE_ASM))
- return false;
+ {
+ if (dump_file && (dump_flags & TDF_DETAILS))
+ {
+ fprintf (dump_file, "[scop-detection-fail] ");
+ fprintf (dump_file, "Graphite cannot handle this stmt:\n");
+ print_gimple_stmt (dump_file, stmt, 0, TDF_VOPS|TDF_MEMSYMS);
+ }
+
+ return false;
+ }
if (is_gimple_debug (stmt))
return true;
if (!stmt_has_simple_data_refs_p (outermost_loop, stmt))
- return false;
+ {
+ if (dump_file && (dump_flags & TDF_DETAILS))
+ {
+ fprintf (dump_file, "[scop-detection-fail] ");
+ fprintf (dump_file, "Graphite cannot handle data-refs in stmt:\n");
+ print_gimple_stmt (dump_file, stmt, 0, TDF_VOPS|TDF_MEMSYMS);
+ }
+
+ return false;
+ }
switch (gimple_code (stmt))
{
|| code == GE_EXPR
|| code == EQ_EXPR
|| code == NE_EXPR))
- return false;
+ {
+ if (dump_file && (dump_flags & TDF_DETAILS))
+ {
+ fprintf (dump_file, "[scop-detection-fail] ");
+ fprintf (dump_file, "Graphite cannot handle cond stmt:\n");
+ print_gimple_stmt (dump_file, stmt, 0, TDF_VOPS|TDF_MEMSYMS);
+ }
+
+ return false;
+ }
for (unsigned i = 0; i < 2; ++i)
{
if (!graphite_can_represent_expr (scop_entry, loop, op)
/* We can not handle REAL_TYPE. Failed for pr39260. */
|| TREE_CODE (TREE_TYPE (op)) == REAL_TYPE)
- return false;
+ {
+ if (dump_file && (dump_flags & TDF_DETAILS))
+ {
+ fprintf (dump_file, "[scop-detection-fail] ");
+ fprintf (dump_file, "Graphite cannot represent stmt:\n");
+ print_gimple_stmt (dump_file, stmt, 0, TDF_VOPS|TDF_MEMSYMS);
+ }
+
+ return false;
+ }
}
return true;
default:
/* These nodes cut a new scope. */
+ if (dump_file && (dump_flags & TDF_DETAILS))
+ {
+ fprintf (dump_file, "[scop-detection-fail] ");
+ fprintf (dump_file, "Gimple stmt not handled in Graphite:\n");
+ print_gimple_stmt (dump_file, stmt, 0, TDF_VOPS|TDF_MEMSYMS);
+ }
return false;
}
with make_forwarder_block. */
if (!single_succ_p (bb)
|| bb_has_abnormal_pred (single_succ (bb)))
- result.difficult = true;
+ {
+ if (dump_file && (dump_flags & TDF_DETAILS))
+ {
+ fprintf (dump_file, "[scop-detection-fail] ");
+ fprintf (dump_file, "BB %d cannot be part of a scop.\n",
+ bb->index);
+ }
+
+ result.difficult = true;
+ }
else
result.exit = single_succ (bb);
sinfo = build_scops_1 (bb, outermost_loop, ®ions, loop);
if (!graphite_can_represent_loop (entry_block, loop))
- result.difficult = true;
+ {
+ if (dump_file && (dump_flags & TDF_DETAILS))
+ {
+ fprintf (dump_file, "[scop-detection-fail] ");
+ fprintf (dump_file, "Graphite cannot represent loop %d.\n",
+ loop->num);
+ }
+ result.difficult = true;
+ }
result.difficult |= sinfo.difficult;