[PATCH] D146075: [flang][driver][openmp] Write MLIR for -save-temps

Sergio Afonso via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Mar 14 11:33:25 PDT 2023


skatrak created this revision.
skatrak added reviewers: gregrodgers, dpalermo, domada, jsjodin, agozillon, kiranchandramohan, awarzynski.
Herald added subscribers: sunshaoce, bzcheeseman, rriddle, guansong, yaxunl.
Herald added a reviewer: sscalpone.
Herald added projects: Flang, All.
skatrak requested review of this revision.
Herald added subscribers: cfe-commits, sstefan1, stephenneuendorffer, jdoerfert, MaskRay.
Herald added a reviewer: jdoerfert.
Herald added a project: clang.

This patch adds support for producing MLIR files when using -save-temps on
flang. One MLIR file will be produced before lowering and optimization passes,
containing the operations produced by the PFT-to-MLIR lowering bridge, and
another at the end of the process, just before LLVM IR generation.

This is accomplished by forwarding the -save-temps flag from the driver to the
frontend, and modifying it to output MLIR files accordingly.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D146075

Files:
  clang/include/clang/Driver/Options.td
  clang/lib/Driver/ToolChains/Flang.cpp
  flang/include/flang/Frontend/CodeGenOptions.h
  flang/lib/Frontend/CompilerInvocation.cpp
  flang/lib/Frontend/FrontendActions.cpp
  flang/test/Driver/driver-help.f90

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D146075.505194.patch
Type: text/x-patch
Size: 7564 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20230314/3e586c25/attachment-0001.bin>


More information about the cfe-commits mailing list