diff options
author | Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> | 2012-07-18 20:19:08 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-07-18 22:24:41 +0100 |
commit | 3e89b62a4783604550731b8846f8d9147a8f5d5c (patch) | |
tree | c0cafba3717317e44fb2d3c0afe5fd7669cafb42 /meta/recipes-devtools/gcc | |
parent | ac7a0311825e20c544d17bfd8be63546ad36e665 (diff) | |
download | poky-3e89b62a4783604550731b8846f8d9147a8f5d5c.tar.gz |
gcc: remove 904-flatten-switch-stmt-00.patch
Remove brute-force flattening and bump PR.
Refer to -ftree-switch-conversion emit_case_bit_tests(),
-ftree-if-to-switch-conversion et al in 4.8
(From OE-Core rev: 2eb0e56217137ece3d86a70676a3f3c8db525459)
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/gcc')
-rw-r--r-- | meta/recipes-devtools/gcc/gcc-4.7.inc | 3 | ||||
-rw-r--r-- | meta/recipes-devtools/gcc/gcc-4.7/904-flatten-switch-stmt-00.patch | 76 |
2 files changed, 1 insertions, 78 deletions
diff --git a/meta/recipes-devtools/gcc/gcc-4.7.inc b/meta/recipes-devtools/gcc/gcc-4.7.inc index ece32c1546..43d77ecf07 100644 --- a/meta/recipes-devtools/gcc/gcc-4.7.inc +++ b/meta/recipes-devtools/gcc/gcc-4.7.inc | |||
@@ -1,6 +1,6 @@ | |||
1 | require gcc-common.inc | 1 | require gcc-common.inc |
2 | 2 | ||
3 | PR = "r6" | 3 | PR = "r7" |
4 | 4 | ||
5 | # Third digit in PV should be incremented after a minor release | 5 | # Third digit in PV should be incremented after a minor release |
6 | # happens from this branch on gcc e.g. currently its 4.7.1 | 6 | # happens from this branch on gcc e.g. currently its 4.7.1 |
@@ -52,7 +52,6 @@ SRC_URI = "git://github.com/mirrors/gcc.git;branch=${BRANCH};protocol=git \ | |||
52 | file://306-libstdc++-namespace.patch \ | 52 | file://306-libstdc++-namespace.patch \ |
53 | file://740-sh-pr24836.patch \ | 53 | file://740-sh-pr24836.patch \ |
54 | file://800-arm-bigendian.patch \ | 54 | file://800-arm-bigendian.patch \ |
55 | file://904-flatten-switch-stmt-00.patch \ | ||
56 | file://arm-nolibfloat.patch \ | 55 | file://arm-nolibfloat.patch \ |
57 | file://gcc-poison-system-directories.patch \ | 56 | file://gcc-poison-system-directories.patch \ |
58 | file://gcc-poison-dir-extend.patch \ | 57 | file://gcc-poison-dir-extend.patch \ |
diff --git a/meta/recipes-devtools/gcc/gcc-4.7/904-flatten-switch-stmt-00.patch b/meta/recipes-devtools/gcc/gcc-4.7/904-flatten-switch-stmt-00.patch deleted file mode 100644 index e790e06dcb..0000000000 --- a/meta/recipes-devtools/gcc/gcc-4.7/904-flatten-switch-stmt-00.patch +++ /dev/null | |||
@@ -1,76 +0,0 @@ | |||
1 | Upstream-Status: Pending | ||
2 | |||
3 | Hi, | ||
4 | |||
5 | The attached patch makes sure that we create smaller object code for | ||
6 | simple switch statements. We just make sure to flatten the switch | ||
7 | statement into an if-else chain, basically. | ||
8 | |||
9 | This fixes a size-regression as compared to gcc-3.4, as can be seen | ||
10 | below. | ||
11 | |||
12 | 2007-04-15 Bernhard Fischer <..> | ||
13 | |||
14 | * stmt.c (expand_case): Do not create a complex binary tree when | ||
15 | optimizing for size but rather use the simple ordered list. | ||
16 | (emit_case_nodes): do not emit jumps to the default_label when | ||
17 | optimizing for size. | ||
18 | |||
19 | Not regtested so far. | ||
20 | Comments? | ||
21 | |||
22 | Attached is the test switch.c mentioned below. | ||
23 | |||
24 | $ for i in 2.95 3.3 3.4 4.0 4.1 4.2.orig-HEAD 4.3.orig-HEAD 4.3-HEAD;do | ||
25 | gcc-$i -DCHAIN -Os -o switch-CHAIN-$i.o -c switch.c ;done | ||
26 | $ for i in 2.95 3.3 3.4 4.0 4.1 4.2.orig-HEAD 4.3.orig-HEAD 4.3-HEAD;do | ||
27 | gcc-$i -UCHAIN -Os -o switch-$i.o -c switch.c ;done | ||
28 | |||
29 | $ size switch-*.o | ||
30 | text data bss dec hex filename | ||
31 | 169 0 0 169 a9 switch-2.95.o | ||
32 | 115 0 0 115 73 switch-3.3.o | ||
33 | 103 0 0 103 67 switch-3.4.o | ||
34 | 124 0 0 124 7c switch-4.0.o | ||
35 | 124 0 0 124 7c switch-4.1.o | ||
36 | 124 0 0 124 7c switch-4.2.orig-HEAD.o | ||
37 | 95 0 0 95 5f switch-4.3-HEAD.o | ||
38 | 124 0 0 124 7c switch-4.3.orig-HEAD.o | ||
39 | 166 0 0 166 a6 switch-CHAIN-2.95.o | ||
40 | 111 0 0 111 6f switch-CHAIN-3.3.o | ||
41 | 95 0 0 95 5f switch-CHAIN-3.4.o | ||
42 | 95 0 0 95 5f switch-CHAIN-4.0.o | ||
43 | 95 0 0 95 5f switch-CHAIN-4.1.o | ||
44 | 95 0 0 95 5f switch-CHAIN-4.2.orig-HEAD.o | ||
45 | 95 0 0 95 5f switch-CHAIN-4.3-HEAD.o | ||
46 | 95 0 0 95 5f switch-CHAIN-4.3.orig-HEAD.o | ||
47 | |||
48 | |||
49 | Content-Type: text/x-diff; charset=us-ascii | ||
50 | Content-Disposition: attachment; filename="gcc-4.3.gcc-flatten-switch-stmt.00.diff" | ||
51 | |||
52 | Index: gcc-4_7-branch/gcc/stmt.c | ||
53 | =================================================================== | ||
54 | --- gcc-4_7-branch.orig/gcc/stmt.c 2012-04-10 10:19:49.095337065 -0700 | ||
55 | +++ gcc-4_7-branch/gcc/stmt.c 2012-04-10 10:32:52.219375048 -0700 | ||
56 | @@ -2397,7 +2397,11 @@ | ||
57 | default code is emitted. */ | ||
58 | |||
59 | use_cost_table = estimate_case_costs (case_list); | ||
60 | - balance_case_nodes (&case_list, NULL); | ||
61 | + /* When optimizing for size, we want a straight list to avoid | ||
62 | + jumps as much as possible. This basically creates an if-else | ||
63 | + chain. */ | ||
64 | + if (!optimize_size) | ||
65 | + balance_case_nodes (&case_list, NULL); | ||
66 | emit_case_nodes (index, case_list, default_label, index_type); | ||
67 | if (default_label) | ||
68 | emit_jump (default_label); | ||
69 | @@ -2965,6 +2969,7 @@ | ||
70 | { | ||
71 | if (!node_has_low_bound (node, index_type)) | ||
72 | { | ||
73 | + if (!optimize_size) /* don't jl to the .default_label. */ | ||
74 | emit_cmp_and_jump_insns (index, | ||
75 | convert_modes | ||
76 | (mode, imode, | ||