[HIP] Use .hipi as preprocessor output extension
so that clang can recognize it and handle it automatically without -x hip-cpp-output. Reviewed by: Artem Belevich Differential Revision: https://reviews.llvm.org/D141437
This commit is contained in:
parent
d8caac21fb
commit
e8f41fdb5c
@ -42,9 +42,9 @@ TYPE("clcpp", CLCXX, PP_CXX, "clcpp", phases
|
|||||||
TYPE("cuda-cpp-output", PP_CUDA, INVALID, "cui", phases::Compile, phases::Backend, phases::Assemble, phases::Link)
|
TYPE("cuda-cpp-output", PP_CUDA, INVALID, "cui", phases::Compile, phases::Backend, phases::Assemble, phases::Link)
|
||||||
TYPE("cuda", CUDA, PP_CUDA, "cu", phases::Preprocess, phases::Compile, phases::Backend, phases::Assemble, phases::Link)
|
TYPE("cuda", CUDA, PP_CUDA, "cu", phases::Preprocess, phases::Compile, phases::Backend, phases::Assemble, phases::Link)
|
||||||
TYPE("cuda", CUDA_DEVICE, PP_CUDA, "cu", phases::Preprocess, phases::Compile, phases::Backend, phases::Assemble, phases::Link)
|
TYPE("cuda", CUDA_DEVICE, PP_CUDA, "cu", phases::Preprocess, phases::Compile, phases::Backend, phases::Assemble, phases::Link)
|
||||||
TYPE("hip-cpp-output", PP_HIP, INVALID, "cui", phases::Compile, phases::Backend, phases::Assemble, phases::Link)
|
TYPE("hip-cpp-output", PP_HIP, INVALID, "hipi", phases::Compile, phases::Backend, phases::Assemble, phases::Link)
|
||||||
TYPE("hip", HIP, PP_HIP, "cu", phases::Preprocess, phases::Compile, phases::Backend, phases::Assemble, phases::Link)
|
TYPE("hip", HIP, PP_HIP, "hip", phases::Preprocess, phases::Compile, phases::Backend, phases::Assemble, phases::Link)
|
||||||
TYPE("hip", HIP_DEVICE, PP_HIP, "cu", phases::Preprocess, phases::Compile, phases::Backend, phases::Assemble, phases::Link)
|
TYPE("hip", HIP_DEVICE, PP_HIP, "hip", phases::Preprocess, phases::Compile, phases::Backend, phases::Assemble, phases::Link)
|
||||||
TYPE("objective-c-cpp-output", PP_ObjC, INVALID, "mi", phases::Compile, phases::Backend, phases::Assemble, phases::Link)
|
TYPE("objective-c-cpp-output", PP_ObjC, INVALID, "mi", phases::Compile, phases::Backend, phases::Assemble, phases::Link)
|
||||||
TYPE("objc-cpp-output", PP_ObjC_Alias, INVALID, "mi", phases::Compile, phases::Backend, phases::Assemble, phases::Link)
|
TYPE("objc-cpp-output", PP_ObjC_Alias, INVALID, "mi", phases::Compile, phases::Backend, phases::Assemble, phases::Link)
|
||||||
TYPE("objective-c", ObjC, PP_ObjC, "m", phases::Preprocess, phases::Compile, phases::Backend, phases::Assemble, phases::Link)
|
TYPE("objective-c", ObjC, PP_ObjC, "m", phases::Preprocess, phases::Compile, phases::Backend, phases::Assemble, phases::Link)
|
||||||
|
@ -847,6 +847,8 @@ CreateFileHandler(MemoryBuffer &FirstInput,
|
|||||||
return std::make_unique<TextFileHandler>(/*Comment=*/"//");
|
return std::make_unique<TextFileHandler>(/*Comment=*/"//");
|
||||||
if (FilesType == "cui")
|
if (FilesType == "cui")
|
||||||
return std::make_unique<TextFileHandler>(/*Comment=*/"//");
|
return std::make_unique<TextFileHandler>(/*Comment=*/"//");
|
||||||
|
if (FilesType == "hipi")
|
||||||
|
return std::make_unique<TextFileHandler>(/*Comment=*/"//");
|
||||||
// TODO: `.d` should be eventually removed once `-M` and its variants are
|
// TODO: `.d` should be eventually removed once `-M` and its variants are
|
||||||
// handled properly in offload compilation.
|
// handled properly in offload compilation.
|
||||||
if (FilesType == "d")
|
if (FilesType == "d")
|
||||||
|
@ -341,6 +341,7 @@ types::ID types::lookupTypeForExtension(llvm::StringRef Ext) {
|
|||||||
.Case("FPP", TY_Fortran)
|
.Case("FPP", TY_Fortran)
|
||||||
.Case("gch", TY_PCH)
|
.Case("gch", TY_PCH)
|
||||||
.Case("hip", TY_HIP)
|
.Case("hip", TY_HIP)
|
||||||
|
.Case("hipi", TY_PP_HIP)
|
||||||
.Case("hpp", TY_CXXHeader)
|
.Case("hpp", TY_CXXHeader)
|
||||||
.Case("hxx", TY_CXXHeader)
|
.Case("hxx", TY_CXXHeader)
|
||||||
.Case("iim", TY_PP_CXXModule)
|
.Case("iim", TY_PP_CXXModule)
|
||||||
|
@ -117,7 +117,7 @@
|
|||||||
// SAVETEMP: [[CLANG:".*clang.*"]] "-cc1" "-triple" "amdgcn-amd-amdhsa" "-aux-triple" "x86_64-unknown-linux-gnu"
|
// SAVETEMP: [[CLANG:".*clang.*"]] "-cc1" "-triple" "amdgcn-amd-amdhsa" "-aux-triple" "x86_64-unknown-linux-gnu"
|
||||||
// SAVETEMP-SAME: "-E"
|
// SAVETEMP-SAME: "-E"
|
||||||
// SAVETEMP-SAME: {{.*}} "-main-file-name" "a.cu" {{.*}} "-target-cpu" "gfx803"
|
// SAVETEMP-SAME: {{.*}} "-main-file-name" "a.cu" {{.*}} "-target-cpu" "gfx803"
|
||||||
// SAVETEMP-SAME: {{.*}} "-o" [[A_GFX803_CUI:"a.*cui"]] "-x" "hip" {{".*a.cu"}}
|
// SAVETEMP-SAME: {{.*}} "-o" [[A_GFX803_CUI:"a.*hipi"]] "-x" "hip" {{".*a.cu"}}
|
||||||
// SAVETEMP-NEXT: [[CLANG]] "-cc1" "-triple" "amdgcn-amd-amdhsa" "-aux-triple" "x86_64-unknown-linux-gnu"
|
// SAVETEMP-NEXT: [[CLANG]] "-cc1" "-triple" "amdgcn-amd-amdhsa" "-aux-triple" "x86_64-unknown-linux-gnu"
|
||||||
// SAVETEMP-SAME: "-emit-llvm-bc"
|
// SAVETEMP-SAME: "-emit-llvm-bc"
|
||||||
// SAVETEMP-SAME: {{.*}} "-main-file-name" "a.cu" {{.*}} "-target-cpu" "gfx803"
|
// SAVETEMP-SAME: {{.*}} "-main-file-name" "a.cu" {{.*}} "-target-cpu" "gfx803"
|
||||||
@ -130,7 +130,7 @@
|
|||||||
// SAVETEMP: [[CLANG]] "-cc1" "-triple" "amdgcn-amd-amdhsa" "-aux-triple" "x86_64-unknown-linux-gnu"
|
// SAVETEMP: [[CLANG]] "-cc1" "-triple" "amdgcn-amd-amdhsa" "-aux-triple" "x86_64-unknown-linux-gnu"
|
||||||
// SAVETEMP-SAME: "-E"
|
// SAVETEMP-SAME: "-E"
|
||||||
// SAVETEMP-SAME: {{.*}} "-main-file-name" "a.cu" {{.*}} "-target-cpu" "gfx900"
|
// SAVETEMP-SAME: {{.*}} "-main-file-name" "a.cu" {{.*}} "-target-cpu" "gfx900"
|
||||||
// SAVETEMP-SAME: {{.*}} "-o" [[A_GFX900_CUI:"a.*cui"]] "-x" "hip" {{".*a.cu"}}
|
// SAVETEMP-SAME: {{.*}} "-o" [[A_GFX900_CUI:"a.*hipi"]] "-x" "hip" {{".*a.cu"}}
|
||||||
// SAVETEMP-NEXT: [[CLANG]] "-cc1" "-triple" "amdgcn-amd-amdhsa" "-aux-triple" "x86_64-unknown-linux-gnu"
|
// SAVETEMP-NEXT: [[CLANG]] "-cc1" "-triple" "amdgcn-amd-amdhsa" "-aux-triple" "x86_64-unknown-linux-gnu"
|
||||||
// SAVETEMP-SAME: "-emit-llvm-bc"
|
// SAVETEMP-SAME: "-emit-llvm-bc"
|
||||||
// SAVETEMP-SAME: {{.*}} "-main-file-name" "a.cu" {{.*}} "-target-cpu" "gfx900"
|
// SAVETEMP-SAME: {{.*}} "-main-file-name" "a.cu" {{.*}} "-target-cpu" "gfx900"
|
||||||
@ -147,7 +147,7 @@
|
|||||||
// SAVETEMP: [[CLANG]] "-cc1" "-triple" "amdgcn-amd-amdhsa" "-aux-triple" "x86_64-unknown-linux-gnu"
|
// SAVETEMP: [[CLANG]] "-cc1" "-triple" "amdgcn-amd-amdhsa" "-aux-triple" "x86_64-unknown-linux-gnu"
|
||||||
// SAVETEMP-SAME: "-E"
|
// SAVETEMP-SAME: "-E"
|
||||||
// SAVETEMP-SAME: {{.*}} "-main-file-name" "b.hip" {{.*}} "-target-cpu" "gfx803"
|
// SAVETEMP-SAME: {{.*}} "-main-file-name" "b.hip" {{.*}} "-target-cpu" "gfx803"
|
||||||
// SAVETEMP-SAME: {{.*}} "-o" [[B_GFX803_CUI:"b.*cui"]] "-x" "hip" {{".*b.hip"}}
|
// SAVETEMP-SAME: {{.*}} "-o" [[B_GFX803_CUI:"b.*hipi"]] "-x" "hip" {{".*b.hip"}}
|
||||||
// SAVETEMP-NEXT: [[CLANG]] "-cc1" "-triple" "amdgcn-amd-amdhsa" "-aux-triple" "x86_64-unknown-linux-gnu"
|
// SAVETEMP-NEXT: [[CLANG]] "-cc1" "-triple" "amdgcn-amd-amdhsa" "-aux-triple" "x86_64-unknown-linux-gnu"
|
||||||
// SAVETEMP-SAME: "-emit-llvm-bc"
|
// SAVETEMP-SAME: "-emit-llvm-bc"
|
||||||
// SAVETEMP-SAME: {{.*}} "-main-file-name" "b.hip" {{.*}} "-target-cpu" "gfx803"
|
// SAVETEMP-SAME: {{.*}} "-main-file-name" "b.hip" {{.*}} "-target-cpu" "gfx803"
|
||||||
@ -160,7 +160,7 @@
|
|||||||
// SAVETEMP: [[CLANG]] "-cc1" "-triple" "amdgcn-amd-amdhsa" "-aux-triple" "x86_64-unknown-linux-gnu"
|
// SAVETEMP: [[CLANG]] "-cc1" "-triple" "amdgcn-amd-amdhsa" "-aux-triple" "x86_64-unknown-linux-gnu"
|
||||||
// SAVETEMP-SAME: "-E"
|
// SAVETEMP-SAME: "-E"
|
||||||
// SAVETEMP-SAME: {{.*}} "-main-file-name" "b.hip" {{.*}} "-target-cpu" "gfx900"
|
// SAVETEMP-SAME: {{.*}} "-main-file-name" "b.hip" {{.*}} "-target-cpu" "gfx900"
|
||||||
// SAVETEMP-SAME: {{.*}} "-o" [[B_GFX900_CUI:"b.*cui"]] "-x" "hip" {{".*b.hip"}}
|
// SAVETEMP-SAME: {{.*}} "-o" [[B_GFX900_CUI:"b.*hipi"]] "-x" "hip" {{".*b.hip"}}
|
||||||
// SAVETEMP-NEXT: [[CLANG]] "-cc1" "-triple" "amdgcn-amd-amdhsa" "-aux-triple" "x86_64-unknown-linux-gnu"
|
// SAVETEMP-NEXT: [[CLANG]] "-cc1" "-triple" "amdgcn-amd-amdhsa" "-aux-triple" "x86_64-unknown-linux-gnu"
|
||||||
// SAVETEMP-SAME: "-emit-llvm-bc"
|
// SAVETEMP-SAME: "-emit-llvm-bc"
|
||||||
// SAVETEMP-SAME: {{.*}} "-main-file-name" "b.hip" {{.*}} "-target-cpu" "gfx900"
|
// SAVETEMP-SAME: {{.*}} "-main-file-name" "b.hip" {{.*}} "-target-cpu" "gfx900"
|
||||||
|
@ -32,13 +32,13 @@
|
|||||||
// UN: FileCheck -check-prefixes=CHECK,RDC,RDCL,WOUT %s
|
// UN: FileCheck -check-prefixes=CHECK,RDC,RDCL,WOUT %s
|
||||||
|
|
||||||
// -fgpu-rdc host object path
|
// -fgpu-rdc host object path
|
||||||
// RDCL: "{{.*clang.*}}" "-cc1" {{.*}} "-E" {{.*}} "-o" "hip-save-temps-host-x86_64-unknown-linux-gnu.cui"
|
// RDCL: "{{.*clang.*}}" "-cc1" {{.*}} "-E" {{.*}} "-o" "hip-save-temps-host-x86_64-unknown-linux-gnu.hipi"
|
||||||
// RDCL: "{{.*clang.*}}" "-cc1" {{.*}} "-emit-llvm-bc" {{.*}} "-o" "hip-save-temps-host-x86_64-unknown-linux-gnu.bc"
|
// RDCL: "{{.*clang.*}}" "-cc1" {{.*}} "-emit-llvm-bc" {{.*}} "-o" "hip-save-temps-host-x86_64-unknown-linux-gnu.bc"
|
||||||
// RDCL: "{{.*clang.*}}" "-cc1" {{.*}} "-S" {{.*}} "-o" "hip-save-temps-host-x86_64-unknown-linux-gnu.s"
|
// RDCL: "{{.*clang.*}}" "-cc1" {{.*}} "-S" {{.*}} "-o" "hip-save-temps-host-x86_64-unknown-linux-gnu.s"
|
||||||
// RDCL: "{{.*clang.*}}" "-cc1as" {{.*}} "-o" "hip-save-temps-host-x86_64-unknown-linux-gnu.o"
|
// RDCL: "{{.*clang.*}}" "-cc1as" {{.*}} "-o" "hip-save-temps-host-x86_64-unknown-linux-gnu.o"
|
||||||
|
|
||||||
// device object paths
|
// device object paths
|
||||||
// CHECK: {{".*clang.*"}} "-cc1" {{.*}} "-E" {{.*}} [[CPU:"-target-cpu" "gfx900"]] {{.*}} "-o" "hip-save-temps-hip-amdgcn-amd-amdhsa-gfx900.cui"
|
// CHECK: {{".*clang.*"}} "-cc1" {{.*}} "-E" {{.*}} [[CPU:"-target-cpu" "gfx900"]] {{.*}} "-o" "hip-save-temps-hip-amdgcn-amd-amdhsa-gfx900.hipi"
|
||||||
// NORDC: {{".*clang.*"}} "-cc1" {{.*}} "-emit-llvm-bc" {{.*}} [[CPU]] {{.*}} "-disable-llvm-passes" {{.*}} "-o" "hip-save-temps-hip-amdgcn-amd-amdhsa-gfx900.bc"
|
// NORDC: {{".*clang.*"}} "-cc1" {{.*}} "-emit-llvm-bc" {{.*}} [[CPU]] {{.*}} "-disable-llvm-passes" {{.*}} "-o" "hip-save-temps-hip-amdgcn-amd-amdhsa-gfx900.bc"
|
||||||
// RDC: {{".*clang.*"}} "-cc1" {{.*}} "-emit-llvm-bc" {{.*}} [[CPU]] {{.*}} "-disable-llvm-passes" {{.*}} "-o" "hip-save-temps-hip-amdgcn-amd-amdhsa-gfx900.tmp.bc"
|
// RDC: {{".*clang.*"}} "-cc1" {{.*}} "-emit-llvm-bc" {{.*}} [[CPU]] {{.*}} "-disable-llvm-passes" {{.*}} "-o" "hip-save-temps-hip-amdgcn-amd-amdhsa-gfx900.tmp.bc"
|
||||||
|
|
||||||
@ -55,7 +55,7 @@
|
|||||||
// NORDC: {{.*lld.*}}"-o" "hip-save-temps-hip-amdgcn-amd-amdhsa-gfx900.out"
|
// NORDC: {{.*lld.*}}"-o" "hip-save-temps-hip-amdgcn-amd-amdhsa-gfx900.out"
|
||||||
// RDCL: "{{.*lld.*}}" {{.*}} "-plugin-opt=-amdgpu-internalize-symbols" {{.*}}"-save-temps"
|
// RDCL: "{{.*lld.*}}" {{.*}} "-plugin-opt=-amdgpu-internalize-symbols" {{.*}}"-save-temps"
|
||||||
// RDCL-SAME: "-o" "a.out-hip-amdgcn-amd-amdhsa-gfx900"
|
// RDCL-SAME: "-o" "a.out-hip-amdgcn-amd-amdhsa-gfx900"
|
||||||
// RDCC: "{{.*clang.*}}" "-cc1" {{.*}} "-E" {{.*}} "-o" "hip-save-temps-host-x86_64-unknown-linux-gnu.cui"
|
// RDCC: "{{.*clang.*}}" "-cc1" {{.*}} "-E" {{.*}} "-o" "hip-save-temps-host-x86_64-unknown-linux-gnu.hipi"
|
||||||
// RDCC: "{{.*clang.*}}" "-cc1" {{.*}} "-emit-llvm-bc" {{.*}} "-o" "hip-save-temps-host-x86_64-unknown-linux-gnu.bc"
|
// RDCC: "{{.*clang.*}}" "-cc1" {{.*}} "-emit-llvm-bc" {{.*}} "-o" "hip-save-temps-host-x86_64-unknown-linux-gnu.bc"
|
||||||
// RDCC: "{{.*clang.*}}" "-cc1" {{.*}} "-S" {{.*}} "-o" "hip-save-temps-host-x86_64-unknown-linux-gnu.s"
|
// RDCC: "{{.*clang.*}}" "-cc1" {{.*}} "-S" {{.*}} "-o" "hip-save-temps-host-x86_64-unknown-linux-gnu.s"
|
||||||
// RDCC: "{{.*clang.*}}" "-cc1as" {{.*}} "-o" "hip-save-temps-host-x86_64-unknown-linux-gnu.o"
|
// RDCC: "{{.*clang.*}}" "-cc1as" {{.*}} "-o" "hip-save-temps-host-x86_64-unknown-linux-gnu.o"
|
||||||
@ -64,7 +64,7 @@
|
|||||||
// RDCL: {{.*}}llvm-mc{{.*}}"-o" "hip-save-temps-hip-amdgcn-amd-amdhsa.o" "hip-save-temps-hip-amdgcn-amd-amdhsa.mcin" "--filetype=obj"
|
// RDCL: {{.*}}llvm-mc{{.*}}"-o" "hip-save-temps-hip-amdgcn-amd-amdhsa.o" "hip-save-temps-hip-amdgcn-amd-amdhsa.mcin" "--filetype=obj"
|
||||||
|
|
||||||
// -fno-gpu-rdc host object path
|
// -fno-gpu-rdc host object path
|
||||||
// NORDC: "{{.*clang.*}}" "-cc1" {{.*}} "-E" {{.*}} "-o" "hip-save-temps-host-x86_64-unknown-linux-gnu.cui"
|
// NORDC: "{{.*clang.*}}" "-cc1" {{.*}} "-E" {{.*}} "-o" "hip-save-temps-host-x86_64-unknown-linux-gnu.hipi"
|
||||||
// NORDC: "{{.*clang.*}}" "-cc1" {{.*}} "-emit-llvm-bc" {{.*}} "-fcuda-include-gpubinary" {{.*}} "-o" "hip-save-temps-host-x86_64-unknown-linux-gnu.bc"
|
// NORDC: "{{.*clang.*}}" "-cc1" {{.*}} "-emit-llvm-bc" {{.*}} "-fcuda-include-gpubinary" {{.*}} "-o" "hip-save-temps-host-x86_64-unknown-linux-gnu.bc"
|
||||||
// NORDC: "{{.*clang.*}}" "-cc1" {{.*}} "-S" {{.*}} "-o" "hip-save-temps-host-x86_64-unknown-linux-gnu.s"
|
// NORDC: "{{.*clang.*}}" "-cc1" {{.*}} "-S" {{.*}} "-o" "hip-save-temps-host-x86_64-unknown-linux-gnu.s"
|
||||||
// NORDC: "{{.*clang.*}}" "-cc1as" {{.*}} "-o" "hip-save-temps{{.*}}.o"
|
// NORDC: "{{.*clang.*}}" "-cc1as" {{.*}} "-o" "hip-save-temps{{.*}}.o"
|
||||||
|
@ -4,7 +4,11 @@
|
|||||||
// RUN: --offload-arch=gfx803 -nogpulib \
|
// RUN: --offload-arch=gfx803 -nogpulib \
|
||||||
// RUN: -x hip-cpp-output %s 2>&1 | FileCheck %s
|
// RUN: -x hip-cpp-output %s 2>&1 | FileCheck %s
|
||||||
|
|
||||||
// CHECK: {{".*clang-offload-bundler.*"}} {{.*}}"-output=[[HOST_PP:.*cui]]" "-output=[[DEV_PP:.*cui]]" "-unbundle"
|
// RUN: %clang -### --target=x86_64-unknown-linux-gnu \
|
||||||
|
// RUN: --offload-arch=gfx803 -nogpulib \
|
||||||
|
// RUN: %s 2>&1 | FileCheck %s
|
||||||
|
|
||||||
|
// CHECK: {{".*clang-offload-bundler.*"}} {{.*}}"-output=[[HOST_PP:.*hipi]]" "-output=[[DEV_PP:.*hipi]]" "-unbundle"
|
||||||
// CHECK: {{".*clang.*"}} "-cc1" {{.*}}"-target-cpu" "gfx803" {{.*}}"-o" "[[DEV_O:.*o]]" {{.*}}"[[DEV_PP]]"
|
// CHECK: {{".*clang.*"}} "-cc1" {{.*}}"-target-cpu" "gfx803" {{.*}}"-o" "[[DEV_O:.*o]]" {{.*}}"[[DEV_PP]]"
|
||||||
// CHECK: {{".*lld.*"}} {{.*}}"-o" "[[DEV_ISA:.*]]" "[[DEV_O]]"
|
// CHECK: {{".*lld.*"}} {{.*}}"-o" "[[DEV_ISA:.*]]" "[[DEV_O]]"
|
||||||
// CHECK: {{".*clang-offload-bundler.*"}} {{.*}}"-input={{.*}}" "-input=[[DEV_ISA]]" "-output=[[FATBIN:.*]]"
|
// CHECK: {{".*clang-offload-bundler.*"}} {{.*}}"-input={{.*}}" "-input=[[DEV_ISA]]" "-output=[[FATBIN:.*]]"
|
||||||
@ -13,11 +17,11 @@
|
|||||||
|
|
||||||
// RUN: %clang -### --target=x86_64-unknown-linux-gnu \
|
// RUN: %clang -### --target=x86_64-unknown-linux-gnu \
|
||||||
// RUN: --offload-arch=gfx803 -nogpulib -fgpu-rdc \
|
// RUN: --offload-arch=gfx803 -nogpulib -fgpu-rdc \
|
||||||
// RUN: -x hip-cpp-output %s 2>&1 | FileCheck -check-prefix=RDC %s
|
// RUN: %s 2>&1 | FileCheck -check-prefix=RDC %s
|
||||||
|
|
||||||
// RDC: {{".*clang-offload-bundler.*"}} {{.*}}"-output=[[HOST_PP:.*cui]]" "-output=[[DEV_PP:.*cui]]" "-unbundle"
|
// RDC: {{".*clang-offload-bundler.*"}} {{.*}}"-output=[[HOST_PP:.*hipi]]" "-output=[[DEV_PP:.*hipi]]" "-unbundle"
|
||||||
// RDC: {{".*clang.*"}} {{.*}}"-triple" "x86_64-unknown-linux-gnu"{{.*}} "-o" "[[HOST_O:.*o]]" {{.*}}"[[HOST_PP]]"
|
// RDC: {{".*clang.*"}} {{.*}}"-triple" "x86_64-unknown-linux-gnu"{{.*}} "-o" "[[HOST_O:.*o]]" {{.*}}"[[HOST_PP]]"
|
||||||
// RDC: {{".*clang-offload-bundler.*"}} {{.*}}"-output=[[HOST_PP:.*cui]]" "-output=[[DEV_PP:.*cui]]" "-unbundle"
|
// RDC: {{".*clang-offload-bundler.*"}} {{.*}}"-output=[[HOST_PP:.*hipi]]" "-output=[[DEV_PP:.*hipi]]" "-unbundle"
|
||||||
// RDC: {{".*clang.*"}} "-cc1" {{.*}}"-target-cpu" "gfx803" {{.*}}"-o" "[[DEV_BC:.*bc]]" {{.*}}"[[DEV_PP]]"
|
// RDC: {{".*clang.*"}} "-cc1" {{.*}}"-target-cpu" "gfx803" {{.*}}"-o" "[[DEV_BC:.*bc]]" {{.*}}"[[DEV_PP]]"
|
||||||
// RDC: {{".*lld.*"}} {{.*}}"-o" "[[DEV_ISA:.*]]" "[[DEV_BC]]"
|
// RDC: {{".*lld.*"}} {{.*}}"-o" "[[DEV_ISA:.*]]" "[[DEV_BC]]"
|
||||||
// RDC: {{".*clang-offload-bundler.*"}} {{.*}}"-input={{.*}}" "-input=[[DEV_ISA]]" "-output=[[FATBIN:.*]]"
|
// RDC: {{".*clang-offload-bundler.*"}} {{.*}}"-input={{.*}}" "-input=[[DEV_ISA]]" "-output=[[FATBIN:.*]]"
|
@ -1,7 +1,7 @@
|
|||||||
from lit.llvm import llvm_config
|
from lit.llvm import llvm_config
|
||||||
|
|
||||||
config.suffixes = ['.c', '.cpp', '.h', '.m', '.mm', '.S', '.s', '.f90', '.F90', '.f95',
|
config.suffixes = ['.c', '.cpp', '.h', '.m', '.mm', '.S', '.s', '.f90', '.F90', '.f95',
|
||||||
'.cu', '.rs', '.cl', '.clcpp', '.hip', '.hlsl']
|
'.cu', '.rs', '.cl', '.clcpp', '.hip', '.hipi', '.hlsl']
|
||||||
config.substitutions = list(config.substitutions)
|
config.substitutions = list(config.substitutions)
|
||||||
config.substitutions.insert(0,
|
config.substitutions.insert(0,
|
||||||
('%clang_cc1',
|
('%clang_cc1',
|
||||||
|
@ -93,13 +93,14 @@ int main(int argc, const char **argv) {
|
|||||||
TargetNames("targets", cl::CommaSeparated,
|
TargetNames("targets", cl::CommaSeparated,
|
||||||
cl::desc("[<offload kind>-<target triple>,...]"),
|
cl::desc("[<offload kind>-<target triple>,...]"),
|
||||||
cl::cat(ClangOffloadBundlerCategory));
|
cl::cat(ClangOffloadBundlerCategory));
|
||||||
cl::opt<std::string>
|
cl::opt<std::string> FilesType(
|
||||||
FilesType("type", cl::Required,
|
"type", cl::Required,
|
||||||
cl::desc("Type of the files to be bundled/unbundled.\n"
|
cl::desc("Type of the files to be bundled/unbundled.\n"
|
||||||
"Current supported types are:\n"
|
"Current supported types are:\n"
|
||||||
" i - cpp-output\n"
|
" i - cpp-output\n"
|
||||||
" ii - c++-cpp-output\n"
|
" ii - c++-cpp-output\n"
|
||||||
" cui - cuda/hip-output\n"
|
" cui - cuda-cpp-output\n"
|
||||||
|
" hipi - hip-cpp-output\n"
|
||||||
" d - dependency\n"
|
" d - dependency\n"
|
||||||
" ll - llvm\n"
|
" ll - llvm\n"
|
||||||
" bc - llvm-bc\n"
|
" bc - llvm-bc\n"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user