diff options
| author | Richard-Qin-X <richard.qin.001@gmail.com> | 2026-08-26 00:50:21 +0800 |
|---|---|---|
| committer | Richard-Qin-X <richard.qin.001@gmail.com> | 2026-08-26 00:50:21 +0800 |
| commit | d54646c69a5117cbeef35f5c3f0d546f4c6bf0e7 (patch) | |
| tree | 422b1c96cefaf0315a73ad8328ffe0d6e578fe9f /backend/include/rcc/CodeGen/MIRPrinter.h | |
| parent | 73ff142aa16a29c18d09564f0b7e41940fcf786c (diff) | |
| download | rcc-project-d54646c69a5117cbeef35f5c3f0d546f4c6bf0e7.tar.gz rcc-project-d54646c69a5117cbeef35f5c3f0d546f4c6bf0e7.tar.xz | |
[CodeGen] Implement reaching-def analysis printing
Diffstat (limited to 'backend/include/rcc/CodeGen/MIRPrinter.h')
| -rw-r--r-- | backend/include/rcc/CodeGen/MIRPrinter.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/backend/include/rcc/CodeGen/MIRPrinter.h b/backend/include/rcc/CodeGen/MIRPrinter.h index 4c20bed..ea58434 100644 --- a/backend/include/rcc/CodeGen/MIRPrinter.h +++ b/backend/include/rcc/CodeGen/MIRPrinter.h @@ -13,6 +13,8 @@ namespace rcc { class MachineFunction; class MachineBasicBlock; +class MachineInstr; +class MachineOperand; class TargetDescription; namespace mir { @@ -36,6 +38,17 @@ struct MIPrinterOptions final { const MIParserContext &Context = {}, MIPrinterOptions Options = {}); +[[nodiscard]] Expected<MIParserContext> +createMachineFunctionPrintContext(const MachineFunction &Function); +[[nodiscard]] Expected<std::string> printMachineInstruction(const MachineInstr &Instruction, + const TargetDescription &Target, + const MIParserContext &Context, + MIPrinterOptions Options = {}); +[[nodiscard]] Expected<std::string> printMachineOperand(const MachineOperand &Operand, + const TargetDescription &Target, + const MIParserContext &Context, + MIPrinterOptions Options = {}); + struct MIRDocumentPrinterOptions final { MIPrintMode Mode = MIPrintMode::Complete; bool EmitEmbeddedIR = true; |
