From patchwork Sat Mar 4 09:01:49 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jakub Jelinek X-Patchwork-Id: 64186 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp838869wrd; Sat, 4 Mar 2023 01:02:44 -0800 (PST) X-Google-Smtp-Source: AK7set+xJ/yniLWc/4xkUaLU4JuNwBJgTnPeV38DlbWRnr10uCCMHXlpSMNOmm5RyeY78SLesgyi X-Received: by 2002:a17:906:a8e:b0:8b1:76b8:904f with SMTP id y14-20020a1709060a8e00b008b176b8904fmr8376968ejf.34.1677920564302; Sat, 04 Mar 2023 01:02:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677920564; cv=none; d=google.com; s=arc-20160816; b=somxFsePOOO+EPFgf2o7xX32awuTVy4qrc8+Fowehf3whHAA+LRujfBnEtniUgphgo kWn+9sLI2WMNKXzy/5OY8pA796IkaOxCcRlAyIFYGrVnPhXrRfA82J8TFm/0PYP8HNf2 QW0rApJaMhywbjEcBaHND6AH+VO/oR0SHnTsC+viL+r9qI0t+xSxEh8EMcNLK2HrNbIX pRpjlwvbW56bR8wmsG2pFcQgbKHyG0qzVjay653/4OKca8cIsNzDaiMc6c3jASys4e9Z JSrZbtU4TuWfN5uj1MKy+Ap71j+w/VNdpZXO47xR1Jdba+5UruI2JQahPld0mljyrjvP zAGg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:reply-to:from:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence :content-disposition:mime-version:message-id:subject:cc:to:date :dmarc-filter:delivered-to:dkim-signature:dkim-filter; bh=1TIUgc3p7sWYYsISIznUhJMC3gt775+p57vln2Vok0Y=; b=FXq2X3FvH+NcstdJ/Ji2rvPZXzpNVDf9AE3gHY5+AZ3NC5TUlrgdUJeufx7xjxG2Sq Q93KQpGBO5T9Ke09Whiv2JGDIrdPSqCoJUwkLOW14j8eQ5VquJVaaGcCRdM/4E1NeIpM ZbDuYL/Fx8vICSl0mn2TV9ZMtUqpSHVx2IoUyTlyOGg2+Tigp1td5kAkIm131OMh1y5I d2PfarzlA9V4dzkAK3mMCtvef5opbOTBFvNLPnjcFUZkCDyFSpUlNmf49dJAAObCTz3e CXOTcSKSWoyN8k78U6zzza3aNJllnsj4vB3uhNnVjIx2WdXFMdISgfk4U7yl46uByRF8 Sa1g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=yR0S9Ajc; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from sourceware.org (server2.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id h26-20020a50ed9a000000b004ab092142e1si5133929edr.406.2023.03.04.01.02.44 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 04 Mar 2023 01:02:44 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=yR0S9Ajc; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 33D403858413 for ; Sat, 4 Mar 2023 09:02:43 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 33D403858413 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1677920563; bh=1TIUgc3p7sWYYsISIznUhJMC3gt775+p57vln2Vok0Y=; h=Date:To:Cc:Subject:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From:Reply-To:From; b=yR0S9Ajcmt2XMnQ5HCJPnyqWSergw1chLrKUvYW4ApdXedWniS9t15nB7mbXl2jgL qd52IgVoGbbMNA58LKViTEgKutXAW5Df8Vh1jzAxG3SH8iIlxnirFVdtcXQuPKawkl qv60NN1qWvZOIzpKy1kYEqLcnXo97Tzx4DM8r08k= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id C416A3858024 for ; Sat, 4 Mar 2023 09:01:57 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org C416A3858024 Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-547-T_AQi0OsMxuOIzngGJfNKQ-1; Sat, 04 Mar 2023 04:01:54 -0500 X-MC-Unique: T_AQi0OsMxuOIzngGJfNKQ-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 9E75D185A78B; Sat, 4 Mar 2023 09:01:53 +0000 (UTC) Received: from tucnak.zalov.cz (unknown [10.39.192.16]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 624A8140EBF4; Sat, 4 Mar 2023 09:01:53 +0000 (UTC) Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.17.1/8.17.1) with ESMTPS id 32491oDq447901 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Sat, 4 Mar 2023 10:01:51 +0100 Received: (from jakub@localhost) by tucnak.zalov.cz (8.17.1/8.17.1/Submit) id 32491opB447900; Sat, 4 Mar 2023 10:01:50 +0100 Date: Sat, 4 Mar 2023 10:01:49 +0100 To: Richard Biener Cc: gcc-patches@gcc.gnu.org Subject: [PATCH] Remove remaining traces of m_vecdata from comments [PR109006] Message-ID: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.7 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Disposition: inline X-Spam-Status: No, score=-3.4 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_NONE, 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 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: Jakub Jelinek via Gcc-patches From: Jakub Jelinek Reply-To: Jakub Jelinek Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1759427233844689406?= X-GMAIL-MSGID: =?utf-8?q?1759427233844689406?= Hi! The following patch adjusts remaining references to the removed m_vecdata array from vec.h in various comments. Tested on x86_64-linux, ok for trunk? 2023-03-04 Jakub Jelinek PR middle-end/109006 * vec.cc (test_auto_alias): Adjust comment for removal of m_vecdata. * read-rtl-function.cc (function_reader::parse_block): Likewise. * gdbhooks.py: Likewise. Jakub --- gcc/vec.cc.jj 2023-02-27 09:41:30.910265623 +0100 +++ gcc/vec.cc 2023-03-03 13:00:01.941663049 +0100 @@ -568,7 +568,7 @@ test_auto_delete_vec () ASSERT_EQ (dtor_count, 2); } -/* Verify accesses to m_vecdata are done indirectly. */ +/* Verify accesses to vector elements are done indirectly. */ static void test_auto_alias () --- gcc/read-rtl-function.cc.jj 2023-01-02 09:32:54.001828467 +0100 +++ gcc/read-rtl-function.cc 2023-03-03 12:59:15.941340372 +0100 @@ -622,10 +622,11 @@ function_reader::parse_block () These can get out-of-sync when basic blocks are optimized away. They get back in sync by "compact_blocks". - We reconstruct cfun->cfg->x_basic_block_info->m_vecdata with NULL - values in it for any missing basic blocks, so that (a) == (b) for - all of the blocks we create. The doubly-linked list of basic - blocks (next_bb/prev_bb) skips over these "holes". */ + We reconstruct cfun->cfg->x_basic_block_info->address () pointed + vector elements with NULL values in it for any missing basic blocks, + so that (a) == (b) for all of the blocks we create. The + doubly-linked list of basic blocks (next_bb/prev_bb) skips over + these "holes". */ if (m_highest_bb_idx < bb_idx) m_highest_bb_idx = bb_idx; --- gcc/gdbhooks.py.jj 2023-03-03 17:48:45.255040248 +0100 +++ gcc/gdbhooks.py 2023-03-03 18:42:06.609496428 +0100 @@ -133,10 +133,10 @@ vector: attempting to do so instead give or a (probably) invalid cast to vec<> for the memory after the vec (for vec[1] onwards). -Instead (for now) you must access m_vecdata: - (gdb) p bb->preds->m_vecdata[0] +Instead (for now) you must access the payload directly: + (gdb) p ((edge_def**)(bb->preds+1))[0] $20 = 5)> - (gdb) p bb->preds->m_vecdata[1] + (gdb) p ((edge_def**)(bb->preds+1))[1] $21 = 5)> """ import os.path