File tree Expand file tree Collapse file tree 2 files changed +24
-3
lines changed Expand file tree Collapse file tree 2 files changed +24
-3
lines changed Original file line number Diff line number Diff line change @@ -1913,15 +1913,19 @@ static inline const std::unordered_set<std::string_view> ValidSpirvFlags{
1913
1913
" -ffinite-math-only" ,
1914
1914
" -ffp-contract=fast" ,
1915
1915
" -ffp-contract=fast-honor-pragmas" ,
1916
+ " -ffp-contract=on" ,
1916
1917
" -fgpu-rdc" ,
1917
1918
" -finline-functions" ,
1918
- " -fno-signed-zeros" ,
1919
- " -fno-rounding-math" ,
1920
- " -fno-experimental-relative-c++-abi-vtables" ,
1921
1919
" -fno-autolink" ,
1920
+ " -fno-experimental-relative-c++-abi-vtables" ,
1921
+ " -fno-rounding-math" ,
1922
+ " -fno-signed-zeros" ,
1923
+ " -fno-threadsafe-statics" ,
1922
1924
" -freciprocal-math" ,
1925
+ " -fskip-odr-check-in-gmf" ,
1923
1926
" -funsafe-math-optimizations" ,
1924
1927
" -fvisibility=hidden" ,
1928
+ " -gheterogeneous-dwarf=diexpression" ,
1925
1929
" -O0" ,
1926
1930
" -O1" ,
1927
1931
" -O2" ,
@@ -1967,6 +1971,9 @@ amd_comgr_status_t AMDGPUCompiler::extractSpirvFlags(DataSet *BcSet) {
1967
1971
if (Tmp == " --hipstdpar" || Tmp == " -amdgpu-enable-hipstdpar" ) {
1968
1972
Bc->SpirvFlags .push_back (" -mllvm" );
1969
1973
Bc->SpirvFlags .push_back (" -amdgpu-enable-hipstdpar" );
1974
+ } else if (Tmp == " -amdgpu-spill-cfi-saved-regs" ) {
1975
+ Bc->SpirvFlags .push_back (" -mllvm" );
1976
+ Bc->SpirvFlags .push_back (" -amdgpu-spill-cfi-saved-regs" );
1970
1977
} else if (ValidSpirvFlags.count (Tmp)) {
1971
1978
Bc->SpirvFlags .push_back (Saver.save (Tmp.c_str ()).data ());
1972
1979
}
Original file line number Diff line number Diff line change 18
18
// COM: Check that SPIR-V flags are correctly extracted
19
19
// CHECK: Driver Job Args: {{.*}} "-fno-rounding-math" "-O3" "-fno-autolink" "-fvisibility=hidden" "-fexceptions" "-fcolor-diagnostics" "-mcode-object-version=5"
20
20
21
+ // COM: ----
22
+ // COM: Generate a debuginfo SPIR-V file from a HIP kernel
23
+ // RUN: clang -x hip --offload-arch=amdgcnspirv -nogpulib -nogpuinc \
24
+ // RUN: --no-gpu-bundle-output --offload-device-only -O3 %s -o %t.dbg.spv -g
25
+
26
+ // COM: Compile debuginfo SPIR-V source to a relocatable
27
+ // RUN: AMD_COMGR_EMIT_VERBOSE_LOGS=1 AMD_COMGR_REDIRECT_LOGS=stdout \
28
+ // RUN: spirv-to-reloc %t.dbg.spv %t.dbg.o | FileCheck \
29
+ // RUN: -check-prefix=CHECK-DBG %s
30
+
31
+ // COM: Check that debuginfo SPIR-V flags are correctly extracted
32
+ // CHECK-DBG: Driver Job Args: {{.*}} "-gheterogeneous-dwarf=diexpression" "-mllvm -amdgpu-spill-cfi-saved-regs"
33
+
34
+
21
35
#include < cstdlib>
22
36
23
37
#define __constant__ __attribute__ ((constant))
You can’t perform that action at this time.
0 commit comments