]> git.ipfire.org Git - thirdparty/gcc.git/commit
rtl-reader: Disable reuse_rtx support for generator building
authorAndrew Pinski <quic_apinski@quicinc.com>
Wed, 20 Nov 2024 07:45:20 +0000 (23:45 -0800)
committerAndrew Pinski <quic_apinski@quicinc.com>
Wed, 20 Nov 2024 18:07:38 +0000 (10:07 -0800)
commite74f3eb1897745706b7b4d10bb60fc7f28f25b5e
tree4cbdd6e26a48165afb94ae139dadcac290af8cc1
parent342eb518bd029fe818cb640e1cc12e12dc074bdd
rtl-reader: Disable reuse_rtx support for generator building

reuse_rtx is not documented nor the format to use it is ever documented.
So it should not be supported for the .md files.

This also fixes the problem if an invalid index is supplied for reuse_rtx,
instead of ICEing, put out a real error message.  Note since this code
still uses atoi, an invalid index can still be used in some cases but that is
recorded as part of PR 44574.

Note I did a grep of the sources to make sure that this was only used for
the read rtl in the GCC rather than while reading in .md files.

Bootstrapped and tested on x86_64-linux-gnu.

gcc/ChangeLog:

* read-md.h (class rtx_reader): Don't include m_reuse_rtx_by_id
when GENERATOR_FILE is defined.
* read-rtl.cc (rtx_reader::read_rtx_code): Disable reuse_rtx
support when GENERATOR_FILE is defined.

Signed-off-by: Andrew Pinski <quic_apinski@quicinc.com>
gcc/read-md.h
gcc/read-rtl.cc