[all-commits] [llvm/llvm-project] 33be83: [flang][driver][openmp] Write MLIR for -save-temps

Sergio Afonso via All-commits all-commits at lists.llvm.org
Fri Mar 24 10:14:17 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 33be83415c9b5e9a874fcbddee8e64ecf464c203
      https://github.com/llvm/llvm-project/commit/33be83415c9b5e9a874fcbddee8e64ecf464c203
  Author: Sergio Afonso <safonsof at amd.com>
  Date:   2023-03-24 (Fri, 24 Mar 2023)

  Changed paths:
    M clang/include/clang/Driver/Options.td
    M clang/lib/Driver/ToolChains/Flang.cpp
    M flang/include/flang/Frontend/CodeGenOptions.h
    M flang/lib/Frontend/CompilerInvocation.cpp
    M flang/lib/Frontend/FrontendActions.cpp
    M flang/test/Driver/driver-help.f90
    M flang/test/Driver/frontend-forwarding.f90
    A flang/test/Driver/save-mlir-temps.f90

  Log Message:
  -----------
  [flang][driver][openmp] Write MLIR for -save-temps

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.

Differential Revision: https://reviews.llvm.org/D146075




More information about the All-commits mailing list