[all-commits] [llvm/llvm-project] 5ecb51: [Driver] Pass -plugin-opt=O2 for -Os -Oz and -plug...
Fangrui Song via All-commits
all-commits at lists.llvm.org
Thu May 14 10:38:50 PDT 2020
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: 5ecb51414637402b0f89a96924ac7b015d23bcfa
https://github.com/llvm/llvm-project/commit/5ecb51414637402b0f89a96924ac7b015d23bcfa
Author: Fangrui Song <maskray at google.com>
Date: 2020-05-14 (Thu, 14 May 2020)
Changed paths:
M clang/lib/Driver/ToolChains/CommonArgs.cpp
M clang/test/Driver/lto.c
Log Message:
-----------
[Driver] Pass -plugin-opt=O2 for -Os -Oz and -plugin-opt=O1 for -Og
Fixes PR42445 (compiler driver options -Os -Oz translate to
-plugin-opt=Os (Oz) which are not recognized by LLVMgold.so or LLD).
The optimization level mapping matches
CompilerInvocation.cpp:getOptimizationLevel() and SpeedLevel of
PassBuilder::OptimizationLevel::O*.
-plugin-opt=O* affects the way we construct regular LTO/ThinLTO pass
manager pipeline.
Reviewed By: pcc
Differential Revision: https://reviews.llvm.org/D79919
More information about the All-commits
mailing list