[PATCH] D155452: [Flang] Add support for fsave-optimization-record
victorkingi via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Jul 17 05:48:16 PDT 2023
victorkingi created this revision.
Herald added a reviewer: sscalpone.
Herald added a reviewer: awarzynski.
Herald added a subscriber: sunshaoce.
Herald added projects: Flang, All.
victorkingi requested review of this revision.
Herald added subscribers: cfe-commits, jdoerfert, MaskRay.
Herald added a project: clang.
Add support for generating and saving the optimization record.
Optimization record lists the optimizations performed by LLVM.
This patch enables the flag in Flang. 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.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D155452
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-hidden.f90
flang/test/Driver/driver-help.f90
flang/test/Driver/frontend-forwarding.f90
flang/test/Driver/fsave-optimization-record.f90
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D155452.540976.patch
Type: text/x-patch
Size: 15662 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20230717/03a9a01e/attachment-0001.bin>
More information about the cfe-commits
mailing list