Re: [committed] amdgcn: Remove LLVM 9 assembler/linker support
On 27/05/2022 20:16, Thomas Schwinge wrote: Hi Andrew! On 2022-05-24T16:27:52+0100, Andrew Stubbs wrote: I've committed this patch to set the minimum required LLVM version, for the assembler and linker, to 13.0.1. An upgrade from LLVM 9 is a prerequisite for the gfx90a support, and 13.0.1 is now the oldest version not known to have compatibility issues. The patch removes all the obsolete feature detection tests from configure and adds a new version test. Likewise the version dependencies in the backend are removed. I've not otherwise reviewed your commit r13-742-g8086230e7ac619c0b0eeb6e15df7975ac214725f "amdgcn: Remove LLVM 9 assembler/linker support", but happened to notice that your commit also removed the ARM-target 'HAVE_GAS_ARM_EXTENDED_ARCH' -- is that intentional; I suppose not? That had been added by Richard Earnshaw in commit r12-3725-g4e7a92c0ff3871d955ca8fb133f869b216d7224d "arm: pass architecture extensions to assembler if supported". Ooops, this was not intentional. I've just committed the attached to reinstate it. Richard, please confirm that it works as intended. The problem was that the ARM test was inserted into a case statement that I created solely for the use of amdgcn. When I then removed that block of code I didn't notice the additional, unrelated code hiding in there. Apologies for the inconvenience. Andrewarm: reinstate HAVE_GAS_ARM_EXTENDED_ARCH The check was removed by accident. gcc/ChangeLog: * config.in: Regenerate. * configure: Regenerate. * configure.ac: Reinstate HAVE_GAS_ARM_EXTENDED_ARCH test. diff --git a/gcc/config.in b/gcc/config.in index 6a4f8856c4f..16bb963b45b 100644 --- a/gcc/config.in +++ b/gcc/config.in @@ -1331,6 +1331,13 @@ #endif +/* Define if your Arm assembler permits context-specific feature extensions. + */ +#ifndef USED_FOR_TARGET +#undef HAVE_GAS_ARM_EXTENDED_ARCH +#endif + + /* Define if your assembler supports .balign and .p2align. */ #ifndef USED_FOR_TARGET #undef HAVE_GAS_BALIGN_AND_P2ALIGN diff --git a/gcc/configure b/gcc/configure index 095065ed01a..a52574d02b5 100755 --- a/gcc/configure +++ b/gcc/configure @@ -731,10 +731,10 @@ gcc_cv_dsymutil gcc_cv_otool gcc_cv_readelf gcc_cv_objdump -ORIGINAL_NM_FOR_TARGET -gcc_cv_nm ORIGINAL_OBJCOPY_FOR_TARGET gcc_cv_objcopy +ORIGINAL_NM_FOR_TARGET +gcc_cv_nm ORIGINAL_LD_GOLD_FOR_TARGET ORIGINAL_LD_BFD_FOR_TARGET ORIGINAL_LD_FOR_TARGET @@ -19676,7 +19676,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 19676 "configure" +#line 19679 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -19782,7 +19782,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 19782 "configure" +#line 19785 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -29118,6 +29118,44 @@ $as_echo "$gcc_cv_as_version, ok" >&6; } ;; esac +case "$target" in + arm*) +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for assembler for arm accepts context-specific architecture extensions" >&5 +$as_echo_n "checking assembler for assembler for arm accepts context-specific architecture extensions... " >&6; } +if ${gcc_cv_as_arm_option_extensions+:} false; then : + $as_echo_n "(cached) " >&6 +else + gcc_cv_as_arm_option_extensions=no + if test x$gcc_cv_as != x; then +$as_echo '.text + .thumb + .syntax unified + vmov.f32 s0, s1' > conftest.s +if { ac_try='$gcc_cv_as $gcc_cv_as_flags -march=armv8.1-m.main+mve -o conftest.o conftest.s >&5' + { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; } +then + gcc_cv_as_arm_option_extensions=yes +else + echo "configure: failed program was" >&5 + cat conftest.s >&5 +fi +rm -f conftest.o conftest.s + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_arm_option_extensions" >&5 +$as_echo "$gcc_cv_as_arm_option_extensions" >&6; } +if test $gcc_cv_as_arm_option_extensions = yes; then + +$as_echo "#define HAVE_GAS_ARM_EXTENDED_ARCH 1" >>confdefs.h + +fi + +esac + # ??? Not all targets support dwarf2 debug_line, even within a version # of gas. Moreover, we need to emit a valid instruction to trigger any # info to the output file. So, as supported targets are added to gas 2.11, diff --git a/gcc/configure.ac b/gcc/configure.ac index e098b905622..5fe826aa4eb 100644 --- a/gcc/configure.ac +++ b/gcc/configure.ac @@ -5427,6 +5427,19 @@ case "$target" in ;; esac +case "$target" in + arm*) +gcc_GAS_CHECK_FEATURE([assembler for arm accepts context-specific architecture extensions], + gcc_cv_as_arm_option_extensions, + [-march=armv8.1-m.main+mve], + [.text + .thumb + .syntax unified +
Re: [committed] amdgcn: Remove LLVM 9 assembler/linker support
Hi Andrew! On 2022-05-24T16:27:52+0100, Andrew Stubbs wrote: > I've committed this patch to set the minimum required LLVM version, for > the assembler and linker, to 13.0.1. An upgrade from LLVM 9 is a > prerequisite for the gfx90a support, and 13.0.1 is now the oldest > version not known to have compatibility issues. > > The patch removes all the obsolete feature detection tests from > configure and adds a new version test. Likewise the version dependencies > in the backend are removed. I've not otherwise reviewed your commit r13-742-g8086230e7ac619c0b0eeb6e15df7975ac214725f "amdgcn: Remove LLVM 9 assembler/linker support", but happened to notice that your commit also removed the ARM-target 'HAVE_GAS_ARM_EXTENDED_ARCH' -- is that intentional; I suppose not? That had been added by Richard Earnshaw in commit r12-3725-g4e7a92c0ff3871d955ca8fb133f869b216d7224d "arm: pass architecture extensions to assembler if supported". > --- a/gcc/config.in > +++ b/gcc/config.in > -/* Define if your Arm assembler permits context-specific feature extensions. > - */ > -#ifndef USED_FOR_TARGET > -#undef HAVE_GAS_ARM_EXTENDED_ARCH > -#endif > - > - > --- a/gcc/configure > +++ b/gcc/configure > case "$target" in >amdgcn-* | gcn-*) > [...] > ;; > - arm*) > -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for > assembler for arm accepts context-specific architecture extensions" >&5 > -$as_echo_n "checking assembler for assembler for arm accepts > context-specific architecture extensions... " >&6; } > -if ${gcc_cv_as_arm_option_extensions+:} false; then : > - $as_echo_n "(cached) " >&6 > -else > - gcc_cv_as_arm_option_extensions=no > - if test x$gcc_cv_as != x; then > -$as_echo '.text > - .thumb > - .syntax unified > - vmov.f32 s0, s1' > conftest.s > -if { ac_try='$gcc_cv_as $gcc_cv_as_flags -march=armv8.1-m.main+mve -o > conftest.o conftest.s >&5' > - { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 > - (eval $ac_try) 2>&5 > - ac_status=$? > - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 > - test $ac_status = 0; }; } > -then > - gcc_cv_as_arm_option_extensions=yes > -else > - echo "configure: failed program was" >&5 > - cat conftest.s >&5 > -fi > -rm -f conftest.o conftest.s > - fi > -fi > -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: > $gcc_cv_as_arm_option_extensions" >&5 > -$as_echo "$gcc_cv_as_arm_option_extensions" >&6; } > -if test $gcc_cv_as_arm_option_extensions = yes; then > - > -$as_echo "#define HAVE_GAS_ARM_EXTENDED_ARCH 1" >>confdefs.h > - > -fi > - > esac > --- a/gcc/configure.ac > +++ b/gcc/configure.ac > case "$target" in >amdgcn-* | gcn-*) > [...] > ;; > - arm*) > -gcc_GAS_CHECK_FEATURE([assembler for arm accepts context-specific > architecture extensions], > - gcc_cv_as_arm_option_extensions, > - [-march=armv8.1-m.main+mve], > - [.text > - .thumb > - .syntax unified > - vmov.f32 s0, s1],, > - [AC_DEFINE(HAVE_GAS_ARM_EXTENDED_ARCH, 1, > - [Define if your Arm assembler permits context-specific feature > extensions.])]) > esac Grüße Thomas - Siemens Electronic Design Automation GmbH; Anschrift: Arnulfstraße 201, 80634 München; Gesellschaft mit beschränkter Haftung; Geschäftsführer: Thomas Heurung, Frank Thürauf; Sitz der Gesellschaft: München; Registergericht München, HRB 106955
[committed] amdgcn: Remove LLVM 9 assembler/linker support
I've committed this patch to set the minimum required LLVM version, for the assembler and linker, to 13.0.1. An upgrade from LLVM 9 is a prerequisite for the gfx90a support, and 13.0.1 is now the oldest version not known to have compatibility issues. The patch removes all the obsolete feature detection tests from configure and adds a new version test. Likewise the version dependencies in the backend are removed. Andrewamdgcn: Remove LLVM 9 assembler/linker support The minimum required LLVM version is now 13.0.1, and is enforced by configure. gcc/ChangeLog: * config.in: Regenerate. * config/gcn/gcn-hsa.h (X_FIJI): Delete. (X_900): Delete. (X_906): Delete. (X_908): Delete. (S_FIJI): Delete. (S_900): Delete. (S_906): Delete. (S_908): Delete. (NO_XNACK): New macro. (NO_SRAM_ECC): New macro. (SRAMOPT): Keep only v4 variant. (HSACO3_SELECT_OPT): Delete. (DRIVER_SELF_SPECS): Delete. (ASM_SPEC): Remove LLVM 9 support. * config/gcn/gcn-valu.md (gather_insn_2offsets): Remove assembler bug workaround. (scatter_insn_2offsets): Likewise. * config/gcn/gcn.cc (output_file_start): Remove LLVM 9 support. (print_operand_address): Remove assembler bug workaround. * config/gcn/mkoffload.cc (EF_AMDGPU_XNACK_V3): Delete. (EF_AMDGPU_SRAM_ECC_V3): Delete. (SET_XNACK_ON): Delete v3 variants. (SET_XNACK_OFF): Delete v3 variants. (TEST_XNACK): Delete v3 variants. (SET_SRAM_ECC_ON): Delete v3 variants. (SET_SRAM_ECC_ANY): Delete v3 variants. (SET_SRAM_ECC_OFF): Delete v3 variants. (SET_SRAM_ECC_UNSUPPORTED): Delete v3 variants. (TEST_SRAM_ECC_ANY): Delete v3 variants. (TEST_SRAM_ECC_ON): Delete v3 variants. (copy_early_debug_info): Remove v3 support. (main): Remove v3 support. * configure: Regenerate. * configure.ac: Replace all GCN feature checks with a version check. diff --git a/gcc/config.in b/gcc/config.in index 64c27c9cfac..6a4f8856c4f 100644 --- a/gcc/config.in +++ b/gcc/config.in @@ -1331,13 +1331,6 @@ #endif -/* Define if your Arm assembler permits context-specific feature extensions. - */ -#ifndef USED_FOR_TARGET -#undef HAVE_GAS_ARM_EXTENDED_ARCH -#endif - - /* Define if your assembler supports .balign and .p2align. */ #ifndef USED_FOR_TARGET #undef HAVE_GAS_BALIGN_AND_P2ALIGN @@ -1457,72 +1450,6 @@ #endif -/* Define if your assembler has fixed global_load functions. */ -#ifndef USED_FOR_TARGET -#undef HAVE_GCN_ASM_GLOBAL_LOAD_FIXED -#endif - - -/* Define if your assembler expects amdgcn_target gfx908+xnack syntax. */ -#ifndef USED_FOR_TARGET -#undef HAVE_GCN_ASM_V3_SYNTAX -#endif - - -/* Define if your assembler expects amdgcn_target gfx908:xnack+ syntax. */ -#ifndef USED_FOR_TARGET -#undef HAVE_GCN_ASM_V4_SYNTAX -#endif - - -/* Define if your assembler allows -mattr=+sramecc for fiji. */ -#ifndef USED_FOR_TARGET -#undef HAVE_GCN_SRAM_ECC_FIJI -#endif - - -/* Define if your assembler allows -mattr=+sramecc for gfx900. */ -#ifndef USED_FOR_TARGET -#undef HAVE_GCN_SRAM_ECC_GFX900 -#endif - - -/* Define if your assembler allows -mattr=+sramecc for gfx906. */ -#ifndef USED_FOR_TARGET -#undef HAVE_GCN_SRAM_ECC_GFX906 -#endif - - -/* Define if your assembler allows -mattr=+sramecc for gfx908. */ -#ifndef USED_FOR_TARGET -#undef HAVE_GCN_SRAM_ECC_GFX908 -#endif - - -/* Define if your assembler allows -mattr=+xnack for fiji. */ -#ifndef USED_FOR_TARGET -#undef HAVE_GCN_XNACK_FIJI -#endif - - -/* Define if your assembler allows -mattr=+xnack for gfx900. */ -#ifndef USED_FOR_TARGET -#undef HAVE_GCN_XNACK_GFX900 -#endif - - -/* Define if your assembler allows -mattr=+xnack for gfx906. */ -#ifndef USED_FOR_TARGET -#undef HAVE_GCN_XNACK_GFX906 -#endif - - -/* Define if your assembler allows -mattr=+xnack for gfx908. */ -#ifndef USED_FOR_TARGET -#undef HAVE_GCN_XNACK_GFX908 -#endif - - /* Define to 1 if you have the `getchar_unlocked' function. */ #ifndef USED_FOR_TARGET #undef HAVE_GETCHAR_UNLOCKED @@ -2208,6 +2135,12 @@ #endif +/* Define which stat syscall is able to handle 64bit indodes. */ +#ifndef USED_FOR_TARGET +#undef HOST_STAT_FOR_64BIT_INODES +#endif + + /* Define as const if the declaration of iconv() needs const. */ #ifndef USED_FOR_TARGET #undef ICONV_CONST diff --git a/gcc/config/gcn/gcn-hsa.h b/gcc/config/gcn/gcn-hsa.h index 9b5fee9f7d4..b3079cebb43 100644 --- a/gcc/config/gcn/gcn-hsa.h +++ b/gcc/config/gcn/gcn-hsa.h @@ -75,68 +75,19 @@ extern unsigned int gcn_local_sym_hash (const char *name); supported for gcn. */ #define GOMP_SELF_SPECS "" -#ifdef HAVE_GCN_XNACK_FIJI -#define X_FIJI -#else -#define X_FIJI "!march=*:;march=fiji:;" -#endif -#ifdef HAVE_GCN_XNACK_GFX900 -#define X_900 -#else -#define X_900 "march=gfx900:;" -#endif -#ifdef HAVE_GCN_XNACK_GFX906 -#define X_906 -#else -#define X_906