aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorg-Johann Lay <avr@gjlay.de>2016-10-26 09:46:44 +0000
committerGeorg-Johann Lay <gjl@gcc.gnu.org>2016-10-26 09:46:44 +0000
commitb6735d9ac58384640379f449db791bc59ce4f854 (patch)
tree9437b562ad2d3db5bc1ab57e03bb0a1aca369e1b
parent9e8b0bba61cd8b28f2babb3e4844176053f593d5 (diff)
downloadgcc-b6735d9ac58384640379f449db791bc59ce4f854.zip
gcc-b6735d9ac58384640379f449db791bc59ce4f854.tar.gz
gcc-b6735d9ac58384640379f449db791bc59ce4f854.tar.bz2
gen-pass-instances.awk is sensitive to the order in which passes are added...
gen-pass-instances.awk is sensitive to the order in which passes are added; passes that appear later have to be added first. PR target/71676 PR target/71678 * config/avr/avr-passes.def: Swap order of directives for gen-pass-instances.awk. From-SVN: r241547
-rw-r--r--gcc/ChangeLog10
-rw-r--r--gcc/config/avr/avr-passes.def23
2 files changed, 23 insertions, 10 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 465761f..5a93e88 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,13 @@
+2016-10-26 Georg-Johann Lay <avr@gjlay.de>
+
+ gen-pass-instances.awk is sensitive to the order in which
+ passes are added; passes that appear later have to be added first.
+
+ PR target/71676
+ PR target/71678
+ * config/avr/avr-passes.def: Swap order of directives for
+ gen-pass-instances.awk.
+
2016-10-25 Jeff Law <law@redhat.com>
* config/vax/vax.c (vad_address_cost_1): Add missing FALLTHRU comment.
diff --git a/gcc/config/avr/avr-passes.def b/gcc/config/avr/avr-passes.def
index b536a22..4ca67b12 100644
--- a/gcc/config/avr/avr-passes.def
+++ b/gcc/config/avr/avr-passes.def
@@ -17,6 +17,19 @@
along with GCC; see the file COPYING3. If not see
<http://www.gnu.org/licenses/>. */
+/* FIXME: We have to add the last pass first, otherwise
+ gen-pass-instances.awk won't work as expected. */
+
+/* This avr-specific pass (re)computes insn notes, in particular REG_DEAD
+ notes which are used by `avr.c::reg_unused_after' and branch offset
+ computations. These notes must be correct, i.e. there must be no
+ dangling REG_DEAD notes; otherwise wrong code might result, cf. PR64331.
+
+ DF needs (correct) CFG, hence right before free_cfg is the last
+ opportunity to rectify notes. */
+
+INSERT_PASS_BEFORE (pass_free_cfg, 1, avr_pass_recompute_notes);
+
/* casesi uses a SImode switch index which is quite costly as most code will
work on HImode or QImode. The following pass runs right after .expand and
tries to fix such situations by operating on the original mode. This
@@ -27,13 +40,3 @@
insns withaout any insns in between. */
INSERT_PASS_AFTER (pass_expand, 1, avr_pass_casesi);
-
-/* This avr-specific pass (re)computes insn notes, in particular REG_DEAD
- notes which are used by `avr.c::reg_unused_after' and branch offset
- computations. These notes must be correct, i.e. there must be no
- dangling REG_DEAD notes; otherwise wrong code might result, cf. PR64331.
-
- DF needs (correct) CFG, hence right before free_cfg is the last
- opportunity to rectify notes. */
-
-INSERT_PASS_BEFORE (pass_free_cfg, 1, avr_pass_recompute_notes);