HomePhabricator

[HIP] Do not call opt/llc for -fno-gpu-rdc

Authored by yaxunl on Jun 9 2020, 12:02 PM.

Description

[HIP] Do not call opt/llc for -fno-gpu-rdc

Currently HIP toolchain calls clang to emit bitcode then calls opt/llc for device compilation for the default -fno-gpu-rdc
case, which is unnecessary since clang is able to compile a single source file to ISA.

This patch fixes the HIP action builder and toolchain so that the default -fno-gpu-rdc can be done like a canonical
toolchain, i.e. one clang -cc1 invocation to compile source code to ISA.

This can avoid unnecessary processes to speed up the compilation, and avoid redundant LLVM passes which are
performed in clang -cc1 and opt.

Differential Revision: https://reviews.llvm.org/D81627

Details

Committed
yaxunlJun 15 2020, 3:55 PM
Differential Revision
D81627: [HIP] Do not call opt/llc for -fno-gpu-rdc
Parents
rG64ec505dd468: [lldb] Rename Master/Slave to Primary/Secondary (NFC)
Branches
Unknown
Tags
Unknown