public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r11-7601] Add LRA target selector.
@ 2021-03-10 15:00 John David Anglin
  0 siblings, 0 replies; only message in thread
From: John David Anglin @ 2021-03-10 15:00 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:cb33c7276a6bbf8dd1ffba13d358f49b933d9cc8

commit r11-7601-gcb33c7276a6bbf8dd1ffba13d358f49b933d9cc8
Author: John David Anglin <danglin@gcc.gnu.org>
Date:   Wed Mar 10 14:57:01 2021 +0000

    Add LRA target selector.
    
    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.

Diff:
---
 gcc/doc/sourcebuild.texi                        |  3 +++
 gcc/testsuite/gcc.c-torture/compile/asmgoto-2.c |  3 +--
 gcc/testsuite/gcc.c-torture/compile/asmgoto-5.c |  3 +--
 gcc/testsuite/gcc.c-torture/compile/pr98096.c   |  2 +-
 gcc/testsuite/gcc.dg/pr97954.c                  |  2 +-
 gcc/testsuite/lib/target-supports.exp           | 10 ++++++++++
 6 files changed, 17 insertions(+), 6 deletions(-)

diff --git a/gcc/doc/sourcebuild.texi b/gcc/doc/sourcebuild.texi
index cbb7a5b153d..1fa36566453 100644
--- a/gcc/doc/sourcebuild.texi
+++ b/gcc/doc/sourcebuild.texi
@@ -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).
 
diff --git a/gcc/testsuite/gcc.c-torture/compile/asmgoto-2.c b/gcc/testsuite/gcc.c-torture/compile/asmgoto-2.c
index d2d2ac536bd..43e597bc59f 100644
--- a/gcc/testsuite/gcc.c-torture/compile/asmgoto-2.c
+++ b/gcc/testsuite/gcc.c-torture/compile/asmgoto-2.c
@@ -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)
 {
diff --git a/gcc/testsuite/gcc.c-torture/compile/asmgoto-5.c b/gcc/testsuite/gcc.c-torture/compile/asmgoto-5.c
index ce751ced90c..e1574a2903a 100644
--- a/gcc/testsuite/gcc.c-torture/compile/asmgoto-5.c
+++ b/gcc/testsuite/gcc.c-torture/compile/asmgoto-5.c
@@ -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)
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr98096.c b/gcc/testsuite/gcc.c-torture/compile/pr98096.c
index 95ad55c81aa..bba3fa5c619 100644
--- a/gcc/testsuite/gcc.c-torture/compile/pr98096.c
+++ b/gcc/testsuite/gcc.c-torture/compile/pr98096.c
@@ -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);
diff --git a/gcc/testsuite/gcc.dg/pr97954.c b/gcc/testsuite/gcc.dg/pr97954.c
index 178e1d2e965..0be60f500b6 100644
--- a/gcc/testsuite/gcc.dg/pr97954.c
+++ b/gcc/testsuite/gcc.dg/pr97954.c
@@ -1,5 +1,5 @@
 /* PR rtl-optimization/97954 */
-/* { dg-do compile } */
+/* { dg-do compile { target lra } } */
 /* { dg-options "-O2" } */
 
 int
diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp
index 52d3d036d3c..a90c375b8fe 100644
--- a/gcc/testsuite/lib/target-supports.exp
+++ b/gcc/testsuite/lib/target-supports.exp
@@ -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
+}
+


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-03-10 15:00 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-10 15:00 [gcc r11-7601] Add LRA target selector John David Anglin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).