From patchwork Tue Apr 9 11:49:59 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Biener X-Patchwork-Id: 1921364 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=suse.de header.i=@suse.de header.a=rsa-sha256 header.s=susede2_rsa header.b=P2rS9Ec3; dkim=pass header.d=suse.de header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=M1xJLX/z; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.a=rsa-sha256 header.s=susede2_rsa header.b=P2rS9Ec3; dkim=neutral header.d=suse.de header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=M1xJLX/z; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=8.43.85.97; helo=server2.sourceware.org; envelope-from=gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=patchwork.ozlabs.org) Received: from server2.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 ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4VDPR3756Lz1yZg for ; Tue, 9 Apr 2024 21:50:23 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 154FE3864830 for ; Tue, 9 Apr 2024 11:50:22 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130]) by sourceware.org (Postfix) with ESMTPS id 40EFD3858C39 for ; Tue, 9 Apr 2024 11:50:00 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 40EFD3858C39 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=suse.de ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 40EFD3858C39 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=195.135.223.130 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1712663402; cv=none; b=j4JjayXy9XmpFj7vm7v7qwhrLjtK1VL6TsD0qIDGK1JLZUBjbX8t+ITFw5gcX6PuYDw0Dy/wEu9h8bz4CWXyDu7vvVtfX6xmzrL4ERRMgVTxm2F7aoy8fzMrHnP/KmhltqbEHwGwgOP7qlW50rI9NTdkmkKuvIHCnl0xxrglZoc= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1712663402; c=relaxed/simple; bh=bKUTjduPREIQYcrzBSZVZ4FhOW3sXjw367HbDtxZKyQ=; h=DKIM-Signature:DKIM-Signature:DKIM-Signature:DKIM-Signature:Date: From:To:Subject:MIME-Version; b=vfbBCPEWBCNijQUgINocmu9pLDO/hbyxgxXFFRY4lX79gm83C0Q434veAifzBd31l4Rds4/tkj21RG6tqXqSkI/AhwsFxOgyg0c2M96EC0sOC/P4Qdeq1kVDWou4WwIZV49I0n2SOXRvm5GiyHH1tV2VtTQyeimMU+8ybbLyjyo= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from [10.168.5.241] (unknown [10.168.5.241]) (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 smtp-out1.suse.de (Postfix) with ESMTPS id 43F0133983 for ; Tue, 9 Apr 2024 11:49:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1712663399; h=from:from:reply-to:date:date:to:to:cc:mime-version:mime-version: content-type:content-type; bh=vQdS6rycvDrC1tXQfcN0zZJM5+ygPlI71xv/qKkZ96A=; b=P2rS9Ec3TRq55YYhyOGT7E/4dTSjqTS/RY1tzct/0pvvuR+Pj9MrduZqUJtM+t2Md9lhzN 6RHM0a21AqGMKa/hT8oncGyajcDCeW5Km4c3B2VEMGf9yXjtOIz9SiWj+4bQ6xdF3FWt1q cW5rsRhBFMs8yIPksVKkaIp3tZcmVyI= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1712663399; h=from:from:reply-to:date:date:to:to:cc:mime-version:mime-version: content-type:content-type; bh=vQdS6rycvDrC1tXQfcN0zZJM5+ygPlI71xv/qKkZ96A=; b=M1xJLX/zqpJqRZ2r7kYC67GZl0Js1eSkYyP+Xh20EjTuuyYahAAuckoy1zOo5Pa0otA5/G um0IERqLr6W6cgAg== Authentication-Results: smtp-out1.suse.de; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1712663399; h=from:from:reply-to:date:date:to:to:cc:mime-version:mime-version: content-type:content-type; bh=vQdS6rycvDrC1tXQfcN0zZJM5+ygPlI71xv/qKkZ96A=; b=P2rS9Ec3TRq55YYhyOGT7E/4dTSjqTS/RY1tzct/0pvvuR+Pj9MrduZqUJtM+t2Md9lhzN 6RHM0a21AqGMKa/hT8oncGyajcDCeW5Km4c3B2VEMGf9yXjtOIz9SiWj+4bQ6xdF3FWt1q cW5rsRhBFMs8yIPksVKkaIp3tZcmVyI= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1712663399; h=from:from:reply-to:date:date:to:to:cc:mime-version:mime-version: content-type:content-type; bh=vQdS6rycvDrC1tXQfcN0zZJM5+ygPlI71xv/qKkZ96A=; b=M1xJLX/zqpJqRZ2r7kYC67GZl0Js1eSkYyP+Xh20EjTuuyYahAAuckoy1zOo5Pa0otA5/G um0IERqLr6W6cgAg== Date: Tue, 9 Apr 2024 13:49:59 +0200 (CEST) From: Richard Biener To: gcc-patches@gcc.gnu.org Subject: [PATCH] Remove live-info global bitmap MIME-Version: 1.0 X-Spam-Score: -1.72 X-Spam-Level: X-Spamd-Result: default: False [-1.72 / 50.00]; BAYES_HAM(-3.00)[100.00%]; MISSING_MID(2.50)[]; NEURAL_HAM_LONG(-0.95)[-0.949]; NEURAL_HAM_SHORT(-0.17)[-0.865]; MIME_GOOD(-0.10)[text/plain]; RCPT_COUNT_ONE(0.00)[1]; RCVD_COUNT_ZERO(0.00)[0]; ARC_NA(0.00)[]; MISSING_XM_UA(0.00)[]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; FUZZY_BLOCKED(0.00)[rspamd.com]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; TO_DN_NONE(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; FROM_HAS_DN(0.00)[] X-Spam-Status: No, score=-10.5 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, MISSING_MID, SPF_HELO_NONE, 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 X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org Message-Id: <20240409115022.154FE3864830@sourceware.org> The following removes the unused tree_live_info_d->global bitmap. Bootstrapped and tested on x86_64-unknown-linux-gnu, queued for stage1. Richard. * tree-ssa-live.h (tree_live_info_d::global): Remove. (partition_is_global): Likewise. (make_live_on_entry): Do not set bit in global. * tree-ssa-live.cc (new_tree_live_info): Do not allocate global bitmap. (delete_tree_live_info): Do not release it. (set_var_live_on_entry): Do not set bits in it. --- gcc/tree-ssa-live.cc | 13 +------------ gcc/tree-ssa-live.h | 13 ------------- 2 files changed, 1 insertion(+), 25 deletions(-) diff --git a/gcc/tree-ssa-live.cc b/gcc/tree-ssa-live.cc index d94e94eb3bc..fa6be2fced3 100644 --- a/gcc/tree-ssa-live.cc +++ b/gcc/tree-ssa-live.cc @@ -1015,7 +1015,6 @@ new_tree_live_info (var_map map) live->work_stack = XNEWVEC (int, last_basic_block_for_fn (cfun)); live->stack_top = live->work_stack; - live->global = BITMAP_ALLOC (NULL); return live; } @@ -1035,7 +1034,6 @@ delete_tree_live_info (tree_live_info_p live) bitmap_obstack_release (&live->liveout_obstack); free (live->liveout); } - BITMAP_FREE (live->global); free (live->work_stack); free (live); } @@ -1123,7 +1121,6 @@ set_var_live_on_entry (tree ssa_name, tree_live_info_p live) use_operand_p use; basic_block def_bb = NULL; imm_use_iterator imm_iter; - bool global = false; p = var_to_partition (live->map, ssa_name); if (p == NO_PARTITION) @@ -1173,16 +1170,8 @@ set_var_live_on_entry (tree ssa_name, tree_live_info_p live) /* If there was a live on entry use, set the bit. */ if (add_block) - { - global = true; - bitmap_set_bit (&live->livein[add_block->index], p); - } + bitmap_set_bit (&live->livein[add_block->index], p); } - - /* If SSA_NAME is live on entry to at least one block, fill in all the live - on entry blocks between the def and all the uses. */ - if (global) - bitmap_set_bit (live->global, p); } diff --git a/gcc/tree-ssa-live.h b/gcc/tree-ssa-live.h index e86ce0c1768..ac39091f5d2 100644 --- a/gcc/tree-ssa-live.h +++ b/gcc/tree-ssa-live.h @@ -237,9 +237,6 @@ typedef struct tree_live_info_d /* Var map this relates to. */ var_map map; - /* Bitmap indicating which partitions are global. */ - bitmap global; - /* Bitmaps of live on entry blocks for partition elements. */ bitmap_head *livein; @@ -276,15 +273,6 @@ extern bitmap live_vars_at_stmt (vec &, live_vars_map *, gimple *); extern void destroy_live_vars (vec &); -/* Return TRUE if P is marked as a global in LIVE. */ - -inline int -partition_is_global (tree_live_info_p live, int p) -{ - gcc_checking_assert (live->global); - return bitmap_bit_p (live->global, p); -} - /* Return the bitmap from LIVE representing the live on entry blocks for partition P. */ @@ -329,7 +317,6 @@ inline void make_live_on_entry (tree_live_info_p live, basic_block bb , int p) { bitmap_set_bit (&live->livein[bb->index], p); - bitmap_set_bit (live->global, p); }