From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp2.axis.com (smtp2.axis.com [195.60.68.18]) by sourceware.org (Postfix) with ESMTPS id 9973F3858D39 for ; Mon, 6 Mar 2023 18:52:56 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 9973F3858D39 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=axis.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=axis.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=axis.com; q=dns/txt; s=axis-central1; t=1678128777; x=1709664777; h=from:to:in-reply-to:subject:mime-version: content-transfer-encoding:references:message-id:date; bh=CsOxDVRFqTyzjhyd14qr9v0xXwJ21X7Y+KdYeh+o3s8=; b=ig5RJjrawFKDVy+KtADrceEuLSwEc1pw59mvzPWZkQMDyweB1fcuxxGP vqPyuC7OS08LZ3rBpg7a0jGAsTCjfTLsx04Hyt2Dvn5o8B7rTMwfbzp48 cTKF6AaFeLhMoYzwkYz1Awh2DTiI9XCl2oyjM9TLUUb+X6tWVDc7CKigv 44dYvCcq5P0fllf2lYtcXv75I+jYA9og+lU0SZF4kfEvYKArnf+BN36KM VjRrmPE47gyGN11uRh1W6MPTIwlLEjPM2sQUHRWqquZDUN8mCA+JMMpat xZzmb1kchb34Zb5jnJZ0poeccxR2nXoShaBXi34lI4XtiAu65bm3HnxRX w==; From: Hans-Peter Nilsson To: In-Reply-To: <20230306184542.0517B20405@pchp3.se.axis.com> (message from Hans-Peter Nilsson on Mon, 6 Mar 2023 19:45:42 +0100) Subject: [PATCH] testsuite: Support scanning tree-dumps MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8BIT References: <20230306184542.0517B20405@pchp3.se.axis.com> Message-ID: <20230306185255.721FC20405@pchp3.se.axis.com> Date: Mon, 6 Mar 2023 19:52:55 +0100 X-Spam-Status: No, score=-11.3 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,SPF_HELO_PASS,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: 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