diff options
author | Richard Sandiford <richard.sandiford@arm.com> | 2015-07-16 13:52:22 +0000 |
---|---|---|
committer | Richard Sandiford <rsandifo@gcc.gnu.org> | 2015-07-16 13:52:22 +0000 |
commit | 5d2d3e43b917f87ce4e8378076888dd03e4c7cc2 (patch) | |
tree | 9d8586f4a5e07a89b18a2e4fb2c2f801fafb90b8 /gcc/gensupport.h | |
parent | c9f84f2e1d697a8d6a6e696bd26933ca4a858da0 (diff) | |
download | gcc-5d2d3e43b917f87ce4e8378076888dd03e4c7cc2.tar.gz |
read-md.h (message_with_line, [...]): Delete.
gcc/
* read-md.h (message_with_line, error_with_line): Delete.
* read-md.c (message_with_line, error_with_line): Delete.
* gensupport.h: Include read-md.h.
(md_rtx_info): New structure.
(read_md_rtx): Use it. Return a bool success value.
* gensupport.c (read_md_rtx): Likewise.
* genattr-common.c (gen_attr): Take an md_rtx_info rather than an rtx.
(main): Update after interface changes.
* genattr.c (gen_attr): Take an md_rtx_info rather than an rtx.
(main): Update after interface changes.
* genattrtab.c (insn_code_number): Delete.
(optimize_attrs): Add a max_insn_code parameter and use it instead
of insn_code_number.
(gen_attr): Take an md_rtx_info rather than an rtx and lineno.
Use *_at rather than *_with_line functions.
(gen_insn): Likewise.
(gen_delay): Likewise.
(gen_insn_reserv): Likewise.
(gen_bypass): Take an md_rtx_info rather than an rtx.
(main): Update after interface changes. Use a local max_insn_code
variable instead of insn_code_number.
* genautomata.c (gen_cpu_unit): Take an md_rtx_info rather than
an rtx. Use fatal_at rather than fatal.
(gen_query_cpu_unit, gen_bypass, gen_excl_set)
(gen_presence_absence_set, gen_presence_set, gen_final_presence_set)
(gen_absence_set, gen_final_absence_set, gen_automaton)
(gen_automata_option, gen_reserv, gen_insn_reserv): Likewise.
(main): Update after interface changes.
* gencodes.c (gen_insn): Take an md_rtx_info rather than an rtx
and code number.
(main): Update after interface changes.
* genconditions.c (main): Use new read_md_rtx interface.
* genconfig.c (gen_insn): Take an md_rtx_info rather than an rtx.
(gen_expand, gen_split, gen_peephole, gen_peephole2): Likewise.
(main): Update after interface changes.
* genemit.c (insn_code_number, insn_index_number): Delete.
(gen_insn): Take an md_rtx_info rather than an rtx and lineno.
Use fatal_at rather than fatal.
(gen_expand): Take an md_rtx_info rather than an rtx. Use fatal_at
rather than fatal.
(gen_split): Likewise.
(main): Update after interface changes.
* genextract.c (line_no): Delete.
(gen_insn): Take an md_rtx_info rather than an rtx and lineno.
Update call to walk_rtx.
(VEC_safe_set_locstr): Add an md_rtx_info argument. Use message_at
rather than message_with_line.
(walk_rtx): Add an md_rtx_info argument. Update call to
VEC_safe_set_locstr.
(main): Update after interface changes.
* genflags.c (gen_insn): Take an md_rtx_info rather than an rtx
and lineno. Use error_at rather than separate message_with_line
calls and have_error assignments.
(main): Update after interface changes.
* genmddump.c (main): Use new read_md_rtx interface.
* genopinit.c (insn): Take an md_rtx_info rather than an rtx.
(main): Update after interface changes.
* genoutput.c (next_code_number): Delete.
(gen_insn): Take an md_rtx_info rather than an rtx and lineno.
(gen_peephole, gen_expand, gen_split): Likewise.
(note_constraint): Likewise. Use *_at rather than *_with_line
functions.
(main): Update after interface changes.
* genpeep.c (gen_peephole): Take an md_rtx_info rather than an
rtx and lineno.
(main): Update after interface changes.
* genpreds.c (process_define_predicate): Take an md_rtx_info rather
than an rtx and lineno.
(process_define_constraint): Likewise.
(process_define_register_constraint): Likewise.
(main): Update after interface changes.
* genrecog.c (next_insn_code, pattern_lineno): Delete.
(validate_pattern): Replace top-level rtx with an md_rtx_info.
Use *_at rather than *_with_line functions.
(match_pattern_2): Likewise.
(match_pattern_1, match_pattern): Add an md_rtx_info parameter.
(get_peephole2_pattern): Take an md_rtx_info rather than an rtvec.
Use *_at rather than *_with_line functions.
* gentarget-def.c (add_insn): New function.
(main): Use it. Use new read_md_rtx interface.
From-SVN: r225883
Diffstat (limited to 'gcc/gensupport.h')
-rw-r--r-- | gcc/gensupport.h | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/gcc/gensupport.h b/gcc/gensupport.h index fc0e8491f10..8fbdb364bcd 100644 --- a/gcc/gensupport.h +++ b/gcc/gensupport.h @@ -20,13 +20,29 @@ along with GCC; see the file COPYING3. If not see #ifndef GCC_GENSUPPORT_H #define GCC_GENSUPPORT_H +#include "read-md.h" + struct obstack; extern struct obstack *rtl_obstack; +/* Information about an .md define_* rtx. */ +struct md_rtx_info { + /* The rtx itself. */ + rtx def; + + /* The location of the first line of the rtx. */ + file_location loc; + + /* The unique number attached to the rtx. Currently all define_insns, + define_expands, define_splits, define_peepholes and define_peephole2s + share the same insn_code index space. */ + int index; +}; + extern rtx add_implicit_parallel (rtvec); extern bool init_rtx_reader_args_cb (int, char **, bool (*)(const char *)); extern bool init_rtx_reader_args (int, char **); -extern rtx read_md_rtx (int *, int *); +extern bool read_md_rtx (md_rtx_info *); /* Set this to 0 to disable automatic elision of insn patterns which can never be used in this configuration. See genconditions.c. |