This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug tree-optimization/87985] Compile-time and memory hog w/ -O1 -ftree-slp-vectorize


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87985

--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> ---
diff --git a/gcc/tree-data-ref.c b/gcc/tree-data-ref.c
index 6019c6168bf..d60d389fa0a 100644
--- a/gcc/tree-data-ref.c
+++ b/gcc/tree-data-ref.c
@@ -682,7 +684,8 @@ split_constant_offset_1 (tree type, tree op0, enum
tree_code code, tree op1,

     case SSA_NAME:
       {
-       if (SSA_NAME_OCCURS_IN_ABNORMAL_PHI (op0))
+       if (SSA_NAME_OCCURS_IN_ABNORMAL_PHI (op0)
+           || !has_single_use (op0))
          return false;

        gimple *def_stmt = SSA_NAME_DEF_STMT (op0);

fixes this but that's very likely too restrictive.  We are merely interested
to limit multiple uses in the expression itself as we'd otherwise un-CSE
those.  A full-blown hash-map would do the trick here I guess.  But at
what expense?

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]