aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Transforms/Utils/LoopSimplify.cpp
diff options
context:
space:
mode:
authorHan Shen <shenhan@google.com>2023-08-16 23:24:01 -0700
committerHan Shen <shenhan@google.com>2023-08-16 23:41:34 -0700
commit317a0fe5bd7113c0ac9d30b2de58ca409e5ff754 (patch)
tree79dee00c3759bca9b305a7f6d90b1834bef9c73b /llvm/lib/Transforms/Utils/LoopSimplify.cpp
parent2f3fe3ed97bcf778d73eda5aae9f166810a4af02 (diff)
downloadllvm-317a0fe5bd7113c0ac9d30b2de58ca409e5ff754.zip
llvm-317a0fe5bd7113c0ac9d30b2de58ca409e5ff754.tar.gz
llvm-317a0fe5bd7113c0ac9d30b2de58ca409e5ff754.tar.bz2
[Driver][CodeGen] Properly handle -fsplit-machine-functions for fatbinary compilation.
When building a fatbinary, the driver invokes the compiler multiple times with different "--target". (For example, with "-x cuda --cuda-gpu-arch=sm_70" flags, clang will be invoded twice, once with --target=x86_64_...., once with --target=sm_70) If we use -fsplit-machine-functions or -fno-split-machine-functions for such invocation, the driver reports an error. This CL changes the behavior so: - "-fsplit-machine-functions" is now passed to all targets, for non-X86 targets, the flag is a NOOP and causes a warning. - "-fno-split-machine-functions" now negates -fsplit-machine-functions (if -fno-split-machine-functions appears after any -fsplit-machine-functions) for any target triple, previously, it causes an error. - "-fsplit-machine-functions -Xarch_device -fno-split-machine-functions" enables MFS on host but disables MFS for GPUS without warnings/errors. - "-Xarch_host -fsplit-machine-functions" enables MFS on host but disables MFS for GPUS without warnings/errors. Reviewed by: xur, dhoekwater Differential Revision: https://reviews.llvm.org/D157750
Diffstat (limited to 'llvm/lib/Transforms/Utils/LoopSimplify.cpp')
0 files changed, 0 insertions, 0 deletions