[PATCH] D138081: [IR] Split out IR printing passes into IRPrinter

Alexander Shaposhnikov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 15 17:15:50 PST 2022


alexander-shaposhnikov created this revision.
alexander-shaposhnikov added reviewers: nikic, aeubanks, tejohnson.
alexander-shaposhnikov created this object with visibility "All Users".
Herald added subscribers: Moerafaat, zero9178, bzcheeseman, sdasgup3, wenzhicui, wrengr, ormris, cota, teijeong, rdzhabarov, tatianashp, msifontes, jurahul, Kayjukh, grosul1, Joonsoo, liufengdb, aartbik, mgester, arpith-jacob, antiagainst, shauheen, rriddle, mehdi_amini, hiraditya.
Herald added a project: All.
alexander-shaposhnikov requested review of this revision.
Herald added subscribers: cfe-commits, stephenneuendorffer, nicolasvasilache.
Herald added projects: clang, LLVM.

This diff splits out (from LLVMCore) IR printing passes into IRPrinter.
This structure is similar to what we already have for IRReader and enables us to avoid circular dependencies between LLVMCore and Analysis.
The legacy interface is left unchanged, once the legacy pass manager is removed (in the future) we will be able to clean it up further.
The bazel build configuration has been updated as well.

Test plan:
1/ Tested the following cmake configurations: static/dynamic linking * lld/gold * clang/gcc
2/ bazel build --config=generic_clang @llvm-project//...


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D138081

Files:
  clang/lib/CodeGen/BackendUtil.cpp
  clang/lib/CodeGen/CMakeLists.txt
  llvm/include/llvm/CodeGen/CodeGenPassBuilder.h
  llvm/include/llvm/IR/IRPrintingPasses.h
  llvm/include/llvm/IRPrinter/IRPrintingPasses.h
  llvm/lib/CMakeLists.txt
  llvm/lib/IR/IRPrintingPasses.cpp
  llvm/lib/IRPrinter/CMakeLists.txt
  llvm/lib/IRPrinter/IRPrintingPasses.cpp
  llvm/lib/Passes/CMakeLists.txt
  llvm/lib/Passes/PassBuilder.cpp
  llvm/lib/Target/DirectX/DirectXTargetMachine.cpp
  llvm/tools/llc/llc.cpp
  llvm/tools/opt/CMakeLists.txt
  llvm/tools/opt/NewPMDriver.cpp
  utils/bazel/llvm-project-overlay/clang/BUILD.bazel
  utils/bazel/llvm-project-overlay/llvm/BUILD.bazel
  utils/bazel/llvm-project-overlay/mlir/BUILD.bazel

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D138081.475639.patch
Type: text/x-patch
Size: 20552 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20221116/698fd0af/attachment.bin>


More information about the llvm-commits mailing list