From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf1-x429.google.com (mail-pf1-x429.google.com [IPv6:2607:f8b0:4864:20::429]) by sourceware.org (Postfix) with ESMTPS id 11EFA3858C36 for ; Thu, 27 Oct 2022 23:02:11 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 11EFA3858C36 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-pf1-x429.google.com with SMTP id e4so3254675pfl.2 for ; Thu, 27 Oct 2022 16:02:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=9AUiU0yEMNcllIL4iEE4sjTK6gTpBqEkO7bnktE6etU=; b=RmFTg08nkpcWQ0KP73VvRFyKpVKiYRj+ycQGyU2bFeAItvAmqkhKDMjjpJdPMpLOVG gzkttsCFu4Wq56hXX/HWXEH5wuehgkrj46CW0PXlhPaYvekvQozHtC/HhLpyk45pl0xh BDDI6ghpRtzeNYxgGBJ6j7jaGdBTIoXYkFeOdAbCkAPlnZ7MLIJFTlQ0pFwNKxeIG1pL OKX6LuHVIS8xYEJR4dd5fwjampu0utlqCW3NiQAU5uUnFXFGBqFel88RXYliyivKZGHh G8vG1OE2TbxohG7tS7AraAzTEIVjwlU5InqJJp2XxyEd6RDx7+hB+J+ibgAHOJjCz3Ud imuA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=9AUiU0yEMNcllIL4iEE4sjTK6gTpBqEkO7bnktE6etU=; b=gzl1jz6dMWsF1t1Y8hhttQAWFJdHc3KEH3r4WLUfQElgL3k5+DvjTVD/6VM9mnHlAo pFuToCR06b++jkdTdzB5L3x6Jzn+IhkQUjaOuyI3jRNMH3Q/r8O9f0UKoNNjw1+3kOQ+ 92FC2Uqviwd/wMp0Rf9oPNVww12cNwuBD4OS5bqnJnIs8NoyOrYniTlNQVcFq3MEQJ40 /ooYvnxVbqlNMsyj9bVCjmBI/qWnpkv+mBwU47NLHqckztArOZVbQbwVZLULduuThH+3 pqQiHNXt0VFX3A16Ur029AbHHJVerCQw3aTaE2KrZMIBpG3mAV8db+aSKPJH1qjyGdkt klUA== X-Gm-Message-State: ACrzQf2Ga9aDJbyQo5fR62sm1MzYdk/2fKr28EDLceBn4FXm/cNIj4MK vtf/Kw/oiGg6QpNR1UfZGYUlJFA9Q3U= X-Google-Smtp-Source: AMsMyM6lMouzPzfgJHNRTOVuQDZIHA+G4n81UkG4RcBX57WrGuNeMGnDgjfN5+TbSrQ7eqihpG9Hbg== X-Received: by 2002:a05:6a00:1991:b0:565:9912:cbf7 with SMTP id d17-20020a056a00199100b005659912cbf7mr52322329pfl.59.1666911729941; Thu, 27 Oct 2022 16:02:09 -0700 (PDT) Received: from ?IPV6:2601:681:8600:13d0::f0a? ([2601:681:8600:13d0::f0a]) by smtp.gmail.com with ESMTPSA id j10-20020a170902da8a00b00186a8085382sm1758581plx.43.2022.10.27.16.02.09 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 27 Oct 2022 16:02:09 -0700 (PDT) Message-ID: <3c50de1f-c00b-9f8a-a604-a71bc546f1c2@gmail.com> Date: Thu, 27 Oct 2022 17:02:08 -0600 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.3.1 Subject: Re: [PATCH 1/2] ivopts: Revert computation of address cost complexity. Content-Language: en-US To: Dimitrije Milosevic , gcc-patches@gcc.gnu.org Cc: djordje.todorovic@syrmia.com References: <20221021135203.626255-1-dimitrije.milosevic@syrmia.com> <20221021135203.626255-2-dimitrije.milosevic@syrmia.com> From: Jeff Law In-Reply-To: <20221021135203.626255-2-dimitrije.milosevic@syrmia.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,NICE_REPLY_A,RCVD_IN_DNSWL_NONE,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 List-Id: On 10/21/22 07:52, Dimitrije Milosevic wrote: > From: Dimitrije Milošević > > This patch reverts the computation of address cost complexity > to the legacy one. After f9f69dd, complexity is calculated > using the valid_mem_ref_p target hook. Architectures like > Mips only allow BASE + OFFSET addressing modes, which in turn > prevents the calculation of complexity for other addressing > modes, resulting in non-optimal candidate selection. > > gcc/ChangeLog: > > * tree-ssa-address.cc (multiplier_allowed_in_address_p): Change > to non-static. > * tree-ssa-address.h (multiplier_allowed_in_address_p): Declare. > * tree-ssa-loop-ivopts.cc (compute_symbol_and_var_present): Reintroduce. > (compute_min_and_max_offset): Likewise. > (get_address_cost): Revert > complexity calculation. THe part I don't understand is, if you only have BASE+OFF, why does preventing the calculation of more complex addressing modes matter?  ie, what's the point of computing the cost of something like base + off + scaled index when the target can't utilize it? jeff