diff options
author | Nathan Rossi <nathan.rossi@xilinx.com> | 2015-04-17 15:38:04 +1000 |
---|---|---|
committer | Nathan Rossi <nathan.rossi@xilinx.com> | 2015-04-17 15:38:04 +1000 |
commit | f80dac49ecbd4b3de0abc6e89bb1ed04d5c67b24 (patch) | |
tree | b97875886e89d162febb57d5a49453bdd7d1b9ba /recipes-devtools/gcc/files/gcc-Cherry-pick-mainline-patch-to-resolve-MB-k.patch | |
parent | 1207db6f96a0c1bd0fb95a176cc8d5627dd406ed (diff) | |
download | meta-xilinx-f80dac49ecbd4b3de0abc6e89bb1ed04d5c67b24.tar.gz |
recipes-microblaze: Move all MicroBlaze appends
* Move recipes that are specifically for MicroBlaze support into the
recipes-microblaze directory
Signed-off-by: Nathan Rossi <nathan.rossi@xilinx.com>
Diffstat (limited to 'recipes-devtools/gcc/files/gcc-Cherry-pick-mainline-patch-to-resolve-MB-k.patch')
-rw-r--r-- | recipes-devtools/gcc/files/gcc-Cherry-pick-mainline-patch-to-resolve-MB-k.patch | 110 |
1 files changed, 0 insertions, 110 deletions
diff --git a/recipes-devtools/gcc/files/gcc-Cherry-pick-mainline-patch-to-resolve-MB-k.patch b/recipes-devtools/gcc/files/gcc-Cherry-pick-mainline-patch-to-resolve-MB-k.patch deleted file mode 100644 index 1cdc4029..00000000 --- a/recipes-devtools/gcc/files/gcc-Cherry-pick-mainline-patch-to-resolve-MB-k.patch +++ /dev/null | |||
@@ -1,110 +0,0 @@ | |||
1 | Subject: Cherry-pick mainline patch to resolve MB kernel panic | ||
2 | |||
3 | Cherry-pick backend optimization patch from gcc HEAD which 'resolves' a kernel | ||
4 | panic for microblaze when compiled with -Os | ||
5 | |||
6 | Upstream HEAD (soon to be gcc 4.9) does not exhibt this error any longer, | ||
7 | and this patch when applied as a workaround on the 4.8 branch also hides the | ||
8 | kernel panic resulting from incorrect branch-delay slot filling. | ||
9 | |||
10 | * tree-ssa-threadedge.c (thread_around_empty_block): Remove | ||
11 | checks for the number of predecessors and successors allowed. | ||
12 | * tree-ssa-threadupdate.c (mark_threaded_blocks): Ignore requests | ||
13 | which require copying a joiner block if there is a request which | ||
14 | is a subpath that requires no joiner block copying. | ||
15 | |||
16 | Signed-off-by: David Holsgrove <david.holsgrove@xilinx.com> | ||
17 | Upstream-Status: Backport | ||
18 | --- | ||
19 | gcc/tree-ssa-threadedge.c | 8 ------- | ||
20 | gcc/tree-ssa-threadupdate.c | 49 ++++++++++++++++++++++++++++++++++++++----- | ||
21 | 2 files changed, 44 insertions(+), 13 deletions(-) | ||
22 | |||
23 | diff --git a/gcc/tree-ssa-threadedge.c b/gcc/tree-ssa-threadedge.c | ||
24 | index b31e961..ab58ae8 100644 | ||
25 | --- a/gcc/tree-ssa-threadedge.c | ||
26 | +++ b/gcc/tree-ssa-threadedge.c | ||
27 | @@ -761,14 +761,6 @@ thread_around_empty_block (edge taken_edge, | ||
28 | gimple stmt; | ||
29 | tree cond; | ||
30 | |||
31 | - /* This block must have a single predecessor (E->dest). */ | ||
32 | - if (!single_pred_p (bb)) | ||
33 | - return NULL; | ||
34 | - | ||
35 | - /* This block must have more than one successor. */ | ||
36 | - if (single_succ_p (bb)) | ||
37 | - return NULL; | ||
38 | - | ||
39 | /* This block can have no PHI nodes. This is overly conservative. */ | ||
40 | if (!gsi_end_p (gsi_start_phis (bb))) | ||
41 | return NULL; | ||
42 | diff --git a/gcc/tree-ssa-threadupdate.c b/gcc/tree-ssa-threadupdate.c | ||
43 | index 0e4cbc9..cf8df8e 100644 | ||
44 | --- a/gcc/tree-ssa-threadupdate.c | ||
45 | +++ b/gcc/tree-ssa-threadupdate.c | ||
46 | @@ -1146,17 +1146,56 @@ mark_threaded_blocks (bitmap threaded_blocks) | ||
47 | edge e; | ||
48 | edge_iterator ei; | ||
49 | |||
50 | + /* It is possible to have jump threads in which one is a subpath | ||
51 | + of the other. ie, (A, B), (B, C), (C, D) where B is a joiner | ||
52 | + block and (B, C), (C, D) where no joiner block exists. | ||
53 | + | ||
54 | + When this occurs ignore the jump thread request with the joiner | ||
55 | + block. It's totally subsumed by the simpler jump thread request. | ||
56 | + | ||
57 | + This results in less block copying, simpler CFGs. More improtantly, | ||
58 | + when we duplicate the joiner block, B, in this case we will create | ||
59 | + a new threading opportunity that we wouldn't be able to optimize | ||
60 | + until the next jump threading iteration. | ||
61 | + | ||
62 | + So first convert the jump thread requests which do not require a | ||
63 | + joiner block. */ | ||
64 | for (i = 0; i < threaded_edges.length (); i += 3) | ||
65 | { | ||
66 | edge e = threaded_edges[i]; | ||
67 | - edge *x = XNEWVEC (edge, 2); | ||
68 | |||
69 | - e->aux = x; | ||
70 | - THREAD_TARGET (e) = threaded_edges[i + 1]; | ||
71 | - THREAD_TARGET2 (e) = threaded_edges[i + 2]; | ||
72 | - bitmap_set_bit (tmp, e->dest->index); | ||
73 | + if (threaded_edges[i + 2] == NULL) | ||
74 | + { | ||
75 | + edge *x = XNEWVEC (edge, 2); | ||
76 | + | ||
77 | + e->aux = x; | ||
78 | + THREAD_TARGET (e) = threaded_edges[i + 1]; | ||
79 | + THREAD_TARGET2 (e) = NULL; | ||
80 | + bitmap_set_bit (tmp, e->dest->index); | ||
81 | + } | ||
82 | } | ||
83 | |||
84 | + | ||
85 | + /* Now iterate again, converting cases where we threaded through | ||
86 | + a joiner block, but ignoring those where we have already | ||
87 | + threaded through the joiner block. */ | ||
88 | + for (i = 0; i < threaded_edges.length (); i += 3) | ||
89 | + { | ||
90 | + edge e = threaded_edges[i]; | ||
91 | + | ||
92 | + if (threaded_edges[i + 2] != NULL | ||
93 | + && threaded_edges[i + 1]->aux == NULL) | ||
94 | + { | ||
95 | + edge *x = XNEWVEC (edge, 2); | ||
96 | + | ||
97 | + e->aux = x; | ||
98 | + THREAD_TARGET (e) = threaded_edges[i + 1]; | ||
99 | + THREAD_TARGET2 (e) = threaded_edges[i + 2]; | ||
100 | + bitmap_set_bit (tmp, e->dest->index); | ||
101 | + } | ||
102 | + } | ||
103 | + | ||
104 | + | ||
105 | /* If optimizing for size, only thread through block if we don't have | ||
106 | to duplicate it or it's an otherwise empty redirection block. */ | ||
107 | if (optimize_function_for_size_p (cfun)) | ||
108 | -- | ||
109 | 1.7.9.5 | ||
110 | |||