From: Richard Biener Date: Fri, 13 Oct 2017 06:57:11 +0000 (+0000) Subject: graphite-scop-detection.c (loop_ivs_can_be_represented): Remove. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=cae827b1a1a2f02d08fa0602e1cdaf991a8248ea;p=gcc.git graphite-scop-detection.c (loop_ivs_can_be_represented): Remove. 2017-10-13 Richard Biener * graphite-scop-detection.c (loop_ivs_can_be_represented): Remove. (scop_detection::harmful_loop_in_region): Remove premature IV type restriction. (scop_detection::graphite_can_represent_scev): We can handle pointer IVs just fine. From-SVN: r253705 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index a83c95aec8e..96033a8cb24 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,11 @@ +2017-10-13 Richard Biener + + * graphite-scop-detection.c (loop_ivs_can_be_represented): Remove. + (scop_detection::harmful_loop_in_region): Remove premature + IV type restriction. + (scop_detection::graphite_can_represent_scev): We can handle + pointer IVs just fine. + 2017-10-13 Alan Modra * doc/extend.texi (Extended Asm ): Rename to diff --git a/gcc/graphite-scop-detection.c b/gcc/graphite-scop-detection.c index 93ab0354efb..3cd99322b77 100644 --- a/gcc/graphite-scop-detection.c +++ b/gcc/graphite-scop-detection.c @@ -254,28 +254,6 @@ dot_cfg () scops.release (); } -/* 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. */ - -static bool -loop_ivs_can_be_represented (loop_p loop) -{ - unsigned type_long_long = TYPE_PRECISION (long_long_integer_type_node); - for (gphi_iterator psi = gsi_start_phis (loop->header); !gsi_end_p (psi); - gsi_next (&psi)) - { - gphi *phi = psi.phi (); - tree res = PHI_RESULT (phi); - tree type = TREE_TYPE (res); - - if (TYPE_UNSIGNED (type) && TYPE_PRECISION (type) >= type_long_long) - return false; - } - - return true; -} - /* Returns a COND_EXPR statement when BB has a single predecessor, the edge between BB and its predecessor is not a loop exit edge, and the last statement of the single predecessor is a COND_EXPR. */ @@ -822,13 +800,6 @@ scop_detection::harmful_loop_in_region (sese_l scop) const return true; } - if (! loop_ivs_can_be_represented (loop)) - { - DEBUG_PRINT (dp << "[scop-detection-fail] loop_" << loop->num - << "IV cannot be represented.\n"); - return true; - } - /* Check if all loop nests have at least one data reference. ??? This check is expensive and loops premature at this point. If important to retain we can pre-compute this for all innermost @@ -968,14 +939,6 @@ scop_detection::graphite_can_represent_scev (tree scev) if (chrec_contains_undetermined (scev)) return false; - /* We disable the handling of pointer types, because it’s currently not - supported by Graphite with the isl AST generator. SSA_NAME nodes are - the only nodes, which are disabled in case they are pointers to object - types, but this can be changed. */ - - if (POINTER_TYPE_P (TREE_TYPE (scev)) && TREE_CODE (scev) == SSA_NAME) - return false; - switch (TREE_CODE (scev)) { case NEGATE_EXPR: