Patchwork committed: minor sched-int.h and sched-deps.c fixes

login
register
mail settings
Submitter Steven Bosscher
Date April 13, 2013, 6:12 p.m.
Message ID <CABu31nND2yKpMcyX0oZNCsUzENs7CiPJh0Ob2t5QTeD7=QDBRw@mail.gmail.com>
Download mbox | patch
Permalink /patch/236385/
State New
Headers show

Comments

Steven Bosscher - April 13, 2013, 6:12 p.m.
Hello,

In sched-deps.c:deps_analyze_insn there's no need to look for
EH_REGION notes, they don't exist until just before final. This
assert, and some code in alpha.c (PR56858), are the only remaining
meaningful references outside final.c

In sched-int.h, the header is only non-empty if INSN_SCHEDULING is
defined. After "#ifdef INSN_SCHEDULING" the first header included is
insn-attr.h - which defines (or not) INSN_SCHEDULING. So move that
include outside the "#ifdef INSN_SCHEDULING" guard.

Bootstrapped and tested on several targets over the past three weeks. Committed.

Ciao!
Steven


        * sched-deps.c (deps_analyze_insn): Do not check for EH_REGION insn
        notes, they are emitted only just before final.
        * sched-int.h: Include insn-attr.h before checking INSN_SCHEDULING.

Patch

Index: sched-deps.c
===================================================================
--- sched-deps.c        (revision 197944)
+++ sched-deps.c        (working copy)
@@ -3680,12 +3680,6 @@  deps_analyze_insn (struct deps_desc *deps, rtx ins
   if (sched_deps_info->use_cselib)
     cselib_process_insn (insn);

-  /* EH_REGION insn notes can not appear until well after we complete
-     scheduling.  */
-  if (NOTE_P (insn))
-    gcc_assert (NOTE_KIND (insn) != NOTE_INSN_EH_REGION_BEG
-               && NOTE_KIND (insn) != NOTE_INSN_EH_REGION_END);
-
   if (sched_deps_info->finish_insn)
     sched_deps_info->finish_insn ();

Index: sched-int.h
===================================================================
--- sched-int.h (revision 197944)
+++ sched-int.h (working copy)
@@ -21,10 +21,10 @@  along with GCC; see the file COPYING3.  If not see
 #ifndef GCC_SCHED_INT_H
 #define GCC_SCHED_INT_H

+#include "insn-attr.h"
+
 #ifdef INSN_SCHEDULING

-/* For state_t.  */
-#include "insn-attr.h"
 #include "df.h"
 #include "basic-block.h"