From patchwork Fri Oct 23 09:34:02 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xionghu Luo X-Patchwork-Id: 1386625 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=8.43.85.97; helo=sourceware.org; envelope-from=gcc-patches-bounces@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=gcc.gnu.org Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.a=rsa-sha256 header.s=default header.b=yPFWKy2a; dkim-atps=neutral Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4CHfGn3QHNz9sTD for ; Fri, 23 Oct 2020 20:35:29 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 6E36D39878E6; Fri, 23 Oct 2020 09:35:26 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6E36D39878E6 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1603445726; bh=oojo3Uocau+yveVF8EaU1fX3WkCNGhHY3hGHLyciTWs=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:Cc:From; b=yPFWKy2aek17DpEkfynAiOE8fLbT/TA1po0zuR9/nksZj0NHIyRFeZU6RdDitmV69 Qr+kMoaE6pX5OKadPNW8W83Gc2dDwRZVkwSpPVd6mycI2wPNnLo45ZWs/4OYXOtPle f4aqJyXY48zV/ifNPij0ERDHjFy5OQyKy26wBkvw= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mx0a-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by sourceware.org (Postfix) with ESMTPS id 443173858036; Fri, 23 Oct 2020 09:35:23 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 443173858036 Received: from pps.filterd (m0098419.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 09N9Vsol078835; Fri, 23 Oct 2020 05:35:22 -0400 Received: from pps.reinject (localhost [127.0.0.1]) by mx0b-001b2d01.pphosted.com with ESMTP id 34bvm2g3at-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 23 Oct 2020 05:35:21 -0400 Received: from m0098419.ppops.net (m0098419.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.36/8.16.0.36) with SMTP id 09N9VweW079162; Fri, 23 Oct 2020 05:35:21 -0400 Received: from ppma03fra.de.ibm.com (6b.4a.5195.ip4.static.sl-reverse.com [149.81.74.107]) by mx0b-001b2d01.pphosted.com with ESMTP id 34bvm2g3a2-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 23 Oct 2020 05:35:21 -0400 Received: from pps.filterd (ppma03fra.de.ibm.com [127.0.0.1]) by ppma03fra.de.ibm.com (8.16.0.42/8.16.0.42) with SMTP id 09N9S2NT008650; Fri, 23 Oct 2020 09:35:19 GMT Received: from b06cxnps3074.portsmouth.uk.ibm.com (d06relay09.portsmouth.uk.ibm.com [9.149.109.194]) by ppma03fra.de.ibm.com with ESMTP id 347r87ubem-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 23 Oct 2020 09:35:19 +0000 Received: from d06av21.portsmouth.uk.ibm.com (d06av21.portsmouth.uk.ibm.com [9.149.105.232]) by b06cxnps3074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 09N9ZH6q30474636 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 23 Oct 2020 09:35:17 GMT Received: from d06av21.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id EE0F452050; Fri, 23 Oct 2020 09:35:16 +0000 (GMT) Received: from marlin.aus.stglabs.ibm.com (unknown [9.40.194.84]) by d06av21.portsmouth.uk.ibm.com (Postfix) with ESMTP id 9D1F452059; Fri, 23 Oct 2020 09:35:15 +0000 (GMT) To: gcc-patches@gcc.gnu.org Subject: [PATCH] Add debug_bb_details and debug_bb_n_details Date: Fri, 23 Oct 2020 04:34:02 -0500 Message-Id: <20201023093402.64062-1-luoxhu@linux.ibm.com> X-Mailer: git-send-email 2.27.0.90.geebb51ba8c MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.235, 18.0.737 definitions=2020-10-23_04:2020-10-23, 2020-10-23 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 mlxlogscore=929 impostorscore=0 suspectscore=1 lowpriorityscore=0 adultscore=0 priorityscore=1501 bulkscore=0 phishscore=0 mlxscore=0 malwarescore=0 clxscore=1011 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2010230064 X-Spam-Status: No, score=-11.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Xiong Hu Luo via Gcc-patches From: Xionghu Luo Reply-To: Xiong Hu Luo Cc: rguenther@suse.de, segher@kernel.crashing.org, Xiong Hu Luo , wschmidt@linux.ibm.com, linkw@gcc.gnu.org, dje.gcc@gmail.com Errors-To: gcc-patches-bounces@gcc.gnu.org Sender: "Gcc-patches" Sometimes debug_bb_slim&debug_bb_n_slim is not enough, how about adding this debug_bb_details&debug_bb_n_details? Or any other similar call existed? gcc/ChangeLog: 2020-10-23 Xionghu Luo * print-rtl.c (debug_bb_details): New function. * (debug_bb_n_details): New function. --- gcc/print-rtl.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/gcc/print-rtl.c b/gcc/print-rtl.c index 25265efc71b..f45873b8863 100644 --- a/gcc/print-rtl.c +++ b/gcc/print-rtl.c @@ -2150,6 +2150,21 @@ debug_bb_n_slim (int n) debug_bb_slim (bb); } +extern void debug_bb_details (basic_block); +DEBUG_FUNCTION void +debug_bb_details (basic_block bb) +{ + dump_bb (stderr, bb, 0, TDF_DETAILS | TDF_BLOCKS); +} + +extern void debug_bb_n_details (int); +DEBUG_FUNCTION void +debug_bb_n_details (int n) +{ + basic_block bb = BASIC_BLOCK_FOR_FN (cfun, n); + debug_bb_details (bb); +} + #endif #if __GNUC__ >= 10