public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug modula2/113836] gm2 does not dump gimple or quadruples to a file
Date: Thu, 21 Mar 2024 19:39:41 +0000	[thread overview]
Message-ID: <bug-113836-4-vopBXHzY3Y@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-113836-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113836

--- Comment #8 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Gaius Mulley <gaius@gcc.gnu.org>:

https://gcc.gnu.org/g:48d49200510198cafcab55601cd8e5f8eb541f01

commit r14-9599-g48d49200510198cafcab55601cd8e5f8eb541f01
Author: Gaius Mulley <gaiusmod2@gmail.com>
Date:   Thu Mar 21 19:38:03 2024 +0000

    PR modula2/113836 gm2 does not dump gimple or quadruples to file

    This patch provides the localized modula2 changes to gcc/m2
    which facilitate the dumping of gimple and quadruples to file.
    PR modula2/113836 will be full complete after a subsequent patch
    adding changes to lang.opt and documentation.  The lang.opt
    patch requires all language bootstrap regression testing whereas
    this patch is isolated to gcc/m2 and only the m2 language.

    gcc/m2/ChangeLog:

            PR modula2/113836
            * Make-lang.in (GM2_C_OBJS): Add m2/gm2-gcc/m2pp.o.
            (m2/m2pp.o): Remove rule.
            (GM2-COMP-BOOT-DEFS): Add M2LangDump.def.
            (GM2-COMP-BOOT-MODS): Add M2LangDump.mod.
            (GM2-GCC-DEFS): Add M2LangDump.def.
            (GM2-GCC-MODS): Add M2LangDump.mod.
            * gm2-compiler/M2CaseList.mod (WriteCase): Rewrite.
            * gm2-compiler/M2Code.mod (DoModuleDeclare): Call
            DumpFilteredResolver depending upon DumpLangDecl.
            (DoCodeBlock): Call CreateDumpGimple depending upon
            DumpLangGimple.
            (Code): Replace DisplayQuadList blocks with DumpQuadruples.
            (DisplayQuadsInScope): Remove.
            (DisplayQuadNumbers): Remove.
            (CodeBlock): Rewrite.
            * gm2-compiler/M2GCCDeclare.def (IncludeDumpSymbol): New procedure.
            (DumpFilteredResolver): New procedure.
            (DumpFilteredDefinitive): New procedure.
            * gm2-compiler/M2GCCDeclare.mod (IncludeDumpSymbol): New procedure.
            (DumpFilteredResolver): New procedure.
            (DumpFilteredDefinitive): New procedure.
            (doInclude): Rewrite to use GetDumpFile.
            (WatchIncludeList): Remove fixed debugging value.
            (doExclude): Rewrite to use GetDumpFile.
            (DeclareTypesConstantsProceduresInRange): Remove fixed debugging
            values.
            (PreAddModGcc): Rename parameter t as tree.
            (IncludeGetNth): Rewrite to use GetDumpFile.
            (IncludeType): Ditto.
            (IncludeSubscript): Ditto.
            (PrintLocalSymbol): Ditto.
            (PrintLocalSymbols): Ditto.
            (IncludeGetVarient): Ditto.
            (PrintDeclared): Ditto.
            (PrintAlignment): Ditto.
            (PrintDecl): Ditto.
            (PrintScope): Ditto.
            (PrintProcedure): Ditto.
            (PrintSym): Ditto.
            (PrintSymbol): Ditto.
            (PrintTerse): Ditto.
            * gm2-compiler/M2Options.def (GetDumpLangDeclFilename): New
            procedure function.
            (SetDumpLangDeclFilename): New procedure.
            (GetDumpLangQuadFilename): New procedure function.
            (SetDumpLangQuadFilename): New procedure.
            (GetDumpLangGimpleFilename): New procedure function.
            (SetDumpLangGimpleFilename): New procedure.
            (SetM2DumpFilter): New procedure.
            (GetM2DumpFilter): New procedure function.
            (GetDumpLangGimple): New procedure function.
            * gm2-compiler/M2Options.mod (GetDumpLangDeclFilename): New
            procedure function.
            (SetDumpLangDeclFilename): New procedure.
            (GetDumpLangQuadFilename): New procedure function.
            (SetDumpLangQuadFilename): New procedure.
            (GetDumpLangGimpleFilename): New procedure function.
            (SetDumpLangGimpleFilename): New procedure.
            (SetM2DumpFilter): New procedure.
            (GetM2DumpFilter): New procedure function.
            (GetDumpLangGimple): New procedure function.
            * gm2-compiler/M2Quads.def (DumpQuadruples): New procedure.
            * gm2-compiler/M2Quads.mod (DumpUntil): New procedure.
            (GetCtorInit): New procedure function.
            (GetCtorFini): New procedure function.
            (DumpQuadrupleFilter): New procedure function.
            (DumpQuadrupleAll): New procedure.
            (DisplayQuadList): Remove procedure.
            (DumpQuadruples): New procedure.
            (DisplayQuadRange): Rewrite.
            (DisplayQuad): Ditto.
            (DisplayProcedureAttributes): Ditto.
            (WriteOperator): Ditto.
            (WriteMode): Ditto.
            * gm2-compiler/M2Scope.mod (ForeachScopeBlockDo2): Replace
            DisplayQuadruples with TraceQuadruples.
            (ForeachScopeBlockDo3): Replace DisplayQuadruples with
            TraceQuadruples.
            * gm2-compiler/SymbolConversion.def (Gcc2Mod): New procedure
