From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtpbguseast2.qq.com (smtpbguseast2.qq.com [54.204.34.130]) by sourceware.org (Postfix) with ESMTPS id CC2C3385840D for ; Wed, 24 Apr 2024 10:05:08 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org CC2C3385840D 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 CC2C3385840D Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=54.204.34.130 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1713953119; cv=none; b=snRgiXT8/RWiYNCS/DC743+k4ZGPmBColaoiM2jkqbpxm2HPlodq6M4AHyAwPNYa2QEF8c298QjPnPPwUMW/xnD0OCpv04FzfdCDHJrbl0/O/hBFGk9kkl6q41br6LFnQ/Kbk4CGdJ/jFhFXnvdzM8CmEAg21qJXhuYsFhw4nfo= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1713953119; c=relaxed/simple; bh=ESAWINrYVLzfYtSCD3cyITiWhUf1ZW8DfV3p2ulxwJc=; h=From:To:Subject:Date:Message-Id:MIME-Version; b=PQ2LyB+5Vq8hKYcUk8UcOfYRWQ4azpjU03PO6m2XxfZdNZFYAGg2FAYeueVU5e1uwPqrT3MaKnNT0vHCBWrhdkywBT2SbmJwtjrhp9aPc452P/7mHUJn9lhEFpLXSS+hl/ErtbVpUR/W1B9p+NkXgI5h8a+viyErh3nxoVD6vvs= ARC-Authentication-Results: i=1; server2.sourceware.org X-QQ-mid: bizesmtp81t1713953097tif6i268 X-QQ-Originating-IP: riiOZwgFoa6aKYKmaIZEfW5+XVPq0kNYAUHmdaIrq+U= Received: from LAPTOP-VULMBCK0.localdomain ( [113.104.209.113]) by bizesmtp.qq.com (ESMTP) with id ; Wed, 24 Apr 2024 18:04:55 +0800 (CST) X-QQ-SSF: 01400000000000C0F000000A0000000 X-QQ-FEAT: dKvkn8qoLrFvp5k4uiAyZaXzGc7Fupj4Jd5Kz+zku/0ozxB8tinBL7f7Enm8p 7IEcS7JpGhhf5ju/pVar6P2xKhaKzYwGA/Qd6QxkTJNh/g8eRuzx1WjnVgYGrPJuwu32VQs LSDFTMhxZ1I4okcrVeqzTFCcgphLzFeYHGugoaUFViKpS0aTDXlWkz4HYblkYUsX3zqbtOn i2bCfeilMXt/NbrIE2qzwEgk3wi0mH/dY3fxjYHqKWaY2Y3iM9Y/v3UAdCbpV3EcygWDkBN XBGUOtl+iJo5d6x1SslFD2+FSNdVXn7evJ7VmzuLyTECnPepFPBN+2uqOi+kBzvL63OnEQi fIKShpO5d7wG1AmahS7jfntmQSFUSvEcEsPnwrp2y5iZt+CubtxboXHCil52m/ehPnoP6/M YvIhr+cvxWM= X-QQ-GoodBg: 2 X-BIZMAIL-ID: 16597113019696055593 From: Lehua Ding To: gcc-patches@gcc.gnu.org Cc: juzhe.zhong@rivai.ai, shuo.chen@rivai.ai, jin.xia@rivai.ai, vmakarov@redhat.com, richard.sandiford@arm.com Subject: [PATCH V2 0/4] Add DF_LIVE_SUBREG data and apply to IRA and LRA Date: Wed, 24 Apr 2024 18:05:01 +0800 Message-Id: <20240424100505.1301-1-lehua.ding@rivai.ai> X-Mailer: git-send-email 2.25.1 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=-3.9 required=5.0 tests=BAYES_00,KAM_DMARC_STATUS,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS,TXREP,URIBL_BLACK 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 Vladimir and Richard, 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. And these codes are pushed to the devel/subreg-coalesce branch. In addition, my colleague Shuo Chen will also be involved in some of the remain work, thank you for your support. 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. No regression on x86-64 Co-authored-by: Shuo Chen 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/common.opt.urls | 3 + gcc/df-problems.cc | 855 ++++++++++++++++++++++++++++++++++++++- gcc/df.h | 155 +++++++ gcc/doc/invoke.texi | 8 + 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 | 357 ++++++++++++---- 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 + 25 files changed, 1851 insertions(+), 136 deletions(-) create mode 100644 gcc/subreg-live-range.cc create mode 100644 gcc/subreg-live-range.h -- 2.25.1