View | Details | Raw Unified | Return to bug 239813 | Differences between
and this patch

Collapse All | Expand All

(-)lang/gcc9.patched/Makefile (+1 lines)
Lines 40-45 Link Here
40
CXXFLAGS:=	${CXXFLAGS:N-mretpoline}
40
CXXFLAGS:=	${CXXFLAGS:N-mretpoline}
41
41
42
OPTIONS_DEFINE=		BOOTSTRAP GRAPHITE
42
OPTIONS_DEFINE=		BOOTSTRAP GRAPHITE
43
OPTIONS_EXCLUDE_powerpc64=	BOOTSTRAP
43
OPTIONS_DEFAULT=	BOOTSTRAP
44
OPTIONS_DEFAULT=	BOOTSTRAP
44
BOOTSTRAP_DESC=		Build using a full bootstrap
45
BOOTSTRAP_DESC=		Build using a full bootstrap
45
GRAPHITE_DESC=		Support for Graphite loop optimizations
46
GRAPHITE_DESC=		Support for Graphite loop optimizations
(-)lang/gcc9.patched/files/patch-clang-vec_step (+17 lines)
Line 0 Link Here
1
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=239266 reports how
2
clang unfortunately poisons user namespace by default (without any
3
special options), so we need to avoid using vec_step as a variable.
4
5
Index: gcc/tree-vect-loop.c
6
===================================================================
7
--- gcc/tree-vect-loop.c	(revision 273856)
8
+++ gcc/tree-vect-loop.c	(working copy)
9
@@ -55,6 +55,8 @@ along with GCC; see the file COPYING3.  If not see
10
 #include "vec-perm-indices.h"
11
 #include "tree-eh.h"
12
 
13
+#define vec_step vec_step_
14
+
15
 /* Loop Vectorization Pass.
16
 
17
    This pass tries to vectorize loops.
(-)lang/gcc9.patched/files/patch-gcc_config_rs6000_freebsd64.h (+22 lines)
Line 0 Link Here
1
r274105 | amodra | 2019-08-05 01:52:33 +0000
2
3
PR91349, powerpc64*-*-freebsd* defines _GNU_SOURCE
4
5
rev 266496 (git ab6b1bb456) undefined some macros in rs6000/freebsd.h
6
but missed doing the same in rs6000/freebsd64.h.
7
8
        PR target/91349
9
        * config/rs6000/freebsd64.h (CPLUSPLUS_CPP_SPEC),
10
        (LINK_GCC_C_SEQUENCE_SPEC): Undef.
11
12
--- gcc/config/rs6000/freebsd64.h.orig	2019-03-11 13:58:44 UTC
13
+++ gcc/config/rs6000/freebsd64.h
14
@@ -65,6 +65,8 @@ extern int dot_symbols;
15
 #define INVALID_64BIT "-m%s not supported in this configuration"
16
 #define INVALID_32BIT INVALID_64BIT
17
 
18
+#define LINUX64_DEFAULT_ABI_ELFv2
19
+
20
 /* Use LINUX64 instead of FREEBSD64 for compat with e.g. sysv4le.h */
21
 #ifdef LINUX64_DEFAULT_ABI_ELFv2
22
 #define ELFv2_ABI_CHECK (rs6000_elf_abi != 1)
