From patchwork Wed Sep 11 11:42:08 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Jambor X-Patchwork-Id: 1983906 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.cz header.i=@suse.cz header.a=rsa-sha256 header.s=susede2_rsa header.b=qYr10NJ6; dkim=pass header.d=suse.cz header.i=@suse.cz header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=+zJbbxZF; dkim=pass (1024-bit key) header.d=suse.cz header.i=@suse.cz header.a=rsa-sha256 header.s=susede2_rsa header.b=qYr10NJ6; dkim=neutral header.d=suse.cz header.i=@suse.cz header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=+zJbbxZF; 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 4X3dwS69k9z1y1C for ; Wed, 11 Sep 2024 21:42:32 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 1207E3857C4F for ; Wed, 11 Sep 2024 11:42:31 +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 ABAEB3858C3A for ; Wed, 11 Sep 2024 11:42:12 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org ABAEB3858C3A Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=suse.cz Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=suse.cz ARC-Filter: OpenARC Filter v1.0.0 sourceware.org ABAEB3858C3A 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=1726054934; cv=none; b=epmkYp4qm+5/T2/S8h5YImM8/bji69sw8XEPUOgQUaUKyZnqfYrUvWCNTkYK8iljQREs72o9FW3CiauOREWkaFEYDaOTc5xMXBj8Iw930IyFOyVW4Z6zLYjnSFK++KA7By4IAl/DcnH7VI5duXCG7vr5o/fqSXKytyMYcEcpoU4= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1726054934; c=relaxed/simple; bh=pp1dKn35eM0ftW9jw/GXOy2Fd4yohzNJLwM9XoveW+M=; h=DKIM-Signature:DKIM-Signature:DKIM-Signature:DKIM-Signature:From: To:Subject:Date:Message-ID:MIME-Version; b=coe14iOvZhuX5DWIO8CWx6p88tkAiORgYxDGJpvWXr7wC8vv6wRvQmp3O84cdUfG4Y2IkkqGk6N/Ibqqz3IO7rOgJlZplZSMCHk/Gdc4gKQEghe96/ojQC20ECPbMKUA++hZrXSug6xUP5tiEXQJDmxdBmq02iH4kEq+2lNi1TA= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [IPv6:2a07:de40:b281:104:10:150:64: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 smtp-out1.suse.de (Postfix) with ESMTPS id 9DF7621A98 for ; Wed, 11 Sep 2024 11:42:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1726054931; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version:content-type:content-type; bh=5ui83R+Q0xmyW6cO3KUK6n0xunmjPJ+YXIJOuNx83Yg=; b=qYr10NJ6LHve1PY1jC39K3hJYgg0poq/t4rYqGT94DbSTwVegIfOpfaDMClC9S/J+Stvup Iad2IO7vJY3DW3rm35usGjg23kBDtkG1FDHgCFBSYrt0a3wS3S7YmlLvl7Mn4mkfSSWzlz kLlnhZWM/KgnnvvuFDBZ9Ub/+m3pcdk= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1726054931; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version:content-type:content-type; bh=5ui83R+Q0xmyW6cO3KUK6n0xunmjPJ+YXIJOuNx83Yg=; b=+zJbbxZFC2d3Saydyb8XDmLbFNtKHlyuxnhwh2I4c0aSF1YXPsacAkou1mJBc/ycnC1S0X /FpJ5Lw8otQ674DA== Authentication-Results: smtp-out1.suse.de; dkim=pass header.d=suse.cz header.s=susede2_rsa header.b=qYr10NJ6; dkim=pass header.d=suse.cz header.s=susede2_ed25519 header.b=+zJbbxZF DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1726054931; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version:content-type:content-type; bh=5ui83R+Q0xmyW6cO3KUK6n0xunmjPJ+YXIJOuNx83Yg=; b=qYr10NJ6LHve1PY1jC39K3hJYgg0poq/t4rYqGT94DbSTwVegIfOpfaDMClC9S/J+Stvup Iad2IO7vJY3DW3rm35usGjg23kBDtkG1FDHgCFBSYrt0a3wS3S7YmlLvl7Mn4mkfSSWzlz kLlnhZWM/KgnnvvuFDBZ9Ub/+m3pcdk= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1726054931; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version:content-type:content-type; bh=5ui83R+Q0xmyW6cO3KUK6n0xunmjPJ+YXIJOuNx83Yg=; b=+zJbbxZFC2d3Saydyb8XDmLbFNtKHlyuxnhwh2I4c0aSF1YXPsacAkou1mJBc/ycnC1S0X /FpJ5Lw8otQ674DA== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (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 imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 7AE1013A7C for ; Wed, 11 Sep 2024 11:42:11 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id 8PA1CxOC4WbLHgAAD6G6ig (envelope-from ) for ; Wed, 11 Sep 2024 11:42:11 +0000 From: Martin Jambor To: GCC Patches Subject: [PATCH 1/2] ipa: Rename ipa_supports_p to ipa_vr_supported_type_p User-Agent: Notmuch/0.38.3 (https://notmuchmail.org) Emacs/29.4 (x86_64-suse-linux-gnu) Date: Wed, 11 Sep 2024 13:42:08 +0200 Message-ID: MIME-Version: 1.0 X-Rspamd-Queue-Id: 9DF7621A98 X-Spam-Score: -4.51 X-Rspamd-Action: no action X-Spamd-Result: default: False [-4.51 / 50.00]; BAYES_HAM(-3.00)[100.00%]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.20)[-1.000]; R_DKIM_ALLOW(-0.20)[suse.cz:s=susede2_rsa,suse.cz:s=susede2_ed25519]; MIME_GOOD(-0.10)[text/plain]; MX_GOOD(-0.01)[]; RECEIVED_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b281:106:10:150:64:167:received]; FUZZY_BLOCKED(0.00)[rspamd.com]; RCVD_VIA_SMTP_AUTH(0.00)[]; ARC_NA(0.00)[]; RBL_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b281:104:10:150:64:97:from]; MIME_TRACE(0.00)[0:+]; RCPT_COUNT_ONE(0.00)[1]; MID_RHS_MATCH_FROMTLD(0.00)[]; RCVD_TLS_ALL(0.00)[]; DKIM_SIGNED(0.00)[suse.cz:s=susede2_rsa,suse.cz:s=susede2_ed25519]; RCVD_COUNT_TWO(0.00)[2]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; SPAMHAUS_XBL(0.00)[2a07:de40:b281:104:10:150:64:97:from]; DBL_BLOCKED_OPENRESOLVER(0.00)[suse.cz:email,suse.cz:dkim]; PREVIOUSLY_DELIVERED(0.00)[gcc-patches@gcc.gnu.org]; TO_MATCH_ENVRCPT_ALL(0.00)[]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[suse.cz:+] X-Rspamd-Server: rspamd1.dmz-prg2.suse.org X-Spam-Level: X-Spam-Status: No, score=-11.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, 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 Hi, ipa_supports_p is not a name that captures well what the predicate determines. Therefore, this patch renames it to ipa_vr_supported_type_p. This change has been pre-approved by Honza and has passed bootstrap and test-suite on x86_64 and so I will push it to master later today. Thanks, Martin gcc/ChangeLog: 2024-09-06 Martin Jambor * ipa-cp.h (ipa_supports_p): Rename to ipa_vr_supported_type_p. * ipa-cp.cc (ipa_vr_operation_and_type_effects): Adjust called function name. (propagate_vr_across_jump_function): Likewise. * ipa-prop.cc (ipa_compute_jump_functions_for_edge): Likewise. (ipcp_get_parm_bits): Likewise. --- gcc/ipa-cp.cc | 5 +++-- gcc/ipa-cp.h | 2 +- gcc/ipa-prop.cc | 6 +++--- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/gcc/ipa-cp.cc b/gcc/ipa-cp.cc index 56468dc40ee..a1033b81aef 100644 --- a/gcc/ipa-cp.cc +++ b/gcc/ipa-cp.cc @@ -1649,7 +1649,8 @@ ipa_vr_operation_and_type_effects (vrange &dst_vr, enum tree_code operation, tree dst_type, tree src_type) { - if (!ipa_supports_p (dst_type) || !ipa_supports_p (src_type)) + if (!ipa_vr_supported_type_p (dst_type) + || !ipa_vr_supported_type_p (src_type)) return false; range_op_handler handler (operation); @@ -2553,7 +2554,7 @@ propagate_vr_across_jump_function (cgraph_edge *cs, ipa_jump_func *jfunc, ipa_range_set_and_normalize (op_vr, op); if (!handler - || !ipa_supports_p (operand_type) + || !ipa_vr_supported_type_p (operand_type) /* Sometimes we try to fold comparison operators using a pointer type to hold the result instead of a boolean type. Avoid trapping in the sanity check in diff --git a/gcc/ipa-cp.h b/gcc/ipa-cp.h index 4616c61625a..ba2ebfede63 100644 --- a/gcc/ipa-cp.h +++ b/gcc/ipa-cp.h @@ -294,7 +294,7 @@ bool values_equal_for_ipcp_p (tree x, tree y); /* Return TRUE if IPA supports ranges of TYPE. */ static inline bool -ipa_supports_p (tree type) +ipa_vr_supported_type_p (tree type) { return irange::supports_p (type) || prange::supports_p (type); } diff --git a/gcc/ipa-prop.cc b/gcc/ipa-prop.cc index 99ebd6229ec..78d1fb7086d 100644 --- a/gcc/ipa-prop.cc +++ b/gcc/ipa-prop.cc @@ -2392,8 +2392,8 @@ ipa_compute_jump_functions_for_edge (struct ipa_func_body_info *fbi, else { if (param_type - && ipa_supports_p (TREE_TYPE (arg)) - && ipa_supports_p (param_type) + && ipa_vr_supported_type_p (TREE_TYPE (arg)) + && ipa_vr_supported_type_p (param_type) && get_range_query (cfun)->range_of_expr (vr, arg, cs->call_stmt) && !vr.undefined_p ()) { @@ -5761,7 +5761,7 @@ ipcp_get_parm_bits (tree parm, tree *value, widest_int *mask) ipcp_transformation *ts = ipcp_get_transformation_summary (cnode); if (!ts || vec_safe_length (ts->m_vr) == 0 - || !ipa_supports_p (TREE_TYPE (parm))) + || !ipa_vr_supported_type_p (TREE_TYPE (parm))) return false; int i = ts->get_param_index (current_function_decl, parm);