[all-commits] [llvm/llvm-project] d96ea4: [AMDGPU][HIP] Improve opt-level handling
Scott Linder via All-commits
all-commits at lists.llvm.org
Thu Dec 5 08:28:16 PST 2019
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: d96ea47c75fdf4a62358eae49a0026bcf031bde6
https://github.com/llvm/llvm-project/commit/d96ea47c75fdf4a62358eae49a0026bcf031bde6
Author: Scott Linder <Scott.Linder at amd.com>
Date: 2019-12-05 (Thu, 05 Dec 2019)
Changed paths:
M clang/lib/Driver/ToolChains/HIP.cpp
M clang/test/Driver/hip-toolchain-mllvm.hip
M clang/test/Driver/hip-toolchain-no-rdc.hip
A clang/test/Driver/hip-toolchain-opt.hip
M clang/test/Driver/hip-toolchain-rdc.hip
Log Message:
-----------
[AMDGPU][HIP] Improve opt-level handling
Summary:
The HIP toolchain invokes `llc` without an explicit opt-level, meaning
it always uses the default (-O2). This makes it impossible to use -O1,
for example. The HIP toolchain also coerces -Os/-Oz to -O2 even when
invoking opt, and it coerces -Og to -O2 rather than -O1.
Forward the opt-level to `llc` as well as `opt`, and only coerce levels
where it is required.
Subscribers: cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D70987
More information about the All-commits
mailing list