From: Hans-Peter Nilsson <hp@axis.com>
To: <gcc-patches@gcc.gnu.org>
Subject: [PATCH] testsuite: Support scanning tree-dumps
Date: Mon, 6 Mar 2023 19:52:55 +0100 [thread overview]
Message-ID: <20230306185255.721FC20405@pchp3.se.axis.com> (raw)
In-Reply-To: <20230306184542.0517B20405@pchp3.se.axis.com> (message from Hans-Peter Nilsson on Mon, 6 Mar 2023 19:45:42 +0100)
This is sort-of a spin-off from effective_target_tail_call: I thought
that'd best be implemented by scanning a tree-dump, specifically
-fdump-tree-optimized, but the "tail call" found there is emitted for
*all* targets. Debugged and ready to apply, putting it out for
consideration as someone will need it (or should use it) sooner rather
than later... Best committed rather than sitting in mail-archives so:
Ok to apply?
-- >8 --
No planned usage.
* lib/target-supports.exp (check_compile): Support scanning tree-dumps.
---
gcc/testsuite/lib/target-supports.exp | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp
index 4236c920baeb..0ca7a9680bb4 100644
--- a/gcc/testsuite/lib/target-supports.exp
+++ b/gcc/testsuite/lib/target-supports.exp
@@ -87,6 +87,7 @@ proc check_compile {basename type contents args} {
assembly { set output ${basename}[pid].s }
object { set output ${basename}[pid].o }
executable { set output ${basename}[pid].exe }
+ "tree-*" -
"rtl-*" {
set output ${basename}[pid].s
lappend options "additional_flags=-fdump-$type"
@@ -108,6 +109,9 @@ proc check_compile {basename type contents args} {
if [regexp "rtl-(.*)" $type dummy rtl_type] {
set scan_output "[glob $src.\[0-9\]\[0-9\]\[0-9\]r.$rtl_type]"
file delete $output
+ } elseif [regexp "tree-(.*)" $type dummy tree_type] {
+ set scan_output "[glob $src.\[0-9\]\[0-9\]\[0-9\]t.$tree_type]"
+ file delete $output
}
# Restore additional_sources.
--
2.30.2
next prev parent reply other threads:[~2023-03-06 18:52 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-06 18:45 [PATCH 1/3] testsuite: Add tail_call effective target Hans-Peter Nilsson
2023-03-06 18:47 ` [PATCH 2/3] doc: Document testsuite check_effective_target_tail_call Hans-Peter Nilsson
2023-03-06 18:50 ` [PATCH 3/3] testsuite: Gate gcc.dg/plugin/must-tail-call-1.c and -2.c on tail_call Hans-Peter Nilsson
2023-03-06 18:52 ` Hans-Peter Nilsson [this message]
2023-03-06 21:17 ` [PATCH] testsuite: Support scanning tree-dumps Mike Stump
2023-03-06 21:14 ` [PATCH 1/3] testsuite: Add tail_call effective target Mike Stump
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230306185255.721FC20405@pchp3.se.axis.com \
--to=hp@axis.com \
--cc=gcc-patches@gcc.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).