]> git.ipfire.org Git - thirdparty/gcc.git/commit
PR modula2/113836 gm2 does not dump gimple or quadruples to a file
authorGaius Mulley <gaiusmod2@gmail.com>
Thu, 2 May 2024 12:16:07 +0000 (13:16 +0100)
committerGaius Mulley <gaiusmod2@gmail.com>
Thu, 2 May 2024 12:16:07 +0000 (13:16 +0100)
commit43dc4302b4181535d24e83759514b774ae4dbfcc
treec047d8d4308b846dea4bd78465ea50dccfa0bc78
parent4bb21b5cd7a805b78ea85f46cbb82438ca757a56
PR modula2/113836 gm2 does not dump gimple or quadruples to a file

This patch completes the implementation of dumping the intermediate forms
to file.  It implements the filtering on symbol rules.  Filtering can be
performed through the full text name (given to the GCC tree) or qualified
modula-2 symbol or filename:qualident.

gcc/ChangeLog:

PR modula2/113836
* doc/gm2.texi (Compiler options): Add -fm2-debug-trace=,
-fm2-dump, -fm2-dump-decl=, -fm2-dump-gimple=, -fm2-dump-quad=
and -fm2-dump-filter=.

gcc/m2/ChangeLog:

PR modula2/113836
* gm2-compiler/M2AsmUtil.def: Remove export qualified and
unused import.
* gm2-compiler/M2LangDump.mod (AddRuleTextDump): New procedure.
(AddRuleScopeQualidentDump): Add warning check against unmatched
rule.
(GenQualidentSymString): New procedure function.
(IdentQualidentMatch): New procedure function.
(IsRuleFilenameMatch): New procedure function.
(CheckRuleMatch): New procedure function.
(AddRuleFilenameDump): New procedure function.
* gm2-gcc/m2misc.cc (m2misc_warning_m2_dump_filter): New function.
* gm2-gcc/m2misc.def (warning_m2_dump_filter): New procedure.
* gm2-gcc/m2misc.h (m2misc_warning_m2_dump_filter): New prototype.
* gm2-gcc/m2pp.cc (VERBOSE_TYPE_DESC): New define.
(m2pp_identifier): Define out verbose type info.
(m2pp_constructor): Define out verbose type info.
(m2pp_assignment): Define out verbose type info.
* gm2-lang.cc (ENABLE_M2DUMP_ALL): Remove.
* lang.opt (fm2-dump): Add.
(fm2-dump-decl=): Add.
(fm2-dump-gimple=): Add.
(fm2-dump-quad=): Add.
(fm2-dump-filter=): Add.

Signed-off-by: Gaius Mulley <gaiusmod2@gmail.com>
gcc/doc/gm2.texi
gcc/m2/gm2-compiler/M2AsmUtil.def
gcc/m2/gm2-compiler/M2LangDump.mod
gcc/m2/gm2-gcc/m2misc.cc
gcc/m2/gm2-gcc/m2misc.def
gcc/m2/gm2-gcc/m2misc.h
gcc/m2/gm2-gcc/m2pp.cc
gcc/m2/gm2-lang.cc
gcc/m2/lang.opt