diff options
author | bstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2016-02-10 15:13:54 +0000 |
---|---|---|
committer | bstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2016-02-10 15:13:54 +0000 |
commit | 8cff878b277f9af6c2827a87581baac5f768e12a (patch) | |
tree | d4e178503efd243eed24ff3b753cd998370d75d4 /gcc/genopinit.c | |
parent | 9610b14f8599a9db94822d3f0923b58b2f1177dc (diff) | |
download | gcc-8cff878b277f9af6c2827a87581baac5f768e12a.tar.gz |
[./]
2016-02-10 Basile Starynkevitch <basile@starynkevitch.net>
{{merging with some of GCC 6, using
svn merge -r222130:226090 ^/trunk ; UNSTABLE}}
[gcc/]
2016-02-10 Basile Starynkevitch <basile@starynkevitch.net>
{{ merging with trunk 226090 ; UNSTABLE }}
* melt-run.proto.h: include tree-ssa-scopedtables.h
* tree-ssa-dom.c: skip second record_edge_info
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/melt-branch@233272 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/genopinit.c')
-rw-r--r-- | gcc/genopinit.c | 44 |
1 files changed, 17 insertions, 27 deletions
diff --git a/gcc/genopinit.c b/gcc/genopinit.c index 7fa59eb89aa..3ff1894ec4f 100644 --- a/gcc/genopinit.c +++ b/gcc/genopinit.c @@ -243,8 +243,9 @@ match_pattern (pattern *p, const char *name, const char *pat) } static void -gen_insn (rtx insn) +gen_insn (md_rtx_info *info) { + rtx insn = info->def; const char *name = XSTR (insn, 0); pattern p; unsigned pindex; @@ -346,15 +347,18 @@ main (int argc, char **argv) s_file = open_outfile (source_file_name); /* Read the machine description. */ - while (1) - { - int line_no, insn_code_number = 0; - rtx desc = read_md_rtx (&line_no, &insn_code_number); - if (desc == NULL) + md_rtx_info info; + while (read_md_rtx (&info)) + switch (GET_CODE (info.def)) + { + case DEFINE_INSN: + case DEFINE_EXPAND: + gen_insn (&info); break; - if (GET_CODE (desc) == DEFINE_INSN || GET_CODE (desc) == DEFINE_EXPAND) - gen_insn (desc); - } + + default: + break; + } /* Sort the collected patterns. */ patterns.qsort (pattern_cmp); @@ -464,31 +468,17 @@ main (int argc, char **argv) "#include \"config.h\"\n" "#include \"system.h\"\n" "#include \"coretypes.h\"\n" - "#include \"tm.h\"\n" - "#include \"hash-set.h\"\n" - "#include \"machmode.h\"\n" - "#include \"vec.h\"\n" - "#include \"double-int.h\"\n" - "#include \"input.h\"\n" - "#include \"alias.h\"\n" - "#include \"symtab.h\"\n" - "#include \"wide-int.h\"\n" - "#include \"inchash.h\"\n" + "#include \"backend.h\"\n" + "#include \"predict.h\"\n" "#include \"tree.h\"\n" + "#include \"rtl.h\"\n" + "#include \"alias.h\"\n" "#include \"varasm.h\"\n" "#include \"stor-layout.h\"\n" "#include \"calls.h\"\n" - "#include \"rtl.h\"\n" - "#include \"predict.h\"\n" "#include \"tm_p.h\"\n" "#include \"flags.h\"\n" "#include \"insn-config.h\"\n" - "#include \"hashtab.h\"\n" - "#include \"hard-reg-set.h\"\n" - "#include \"function.h\"\n" - "#include \"statistics.h\"\n" - "#include \"real.h\"\n" - "#include \"fixed-value.h\"\n" "#include \"expmed.h\"\n" "#include \"dojump.h\"\n" "#include \"explow.h\"\n" |