Message ID | ri6h6z5kkoy.fsf@suse.cz |
---|---|
State | Accepted |
Headers |
Return-Path: <gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp1063021wru; Fri, 11 Nov 2022 17:51:42 -0800 (PST) X-Google-Smtp-Source: AA0mqf60TMWXZXUj3YuKFNR7mZ++A2rr7wjBto6nQ+xGGmapEriZd4iEee1VcfIco45ak+vnmCe+ X-Received: by 2002:aa7:da1a:0:b0:454:cbef:c161 with SMTP id r26-20020aa7da1a000000b00454cbefc161mr3904648eds.365.1668217902729; Fri, 11 Nov 2022 17:51:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668217902; cv=none; d=google.com; s=arc-20160816; b=M3ScNShxPyJIdhOxDz3EyJnF849V1MIP3mqUz68Wlhnw7xEgzlpHuYYWGpm6zjRxqy XjTJtA7+Ey0zwCLfFVfBJdGjs9jxNcWczmuqyMWgPgUbzG69oRsMTc4JQdoF0tA6POot w18NORCyIAeoo32TOLMHO+WOgXlbTkJWXEaUda5hhfVepkhyA6q53hTdVkIHQ0r2W5WP YYX/FbuRkdnggcoyzU7E/6Z7h4SuhDMhuSqo6i1LI78cFHDMzJS29JODWMRFO6LmTlsY zRtfKIoU+3Y1z+cQkQmEc4M/bIrwU11g6/X8qvBKIxwhFXh7+9wKTAos65kU65gTK9wq JA3g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:mime-version:message-id:date :user-agent:subject:cc:to:from:dkim-signature:dkim-signature :dmarc-filter:delivered-to; bh=O74rV96i+0GTv+a/56rCjiq4422FpChwP+saC/m4dOo=; b=UQTYOSenRRSYkGVIOX1OsN6u7z9I04mE10e+KpzFpGpGfEq9f6D4d1tqDoVxtDbpbl wx26YqrBcF2PruGg06Tq0ZAg44IhguZSOD5Oy99MGYXC/3h84l3dhNoCrLfhGlsv64nv i7taD2ymumjmxN71JfQjKIQEx9iCw9jAtHSyZ3BJeVseAcZhob/zvCEb5rzLS3SqC/dr v0p/bwzo36vgCalJ5bQqGz3n9DN4E88l4B3fOvsqISSsYXYIc9suzgVbm08+kUMXsXJw lhRDVJezxkKMBASkPFtAs7r3UJsWyVn6iLratK9e9gzDfLDuHe5qdwXUt3jcZC/IkbDc 0JBw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=Xcwvj+Ru; dkim=neutral (no key) header.i=@suse.cz; 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" Received: from sourceware.org (server2.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id nd12-20020a170907628c00b007ae127fa284si3764563ejc.371.2022.11.11.17.51.42 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 11 Nov 2022 17:51:42 -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=@suse.cz header.s=susede2_rsa header.b=Xcwvj+Ru; dkim=neutral (no key) header.i=@suse.cz; 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" Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 829FD3954C7F for <ouuuleilei@gmail.com>; Sat, 12 Nov 2022 01:48:23 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from smtp-out2.suse.de (smtp-out2.suse.de [IPv6:2001:67c:2178:6::1d]) by sourceware.org (Postfix) with ESMTPS id 82A4E3899019 for <gcc-patches@gcc.gnu.org>; Sat, 12 Nov 2022 01:47:42 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 82A4E3899019 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=suse.cz Authentication-Results: sourceware.org; spf=fail smtp.mailfrom=suse.cz Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id BD3681F45F; Sat, 12 Nov 2022 01:47:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1668217661; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type; bh=O74rV96i+0GTv+a/56rCjiq4422FpChwP+saC/m4dOo=; b=Xcwvj+RuPb2ZOcSF6PvAdQgLF+DnttHfOvVeg0tzKAbLE5N48Ca1yAQ4SKxTJRiE8ryLjJ xD6Ly8gzsaiMwdi4mk45lAiBKVeAsJxKaCjC0GerEGdhzgUqfoLloWtQb0XyFPRqYdBPeq GXpMjxzKQvBXv5XbQV3GEiOL9/Qv1fw= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1668217661; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type; bh=O74rV96i+0GTv+a/56rCjiq4422FpChwP+saC/m4dOo=; b=KkFUxeJ/COUFSSvEUn8Yl3bvrfr5IGPHSqvTjRSXcXIwF1/N2mQhlFudFnpYI+tBshFCvQ ayPfjRuyalgjNPCA== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id B005413A08; Sat, 12 Nov 2022 01:47:41 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id 1l0KKz37bmPIZAAAMHmgww (envelope-from <mjambor@suse.cz>); Sat, 12 Nov 2022 01:47:41 +0000 From: Martin Jambor <mjambor@suse.cz> To: GCC Patches <gcc-patches@gcc.gnu.org> Cc: Jan Hubicka <jh@suse.cz>, Jan Hubicka <hubicka@ucw.cz> Subject: [PATCH 11/12] ipa-sra: Make scan_expr_access bail out on uninteresting expressions User-Agent: Notmuch/0.37 (https://notmuchmail.org) Emacs/28.1 (x86_64-suse-linux-gnu) Date: Sat, 12 Nov 2022 02:47:41 +0100 Message-ID: <ri6h6z5kkoy.fsf@suse.cz> MIME-Version: 1.0 Content-Type: text/plain 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_SOFTFAIL, 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 <gcc-patches.gcc.gnu.org> List-Unsubscribe: <https://gcc.gnu.org/mailman/options/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=unsubscribe> List-Archive: <https://gcc.gnu.org/pipermail/gcc-patches/> List-Post: <mailto:gcc-patches@gcc.gnu.org> List-Help: <mailto:gcc-patches-request@gcc.gnu.org?subject=help> List-Subscribe: <https://gcc.gnu.org/mailman/listinfo/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=subscribe> Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" <gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org> X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1749253255703171276?= X-GMAIL-MSGID: =?utf-8?q?1749253255703171276?= |
Series |
[01/12] ipa: IPA-SRA split detection simplification
|
|
Checks
Context | Check | Description |
---|---|---|
snail/gcc-patch-check | success | Github commit url |
Commit Message
Martin Jambor
Nov. 12, 2022, 1:47 a.m. UTC
Hi, I have noticed that scan_expr_access passes all the expressions it gets to get_ref_base_and_extent even when we are really only interested in memory accesses. So bail out when the expression is something clearly uninteresting. Bootstrapped and tested on x86_64-linux. OK for master? Thanks, Martin gcc/ChangeLog: 2021-12-14 Martin Jambor <mjambor@suse.cz> * ipa-sra.c (scan_expr_access): Bail out early if expr is something we clearly do not need to pass to get_ref_base_and_extent. --- gcc/ipa-sra.cc | 5 +++++ 1 file changed, 5 insertions(+)
diff --git a/gcc/ipa-sra.cc b/gcc/ipa-sra.cc index 93fceeafc73..3646d71468c 100644 --- a/gcc/ipa-sra.cc +++ b/gcc/ipa-sra.cc @@ -1748,6 +1748,11 @@ scan_expr_access (tree expr, gimple *stmt, isra_scan_context ctx, || TREE_CODE (expr) == REALPART_EXPR) expr = TREE_OPERAND (expr, 0); + if (!handled_component_p (expr) + && !DECL_P (expr) + && TREE_CODE (expr) != MEM_REF) + return; + base = get_ref_base_and_extent (expr, &poffset, &psize, &pmax_size, &reverse); if (TREE_CODE (base) == MEM_REF)