aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2011-03-04 21:38:15 +0000
committerFelix Fietkau <nbd@openwrt.org>2011-03-04 21:38:15 +0000
commit3f3a1e406d84db876fafda826f1dbd46a8c2647f (patch)
treeb7657e7918e43d4306140df7dfacf5749e018cd0
parent020319a7cc425efb1098aad3936282c04f73510c (diff)
downloadupstream-3f3a1e406d84db876fafda826f1dbd46a8c2647f.tar.gz
upstream-3f3a1e406d84db876fafda826f1dbd46a8c2647f.tar.bz2
upstream-3f3a1e406d84db876fafda826f1dbd46a8c2647f.zip
toolchain/gcc (linaro): fix extension elimination optimization
This applies Richard Sandiford's patch for Linaro GCC as an alternative to disabling the Linaro-specific extension elimination optimization altogether. Original patch: https://bugs.launchpad.net/gcc-linaro/+bug/728315 Signed-off-by: Mark Mentovai <mark@moxienet.com> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@25871 3c298f89-4303-0410-b956-a3cf2f4a3e73
-rw-r--r--toolchain/gcc/patches/linaro/860-disable_extension_elimination.patch11
-rw-r--r--toolchain/gcc/patches/linaro/860-fix_extension_elimination.patch18
2 files changed, 18 insertions, 11 deletions
diff --git a/toolchain/gcc/patches/linaro/860-disable_extension_elimination.patch b/toolchain/gcc/patches/linaro/860-disable_extension_elimination.patch
deleted file mode 100644
index 7edc0ab0aa..0000000000
--- a/toolchain/gcc/patches/linaro/860-disable_extension_elimination.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/gcc/opts.c
-+++ b/gcc/opts.c
-@@ -906,7 +906,7 @@ decode_options (unsigned int argc, const
- flag_tree_if_to_switch_conversion = opt2;
- flag_ipa_cp = opt2;
- flag_ipa_sra = opt2;
-- flag_ee = opt2;
-+ flag_ee = 0;
-
- /* Track fields in field-sensitive alias analysis. */
- set_param_value ("max-fields-for-field-sensitive",
diff --git a/toolchain/gcc/patches/linaro/860-fix_extension_elimination.patch b/toolchain/gcc/patches/linaro/860-fix_extension_elimination.patch
new file mode 100644
index 0000000000..387e02a789
--- /dev/null
+++ b/toolchain/gcc/patches/linaro/860-fix_extension_elimination.patch
@@ -0,0 +1,18 @@
+https://bugs.launchpad.net/gcc-linaro/+bug/728315
+https://lists.openwrt.org/pipermail/openwrt-devel/2011-March/009847.html
+
+--- a/gcc/ee.c
++++ b/gcc/ee.c
+@@ -209,7 +209,11 @@
+
+ *regno = REGNO (reg);
+
+- if (paradoxical_subreg_p (use))
++ /* Non-paradoxical SUBREGs of promoted vars guarantee that the
++ upper (elided) bits of the inner register have a particular value.
++ For our purposes, such SUBREGs act as a full reference to the
++ inner register. */
++ if (paradoxical_subreg_p (use) || SUBREG_PROMOTED_VAR_P (use))
+ *size = GET_MODE_BITSIZE (GET_MODE (reg));
+ else
+ *size = subreg_lsb (use) + GET_MODE_BITSIZE (GET_MODE (use));