function.
            * gm2-compiler/SymbolConversion.mod: New procedure function.
            * gm2-gcc/m2misc.cc (m2misc_DebugTree): New function.
            (m2misc_DebugTreeChain): New function.
            * gm2-gcc/m2options.h (M2Options_GetDumpLangDeclFilename): New
            prototype.
            (M2Options_SetDumpLangDeclFilename): New prototype.
            (M2Options_GetDumpLangQuadFilename): New prototype.
            (M2Options_SetDumpLangQuadFilename): New prototype.
            (M2Options_GetDumpLangGimpleFilename): New prototype.
            (M2Options_SetDumpLangGimpleFilename): New prototype.
            (M2Options_GetDumpLangGimple): New prototype.
            (M2Options_SetM2DumpFilter): New prototype.
            (M2Options_GetM2DumpFilter): New prototype.
            * m2pp.cc: Move to...
            * gm2-gcc/m2pp.cc: ...here.
            * m2pp.h: Move to...
            * gm2-gcc/m2pp.h: ...here.
            * gm2-gcc/m2statement.cc (m2statement_BuildEndFunctionCode): Call
            m2pp_dump_gimple.
            * gm2-lang.cc (ENABLE_QUAD_DUMP_ALL): New define.
            (gm2_langhook_init_options): Add switch cases for proposed new
            command line options.
            * gm2-libs/DynamicStrings.def (ReverseIndex): New procedure
            function.
            * gm2-libs/DynamicStrings.mod: New procedure function.
            * gm2-compiler/M2LangDump.def: New file.
            * gm2-compiler/M2LangDump.mod: New file.
            * gm2-gcc/m2langdump.h: New file.
            * gm2-gcc/m2pp.def: New file.

    Signed-off-by: Gaius Mulley <gaiusmod2@gmail.com>

  parent reply	other threads:[~2024-03-21 19:39 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-08 17:17 [Bug modula2/113836] New: " gaius at gcc dot gnu.org
2024-02-08 17:19 ` [Bug modula2/113836] " gaius at gcc dot gnu.org
2024-02-08 17:35 ` gaius at gcc dot gnu.org
2024-02-08 20:23 ` gaius at gcc dot gnu.org
2024-02-08 21:32 ` gaius at gcc dot gnu.org
2024-02-11 17:29 ` gaius at gcc dot gnu.org
2024-02-12 12:34 ` gaius at gcc dot gnu.org
2024-02-12 13:47 ` gaius at gcc dot gnu.org
2024-03-21 19:39 ` cvs-commit at gcc dot gnu.org [this message]
2024-05-02 10:38 ` gaius at gcc dot gnu.org
2024-05-02 12:16 ` cvs-commit at gcc dot gnu.org
2024-05-02 12:18 ` gaius at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-113836-4-vopBXHzY3Y@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).