diff options
author | Andrew Pinski <quic_apinski@quicinc.com> | 2024-11-19 23:45:20 -0800 |
---|---|---|
committer | Andrew Pinski <quic_apinski@quicinc.com> | 2024-11-20 10:07:38 -0800 |
commit | e74f3eb1897745706b7b4d10bb60fc7f28f25b5e (patch) | |
tree | 4cbdd6e26a48165afb94ae139dadcac290af8cc1 /gcc/read-md.h | |
parent | 342eb518bd029fe818cb640e1cc12e12dc074bdd (diff) | |
download | gcc-e74f3eb1897745706b7b4d10bb60fc7f28f25b5e.zip gcc-e74f3eb1897745706b7b4d10bb60fc7f28f25b5e.tar.gz gcc-e74f3eb1897745706b7b4d10bb60fc7f28f25b5e.tar.bz2 |
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>
Diffstat (limited to 'gcc/read-md.h')
-rw-r--r-- | gcc/read-md.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/gcc/read-md.h b/gcc/read-md.h index 9703551..e613c42 100644 --- a/gcc/read-md.h +++ b/gcc/read-md.h @@ -364,8 +364,10 @@ class rtx_reader : public md_reader /* Analogous to rtx_writer's m_in_call_function_usage. */ bool m_in_call_function_usage; +#ifndef GENERATOR_FILE /* Support for "reuse_rtx" directives. */ auto_vec<rtx> m_reuse_rtx_by_id; +#endif }; /* Global singleton; constrast with md_reader_ptr above. */ |