[PATCH 6/9] Split class rtx_reader into md_reader vs rtx_reader

Richard Sandiford rdsandiford@googlemail.com
Tue Nov 22 21:26:00 GMT 2016


Sorry, only just realised that this one hadn't been approved as
part of the earlier series.

David Malcolm <dmalcolm@redhat.com> writes:
> gcc/ChangeLog:
> 	* genpreds.c (write_tm_constrs_h): Update for renaming of
> 	rtx_reader_ptr to md_reader_ptr.
> 	(write_tm_preds_h): Likewise.
> 	(write_insn_preds_c): Likewise.
> 	* read-md.c (rtx_reader_ptr): Rename to...
> 	(md_reader_ptr): ...this, and convert from an
> 	rtx_reader * to a md_reader *.
> 	(rtx_reader::set_md_ptr_loc): Rename to...
> 	(md_reader::set_md_ptr_loc): ...this.
> 	(rtx_reader::get_md_ptr_loc): Rename to...
> 	(md_reader::get_md_ptr_loc): ...this.
> 	(rtx_reader::copy_md_ptr_loc): Rename to...
> 	(md_reader::copy_md_ptr_loc): ...this.
> 	(rtx_reader::fprint_md_ptr_loc): Rename to...
> 	(md_reader::fprint_md_ptr_loc): ...this.
> 	(rtx_reader::print_md_ptr_loc): Rename to...
> 	(md_reader::print_md_ptr_loc): ...this.
> 	(rtx_reader::join_c_conditions): Rename to...
> 	(md_reader::join_c_conditions): ...this.
> 	(rtx_reader::fprint_c_condition): ...this.
> 	(rtx_reader::print_c_condition): Rename to...
> 	(md_reader::print_c_condition): ...this.
> 	(fatal_with_file_and_line):  Update for renaming of
> 	rtx_reader_ptr to md_reader_ptr.
> 	(rtx_reader::require_char): Rename to...
> 	(md_reader::require_char): ...this.
> 	(rtx_reader::require_char_ws): Rename to...
> 	(md_reader::require_char_ws): ...this.
> 	(rtx_reader::require_word_ws): Rename to...
> 	(md_reader::require_word_ws): ...this.
> 	(rtx_reader::read_char): Rename to...
> 	(md_reader::read_char): ...this.
> 	(rtx_reader::unread_char): Rename to...
> 	(md_reader::unread_char): ...this.
> 	(rtx_reader::peek_char): Rename to...
> 	(md_reader::peek_char): ...this.
> 	(rtx_reader::read_name): Rename to...
> 	(md_reader::read_name): ...this.
> 	(rtx_reader::read_escape): Rename to...
> 	(md_reader::read_escape): ...this.
> 	(rtx_reader::read_quoted_string): Rename to...
> 	(md_reader::read_quoted_string): ...this.
> 	(rtx_reader::read_braced_string): Rename to...
> 	(md_reader::read_braced_string): ...this.
> 	(rtx_reader::read_string): Rename to...
> 	(md_reader::read_string): ...this.
> 	(rtx_reader::read_skip_construct): Rename to...
> 	(md_reader::read_skip_construct): ...this.
> 	(rtx_reader::handle_constants): Rename to...
> 	(md_reader::handle_constants): ...this.
> 	(rtx_reader::traverse_md_constants): Rename to...
> 	(md_reader::traverse_md_constants): ...this.
> 	(rtx_reader::handle_enum): Rename to...
> 	(md_reader::handle_enum): ...this.
> 	(rtx_reader::lookup_enum_type): Rename to...
> 	(md_reader::lookup_enum_type): ...this.
> 	(rtx_reader::traverse_enum_types): Rename to...
> 	(md_reader::traverse_enum_types): ...this.
> 	(rtx_reader::rtx_reader): Rename to...
> 	(md_reader::md_reader): ...this, and update for renaming of
> 	rtx_reader_ptr to md_reader_ptr.
> 	(rtx_reader::~rtx_reader): Rename to...
> 	(md_reader::~md_reader): ...this, and update for renaming of
> 	rtx_reader_ptr to md_reader_ptr.
> 	(rtx_reader::handle_include): Rename to...
> 	(md_reader::handle_include): ...this.
> 	(rtx_reader::handle_file): Rename to...
> 	(md_reader::handle_file): ...this.
> 	(rtx_reader::handle_toplevel_file): Rename to...
> 	(md_reader::handle_toplevel_file): ...this.
> 	(rtx_reader::get_current_location): Rename to...
> 	(md_reader::get_current_location): ...this.
> 	(rtx_reader::add_include_path): Rename to...
> 	(md_reader::add_include_path): ...this.
> 	(rtx_reader::read_md_files): Rename to...
> 	(md_reader::read_md_files): ...this.
> 	* read-md.h (class rtx_reader): Split into...
> 	(class md_reader): ...new class.
> 	(rtx_reader_ptr): Rename to...
> 	(md_reader_ptr): ...this, and convert to a md_reader *.
> 	(class noop_reader): Update base class to be md_reader.
> 	(class rtx_reader): Reintroduce as a subclass of md_reader.
> 	(rtx_reader_ptr): Reintroduce as a rtx_reader *.
> 	(read_char): Update for renaming of rtx_reader_ptr to
> 	md_reader_ptr.
> 	(unread_char): Likewise.
> 	* read-rtl.c (rtx_reader_ptr): New global.
> 	(rtx_reader::apply_iterator_to_string): Rename to...
> 	(md_reader::apply_iterator_to_string): ...this.
> 	(rtx_reader::copy_rtx_for_iterators): Rename to...
> 	(md_reader::copy_rtx_for_iterators): ...this.
> 	(rtx_reader::read_conditions): Rename to...
> 	(md_reader::read_conditions): ...this.
> 	(rtx_reader::record_potential_iterator_use): Rename to...
> 	(md_reader::record_potential_iterator_use): ...this.
> 	(rtx_reader::read_mapping): Rename to...
> 	(md_reader::read_mapping): ...this.
> 	(rtx_reader::read_rtx): Use rtx_reader_ptr when calling
> 	read_rtx_code.
> 	(rtx_reader::read_rtx_operand): Use get_string_obstack rather
> 	than directly accessing m_string_obstack.
> 	(rtx_reader::rtx_reader): New ctor.
> 	(rtx_reader::~rtx_reader): New dtor.

OK, thanks.  It'd be nice to split the rtl stuff out of read-md.h
at some point, but there's no reason it should happen here.

Richard



More information about the Gcc-patches mailing list