From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 7EFA73858417; Thu, 21 Mar 2024 19:39:42 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 7EFA73858417 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1711049982; bh=UMA2RuuSnSWk1ZPMbx7az6G6wZB04M5E9yYCCJ3BC8c=; h=From:To:Subject:Date:In-Reply-To:References:From; b=n4Cs4+CwOZlCNDzAmPWWLaa8lbay9jxVGZJrn8hrWaYB3WIoJcHD10B57pTTqDaS7 H7d3AcUA7Hn1vCWYHFxTX3wb0Y12sOA5gHCF6vwM/TrBWCHjFOoxUlOf8QntScfyrm oLun7eZr9qbzsNoMMg7XSBbURvClhbkJUk8lK944= From: "cvs-commit at gcc dot 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 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: modula2 X-Bugzilla-Version: 14.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: gaius at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D113836 --- Comment #8 from GCC Commits --- The master branch has been updated by Gaius Mulley : https://gcc.gnu.org/g:48d49200510198cafcab55601cd8e5f8eb541f01 commit r14-9599-g48d49200510198cafcab55601cd8e5f8eb541f01 Author: Gaius Mulley 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 proced= ure. (DumpFilteredResolver): New procedure. (DumpFilteredDefinitive): New procedure. * gm2-compiler/M2GCCDeclare.mod (IncludeDumpSymbol): New proced= ure. (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): Ca= ll 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 =