From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtpbgau2.qq.com (smtpbgau2.qq.com [54.206.34.216]) by sourceware.org (Postfix) with ESMTPS id 652D73858C50 for ; Sat, 3 Feb 2024 10:50:20 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 652D73858C50 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=rivai.ai Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=rivai.ai ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 652D73858C50 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=54.206.34.216 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1706957423; cv=none; b=dnYDye9vSdI3xcZH0JE/DgWpfWOfyLu+HQFI0BWglxXYPzQXZ2pVThzJnIxPvx3R0PO/49ZO+4GFtA4cn9zrZmt5G7UADCGBueBxQ+ibUr4ewpibwf+KL/4FAEY1aR6WDcc2mWQZwSDmnqEN3B+V+E65tKO2P6Hc6phbKgkKhg8= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1706957423; c=relaxed/simple; bh=L9zNsnx/dxaeE3nkE0aeFMw5z4sgLG7xhJOgb58WyUA=; h=From:To:Subject:Date:Message-Id:MIME-Version; b=RJSRujuUNeNH62Kfu86SlCiKB4uYPWMAJHOsVjuBZd9W/C6OAm6nFBrJEtTceHEFI6UIzTp71kPWL+/pcj7OkvFThLAaodfOKSOiOL9Pzcra1Osb3V2xg/L7X7wiGKKJEPmexmiypH34uI4ok0+15PTmask/CZLDZ1RROgwyym0= ARC-Authentication-Results: i=1; server2.sourceware.org X-QQ-mid: bizesmtp72t1706957413tkllo6hm X-QQ-Originating-IP: pAmQq26TZovm/qcZ0x9oIFoRopj/pl/rC5r7SaMXePY= Received: from rios-cad5.localdomain ( [58.60.1.25]) by bizesmtp.qq.com (ESMTP) with id ; Sat, 03 Feb 2024 18:50:12 +0800 (CST) X-QQ-SSF: 01400000000000C0F000000A0000000 X-QQ-FEAT: W+onFc5Tw4OK0Niq8ITNT90MKzWwzFXmCTzzoBC/CAL3V/TFcljUwTw7HiC6V ICkpckNztoQneg9t8uJ8QoRawYBVXpqj/7Dm0i40q6obdDuD7MG1Bf4Et/QgDeMb5g0rR/+ Pd5bRgtVjCIoP6EKeoBTpgajRq4rgzlgU9okGfF39LSXlWOb5bgnFmSPSNVQM2vU4oACY+S kZhz+78fS7Q6C4znNnZS5dRGP5hZnteXSh3w2zVbwUipCM9fMG4NYbMtZ1cqp97p6oq0AkB LGFW3//XygCCSr2iY+/r7Md2trwgLqqvs2J/mSkrJVEQzJAxEyBeNyoN1kAWpHs6ih04Fsh NG3zH1MpSXYOs/fg3b3yscN6Ns6hARk56qfp2lA X-QQ-GoodBg: 2 X-BIZMAIL-ID: 3352344956964685217 From: Lehua Ding To: gcc-patches@gcc.gnu.org Cc: vmakarov@redhat.com, richard.sandiford@arm.com, juzhe.zhong@rivai.ai, lehua.ding@rivai.ai Subject: [PATCH 0/4] Add DF_LIVE_SUBREG data and apply to IRA and LRA Date: Sat, 3 Feb 2024 18:50:08 +0800 Message-Id: <20240203105012.208998-1-lehua.ding@rivai.ai> X-Mailer: git-send-email 2.36.3 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-QQ-SENDSIZE: 520 Feedback-ID: bizesmtp:rivai.ai:qybglogicsvrgz:qybglogicsvrgz5a-3 X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,KAM_DMARC_STATUS,RCVD_IN_BARRACUDACENTRAL,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE,URIBL_CSS_A autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: Hi, These patches are used to add a new data flow DF_LIVE_SUBREG, which will track subreg liveness and then apply it to IRA and LRA passes (enabled via -O3 or -ftrack-subreg-liveness). These patches are for GCC 15. These patches are separated from the subreg-coalesce patches submitted a few months ago. I refactored the code according to comments. The next patches will support subreg coalesce base on they. Here are some data abot build time of SPEC INT 2017 (x86-64 target): baseline baseline(+track-subreg-liveness) specint2017 build time : 1892s 1883s Regarding build times, I've run it a few times, but they all seem to take much less time. Since the difference is small, it's possible that it's just a change in environment. But it's theoretically possible, since supporting subreg-liveness could have reduced the number of living regs. For memory usage, I trided PR 69609 by valgrind, peak memory size grow from 2003910656 to 2003947520, very small increase. For SPEC INT 2017, when using upstream GCC (whitout these patches), I get a coredump when training the peak case, so no data yet. The cause of the core dump still needs to be investigated. No regression on x86-64, AArch64 and RISC-V target. Best, Lehua Lehua Ding (4): df: Add -ftrack-subreg-liveness option df: Add DF_LIVE_SUBREG problem ira: Apply DF_LIVE_SUBREG data lra: Apply DF_LIVE_SUBREG data gcc/Makefile.in | 1 + gcc/common.opt | 4 + gcc/df-problems.cc | 855 ++++++++++++++++++++++++++++++++++++++- gcc/df.h | 155 +++++++ gcc/ira-build.cc | 7 +- gcc/ira-color.cc | 8 +- gcc/ira-emit.cc | 12 +- gcc/ira-lives.cc | 7 +- gcc/ira.cc | 19 +- gcc/lra-coalesce.cc | 27 +- gcc/lra-constraints.cc | 109 ++++- gcc/lra-int.h | 4 + gcc/lra-lives.cc | 355 ++++++++++++---- gcc/lra-remat.cc | 8 +- gcc/lra-spills.cc | 27 +- gcc/lra.cc | 10 +- gcc/opts.cc | 1 + gcc/regs.h | 5 + gcc/sbitmap.cc | 98 +++++ gcc/sbitmap.h | 2 + gcc/subreg-live-range.cc | 53 +++ gcc/subreg-live-range.h | 206 ++++++++++ gcc/timevar.def | 1 + 23 files changed, 1839 insertions(+), 135 deletions(-) create mode 100644 gcc/subreg-live-range.cc create mode 100644 gcc/subreg-live-range.h -- 2.36.3