[all-commits] [llvm/llvm-project] f04cca: [Flang] Add support for fsave-optimization-record
kiranchandramohan via All-commits
all-commits at lists.llvm.org
Fri Jul 28 02:31:18 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: f04ccadf35441b2e13b3ab30edeef251818fa9c7
https://github.com/llvm/llvm-project/commit/f04ccadf35441b2e13b3ab30edeef251818fa9c7
Author: Victor Kingi <victor.kingi at arm.com>
Date: 2023-07-28 (Fri, 28 Jul 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-hidden.f90
M flang/test/Driver/driver-help.f90
A flang/test/Driver/fsave-optimization-record.f90
Log Message:
-----------
[Flang] Add support for fsave-optimization-record
Add support for generating and saving the optimization record.
Optimization record lists the optimizations performed by LLVM.
This patch enables the flag in Flang. Clang handles this functionality
using the BackendConsumer which Flang doesn't have, hence, was
implemented in CodeGenAction::executeAction
FlangOption added to all variants of fsave-optimization-record in
clang/include/clang/Driver/Options.td . Clang handles it the
same way.
opt_record_file, opt_record_passes and opt_record_format flags
in Options.td were moved out of the group [CC1Option, NoDriverOption]
to allow flang -fc1 support.
The renderRemarksOptions and willEmitRemarks functions in
clang/lib/Driver/ToolChains/Flang.cpp follow same syntax as clang.
In flang/lib/Frontend/CompilerInvocation.cpp we update the field
OptRecordFile with the provided optimization file value. Clang
doesn't do this as it processes the Options.td, mapping the
OptRecordFile earlier on.
Reviewed By: awarzynski, tblah
Differential Revision: https://reviews.llvm.org/D155452
More information about the All-commits
mailing list