[all-commits] [llvm/llvm-project] e7ec0c: [CodeGen] Port PrintMIR to new pass manager (#79440)

paperchalice via All-commits all-commits at lists.llvm.org
Sat Feb 3 00:53:07 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: e7ec0c972e6f5ddd01099fd05ca24352cb992b44
      https://github.com/llvm/llvm-project/commit/e7ec0c972e6f5ddd01099fd05ca24352cb992b44
  Author: paperchalice <liujunchang97 at outlook.com>
  Date:   2024-02-03 (Sat, 03 Feb 2024)

  Changed paths:
    M llvm/include/llvm/CodeGen/MIRPrinter.h
    M llvm/include/llvm/Passes/MachinePassRegistry.def
    M llvm/lib/CodeGen/MIRPrintingPass.cpp
    M llvm/lib/Passes/PassBuilder.cpp
    M llvm/tools/llc/NewPMDriver.cpp

  Log Message:
  -----------
  [CodeGen] Port PrintMIR to new pass manager (#79440)

The legacy version print machine functions to a string stream, then
output the module and string in `doFinalization`. This patch break
`MIRPrintingPass` into two parts `PrintMIRPreparePass` and
`PrintMIRPass`. `PrintMIRPreparePass` output the original IR in yaml
string, `PrintMIRPass` just print the machine function, so we can avoid
the `doFinalization`.




More information about the All-commits mailing list