]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Add LRA target selector.
authorJohn David Anglin <danglin@gcc.gnu.org>
Wed, 10 Mar 2021 14:57:01 +0000 (14:57 +0000)
committerJohn David Anglin <danglin@gcc.gnu.org>
Wed, 10 Mar 2021 14:59:49 +0000 (14:59 +0000)
gcc/ChangeLog:

* doc/sourcebuild.texi: Document LRA target selector.

gcc/testsuite/ChangeLog:

PR testsuite/99292
* lib/target-supports.exp (check_effective_target_lra): New.
* gcc.c-torture/compile/asmgoto-2.c: Use LRA target selector.
* gcc.c-torture/compile/asmgoto-5.c: Likewise.
* gcc.c-torture/compile/pr98096.c: Likewise.
* gcc.dg/pr97954.c: Likewise.

gcc/doc/sourcebuild.texi
gcc/testsuite/gcc.c-torture/compile/asmgoto-2.c
gcc/testsuite/gcc.c-torture/compile/asmgoto-5.c
gcc/testsuite/gcc.c-torture/compile/pr98096.c
gcc/testsuite/gcc.dg/pr97954.c
gcc/testsuite/lib/target-supports.exp

index cbb7a5b153da0cce75a17002e890c9d6774bc339..1fa36566453b6a3fdde610f1336996c970d0adfe 100644 (file)
@@ -2525,6 +2525,9 @@ Target keeps null pointer checks, either due to the use of
 @item llvm_binutils
 Target is using an LLVM assembler and/or linker, instead of GNU Binutils.
 
+@item lra
+Target supports local register allocator (LRA).
+
 @item lto
 Compiler has been configured to support link-time optimization (LTO).
 
index d2d2ac536bd681838210236f4061c9baa0043cd9..43e597bc59f8fa04425979d59322fe2af82fd859 100644 (file)
@@ -1,6 +1,5 @@
 /* This test should be switched off for a new target with less than 4 allocatable registers */
-/* { dg-do compile } */
-/* { dg-skip-if "Reload target" { hppa*-*-* } } */
+/* { dg-do compile { target lra } } */
 int
 foo (void)
 {
index ce751ced90ccdcfed15f5bd795a368cff51a0baa..e1574a2903afcc9691079de560f0760c8a591723 100644 (file)
@@ -1,7 +1,6 @@
 /* Test to generate output reload in asm goto on x86_64.  */
-/* { dg-do compile } */
+/* { dg-do compile { target lra } } */
 /* { dg-skip-if "no O0" { { i?86-*-* x86_64-*-* } && { ! ia32 } } { "-O0" } { "" } } */
-/* { dg-skip-if "Reload target" { hppa*-*-* } } */
 
 #if defined __x86_64__
 #define ASM(s) asm (s)
index 95ad55c81aa11818a7fbe777581518a788212a8d..bba3fa5c619069e5c32ad455644110e5b94cdcd6 100644 (file)
@@ -1,6 +1,6 @@
 /* Test for correct naming of label operands in asm goto in case of presence of
    input/output operands. */
-/* { dg-do compile } */
+/* { dg-do compile { target lra } } */
 int i, j;
 int f(void) {
   asm goto ("# %0 %2" : "+r" (i) ::: jmp);
index 178e1d2e965e8ae7d825b7498fa50354259744b2..0be60f500b663f6f850b31b41bcb56dd5f39e5db 100644 (file)
@@ -1,5 +1,5 @@
 /* PR rtl-optimization/97954 */
-/* { dg-do compile } */
+/* { dg-do compile { target lra } } */
 /* { dg-options "-O2" } */
 
 int
index 52d3d036d3c5c63b75b03d2025dea00ddc97a111..a90c375b8fe28c3493276be6c108790c2cc97cf7 100644 (file)
@@ -11005,3 +11005,13 @@ proc check_effective_target_o_flag_in_section { } {
        }
     }]
 }
+
+# return 1 if LRA is supported.
+
+proc check_effective_target_lra { } {
+    if { [istarget hppa*-*-*] } {
+       return 0
+    }
+    return 1
+}
+