[all-commits] [llvm/llvm-project] 0fdfb6: [Flang] Add support to use LTO specific pipelines
Usman Nadeem via All-commits
all-commits at lists.llvm.org
Thu Mar 9 13:28:42 PST 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 0fdfb65e2624aa151cb07a9c842331f7af9a21ca
https://github.com/llvm/llvm-project/commit/0fdfb65e2624aa151cb07a9c842331f7af9a21ca
Author: Nadeem, Usman <mnadeem at quicinc.com>
Date: 2023-03-09 (Thu, 09 Mar 2023)
Changed paths:
M clang/include/clang/Driver/Options.td
M clang/lib/Driver/ToolChains/Flang.cpp
M flang/include/flang/Frontend/CodeGenOptions.def
M flang/lib/Frontend/CompilerInvocation.cpp
M flang/lib/Frontend/FrontendActions.cpp
M flang/test/Driver/default-optimization-pipelines.f90
M flang/test/Driver/driver-help-hidden.f90
M flang/test/Driver/driver-help.f90
A flang/test/Driver/lto-bc.f90
A flang/test/Driver/lto-flags.f90
Log Message:
-----------
[Flang] Add support to use LTO specific pipelines
Thin and full LTO modes use different pre-link pipelines compared to
regular compilation. This patch adds support for calling those pipelines.
This patch closely mimics Clang's implementation with the exception that I
changed the codegen option name from `PrepareForLTO` to `PrepareForFullLTO`
to be more precise.
With this patch:
- Compilation for full LTO should be as we expect (except possibly
missing optimizations enabled by module summaries which we do not
produce yet).
- thinLTO uses the correct prelink pipeline but will use the postlink
backend for fullLTO due to missing metadata and summary in the llvm
module. I have added a warning regarding this: `flang-new: warning: the
option '-flto=thin' is a work in progress`.
Differential Revision: https://reviews.llvm.org/D142420
Change-Id: I6b94b775b5b8e93340e520c5cd4bf60834b2e209
More information about the All-commits
mailing list