(-)lang/gcc9.patched/files/patch-gcc_tree-vect-loop.c (+99 lines)
Line 0 Link Here
1
--- gcc/tree-vect-loop.c.orig	2019-08-13 09:28:03 UTC
2
+++ gcc/tree-vect-loop.c
3
@@ -4568,13 +4568,13 @@ vect_create_epilog_for_reduction (vec<tr
4
 
5
       /* Create a vector of the step value.  */
6
       tree step = build_int_cst (cr_index_scalar_type, nunits_out);
7
-      tree vec_step = build_vector_from_val (cr_index_vector_type, step);
8
+      tree vec_step_renamed = build_vector_from_val (cr_index_vector_type, step);
9
 
10
       /* Create an induction variable.  */
11
       gimple_stmt_iterator incr_gsi;
12
       bool insert_after;
13
       standard_iv_increment_position (loop, &incr_gsi, &insert_after);
14
-      create_iv (series_vect, vec_step, NULL_TREE, loop, &incr_gsi,
15
+      create_iv (series_vect, vec_step_renamed, NULL_TREE, loop, &incr_gsi,
16
 		 insert_after, &indx_before_incr, &indx_after_incr);
17
 
18
       /* Next create a new phi node vector (NEW_PHI_TREE) which starts
19
@@ -7230,7 +7230,7 @@ vectorizable_induction (stmt_vec_info st
20
   tree vec_def;
21
   edge pe = loop_preheader_edge (loop);
22
   basic_block new_bb;
23
-  tree new_vec, vec_init, vec_step, t;
24
+  tree new_vec, vec_init, vec_step_renamed, t;
25
   tree new_name;
26
   gimple *new_stmt;
27
   gphi *induction_phi;
28
@@ -7422,7 +7422,7 @@ vectorizable_induction (stmt_vec_info st
29
 	new_name = vect_init_vector (stmt_info, new_name,
30
 				     TREE_TYPE (step_expr), NULL);
31
       new_vec = build_vector_from_val (vectype, new_name);
32
-      vec_step = vect_init_vector (stmt_info, new_vec, vectype, NULL);
33
+      vec_step_renamed = vect_init_vector (stmt_info, new_vec, vectype, NULL);
34
 
35
       /* Now generate the IVs.  */
36
       unsigned group_size = SLP_TREE_SCALAR_STMTS (slp_node).length ();
37
@@ -7461,7 +7461,7 @@ vectorizable_induction (stmt_vec_info st
38
 
39
 	  /* Create the iv update inside the loop  */
40
 	  vec_def = make_ssa_name (vec_dest);
41
-	  new_stmt = gimple_build_assign (vec_def, PLUS_EXPR, induc_def, vec_step);
42
+	  new_stmt = gimple_build_assign (vec_def, PLUS_EXPR, induc_def, vec_step_renamed);
43
 	  gsi_insert_before (&si, new_stmt, GSI_SAME_STMT);
44
 	  loop_vinfo->add_stmt (new_stmt);
45
 
46
@@ -7492,7 +7492,7 @@ vectorizable_induction (stmt_vec_info st
47
 	    new_name = vect_init_vector (stmt_info, new_name,
48
 					 TREE_TYPE (step_expr), NULL);
49
 	  new_vec = build_vector_from_val (vectype, new_name);
50
-	  vec_step = vect_init_vector (stmt_info, new_vec, vectype, NULL);
51
+	  vec_step_renamed = vect_init_vector (stmt_info, new_vec, vectype, NULL);
52
 	  for (; ivn < nvects; ++ivn)
53
 	    {
54
 	      gimple *iv = SLP_TREE_VEC_STMTS (slp_node)[ivn - nivs]->stmt;
55
@@ -7503,7 +7503,7 @@ vectorizable_induction (stmt_vec_info st
56
 		def = gimple_assign_lhs (iv);
57
 	      new_stmt = gimple_build_assign (make_ssa_name (vectype),
58
 					      PLUS_EXPR,
59
-					      def, vec_step);
60
+					      def, vec_step_renamed);
61
 	      if (gimple_code (iv) == GIMPLE_PHI)
62
 		gsi_insert_before (&si, new_stmt, GSI_SAME_STMT);
63
 	      else
64
@@ -7627,7 +7627,7 @@ vectorizable_induction (stmt_vec_info st
65
   gcc_assert (CONSTANT_CLASS_P (new_name)
66
 	      || TREE_CODE (new_name) == SSA_NAME);
67
   new_vec = build_vector_from_val (vectype, t);
68
-  vec_step = vect_init_vector (stmt_info, new_vec, vectype, NULL);
69
+  vec_step_renamed = vect_init_vector (stmt_info, new_vec, vectype, NULL);
70
 
71
 
72
   /* Create the following def-use cycle:
73
@@ -7649,7 +7649,7 @@ vectorizable_induction (stmt_vec_info st
74
 
75
   /* Create the iv update inside the loop  */
76
   vec_def = make_ssa_name (vec_dest);
77
-  new_stmt = gimple_build_assign (vec_def, PLUS_EXPR, induc_def, vec_step);
78
+  new_stmt = gimple_build_assign (vec_def, PLUS_EXPR, induc_def, vec_step_renamed);
79
   gsi_insert_before (&si, new_stmt, GSI_SAME_STMT);
80
   stmt_vec_info new_stmt_info = loop_vinfo->add_stmt (new_stmt);
81
 
82
@@ -7693,7 +7693,7 @@ vectorizable_induction (stmt_vec_info st
83
       gcc_assert (CONSTANT_CLASS_P (new_name)
84
 		  || TREE_CODE (new_name) == SSA_NAME);
85
       new_vec = build_vector_from_val (vectype, t);
86
-      vec_step = vect_init_vector (stmt_info, new_vec, vectype, NULL);
87
+      vec_step_renamed = vect_init_vector (stmt_info, new_vec, vectype, NULL);
88
 
89
       vec_def = induc_def;
90
       prev_stmt_vinfo = induction_phi_info;
91
@@ -7701,7 +7701,7 @@ vectorizable_induction (stmt_vec_info st
92
 	{
93
 	  /* vec_i = vec_prev + vec_step  */
94
 	  new_stmt = gimple_build_assign (vec_dest, PLUS_EXPR,
95
-					  vec_def, vec_step);
96
+					  vec_def, vec_step_renamed);
97
 	  vec_def = make_ssa_name (vec_dest, new_stmt);
98
 	  gimple_assign_set_lhs (new_stmt, vec_def);
99
  

Return to bug 239813