From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pj1-x1032.google.com (mail-pj1-x1032.google.com [IPv6:2607:f8b0:4864:20::1032]) by sourceware.org (Postfix) with ESMTPS id 13EE23899019 for ; Tue, 15 Nov 2022 16:33:15 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 13EE23899019 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-pj1-x1032.google.com with SMTP id b11so13800118pjp.2 for ; Tue, 15 Nov 2022 08:33:15 -0800 (PST) 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=X4ufpbVR73Z4ZlDBcFqPBWif+6m0TwJ8KNJjjmjf5gQ=; b=Crsln32+TqrawwrOiMsaU8L1JdR2KTIwFbNIryyf+/v1qKfOIKikV1AzP4d1PhSq0l kRx7JSjr+3OzDhMF6BZZ9K+wjm6y6grGmF3ZJTMETeIPjjLG/G+fa66GILIuI6RganhP nKpgcRy9P2yfC4tejliNuRMrhFNfMsh5ca1D/yuFob8RfLS+xbRkdSnMfuETW0RmVe0/ NFyCYSmlmUwQyvHqyN5gIR2WSEf7LAV1nANOkzb9BsKzQU0srwk5YDgPEeji5uRtsQpp rFNiVuBnNsYr0ASK+9X+fQjb/p0MTwrVOuVxP2Ks+SvqRZmFhOzfoJcm4FsL/8cy/AWv 7d0g== 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=X4ufpbVR73Z4ZlDBcFqPBWif+6m0TwJ8KNJjjmjf5gQ=; b=TfSH33y4c99FZG8s8YW5vfAtRHIo1aVUwnOzYhM23fENrPn74f8I29+Zzfq7hZz3j/ tzl9IiKsczXzWea1hWBF1ybUHhgBf35Ppc15H93FpvhN2sOoC8OOhNJ8EjPCkGVnscef lL2grGPjMlXbYkIs74UFvwTusWCPELJnm/XIjlItRBtZfPjEROdjUq/neRfvyJg4tP69 7dAHc/LngHPRowO3eFQizcSGXP9/6I+nNYBxopZDHf7f59wZeWfXgGLTE+mP0py+9Jnd H0zYr6Xmq7qwzp0v2l2Luj8d+UzMFAwh7VgYYqMuC80g009SwjZ+zE29VIMmEw8VmDtu BpDQ== X-Gm-Message-State: ANoB5plUIsqSLwwjOdqs3nmaLsJO/xg5JOPRN4tACD5txXfV5SaWp4Sh OF3gEAFgfs+/UBPVZefWANc= X-Google-Smtp-Source: AA0mqf7R12wpZ0cPFOMEZHfmXDU7c7LH9Ledzcc89Ds33xet63rIw0c7BC4vNjRs7cAkuX7Eq70Unw== X-Received: by 2002:a17:902:6b09:b0:188:52df:769e with SMTP id o9-20020a1709026b0900b0018852df769emr4886108plk.30.1668529993887; Tue, 15 Nov 2022 08:33:13 -0800 (PST) Received: from ?IPV6:2601:681:8600:13d0::f0a? ([2601:681:8600:13d0::f0a]) by smtp.gmail.com with ESMTPSA id q18-20020a17090311d200b0017a0f40fa19sm4255709plh.191.2022.11.15.08.33.12 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 15 Nov 2022 08:33:13 -0800 (PST) Message-ID: <2794ca17-a334-7d4e-225f-1b1754578638@gmail.com> Date: Tue, 15 Nov 2022 09:33:11 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.3.1 Subject: Re: [RFC PATCH] ipa-guarded-deref: Add new pass to dereference function pointers Content-Language: en-US To: =?UTF-8?Q?Christoph_M=c3=bcllner?= , Richard Biener Cc: gcc-patches@gcc.gnu.org, Manolis Tsamis , Martin Jambor , Jan Hubicka , Philipp Tomsich References: <20221113150912.1292332-1-christoph.muellner@vrull.eu> From: Jeff Law In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.5 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 11/14/22 08:38, Christoph Müllner wrote: > > Ok, I will add the check. > > Still, I don't think that the optimization changes the behavior in the > case of different ABIs > (i.e. the situation is problematic regardless if there is an indirect call > or a guarded direct call). > What could be done additionally to dropping the candidate is to emit a > warning (similar like ipa-devirt does for ODR violations). The one target I'm aware of where this is most likely to cause problems would be the older 32bit PA SOM ABI.  It has the property that the ABI uses different registers for parameter passing for direct vs indirect calls.  But with all this happening before RTL generation we should be fine, even for that ABI (and its generally safe in that ABI to change an indirect to a direct call, but not vice-versa). Jeff