From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 889843857711; Wed, 9 Aug 2023 06:17:21 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 889843857711 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1691561841; bh=s+4J5Wd9EkDEKeOyNVnqObmZUA7ShNew+tLP/ozBAXY=; h=From:To:Subject:Date:In-Reply-To:References:From; b=jbp73rX2sdY5cXkmFXi6vR1uGUmGFkY87im5KdB3h1OuSNPSjE2WkjBcXf5eQx5zW OcYEpUN4MWDMHnWaHRiO71G2n+ngX6mlZxJ7s3y895DupRvOV5913wg9cyjLcaEkwE HmA1ua3QlkWV8TR3VyCN45qlpN2ekdotnTROa/IY= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/110248] ivopts could under-cost for some addressing modes on len_{load,store} Date: Wed, 09 Aug 2023 06:17:21 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: tree-optimization X-Bugzilla-Version: 14.0 X-Bugzilla-Keywords: missed-optimization X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D110248 --- Comment #9 from CVS Commits --- The master branch has been updated by Kewen Lin : https://gcc.gnu.org/g:4a8e6fa8016f8daf184dec49f371ca71b1cb0f01 commit r14-3093-g4a8e6fa8016f8daf184dec49f371ca71b1cb0f01 Author: Kewen Lin Date: Wed Aug 9 00:41:52 2023 -0500 ivopts: Call valid_mem_ref_p with ifn [PR110248] As PR110248 shows, to get the expected query results for that internal functions LEN_{LOAD,STORE} is able to adopt some addressing modes, we need to pass down the related IFN code as well. This patch is to make IVOPTs pass down ifn code for USE_PTR_ADDRESS type uses, it adjusts the related functions {strict_,}memory_address_addr_space_p, and valid_mem_ref_p as well. PR tree-optimization/110248 gcc/ChangeLog: * recog.cc (memory_address_addr_space_p): Add one more argument= ch of type code_helper and pass it to targetm.addr_space.legitimate_address_p instead of ERROR_MARK. (offsettable_address_addr_space_p): Update one function pointer with one more argument of type code_helper as its assignees memory_address_addr_space_p and strict_memory_address_addr_spac= e_p have been adjusted, and adjust some call sites with ERROR_MARK. * recog.h (tree.h): New include header file for tree_code ERROR_MARK. (memory_address_addr_space_p): Adjust with one more unnamed argument of type code_helper with default ERROR_MARK. (strict_memory_address_addr_space_p): Likewise. * reload.cc (strict_memory_address_addr_space_p): Add one unnam= ed argument of type code_helper. * tree-ssa-address.cc (valid_mem_ref_p): Add one more argument = ch of type code_helper and pass it to memory_address_addr_space_p. * tree-ssa-address.h (valid_mem_ref_p): Adjust the declaration = with one more unnamed argument of type code_helper with default value ERROR_MARK. * tree-ssa-loop-ivopts.cc (get_address_cost): Use ERROR_MARK as code by default, change it with ifn code for USE_PTR_ADDRESS type us= e, and pass it to all valid_mem_ref_p calls.=