[llvm] r320814 - [InlineCost] Find repeated loads in the callee

Philip Reames via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 18 19:39:14 PST 2017


FYI, the same problem applies for any ordered atomic.

On 12/18/2017 04:09 PM, Haicheng Wu via llvm-commits wrote:
> I am working on it now.
>
> Haicheng
>
> -----Original Message-----
> From: Tobias Edler von Koch [mailto:tobias at codeaurora.org]
> Sent: Monday, December 18, 2017 5:53 PM
> To: Haicheng Wu <haicheng at codeaurora.org>; llvm-commits at lists.llvm.org
> Subject: Re: [llvm] r320814 - [InlineCost] Find repeated loads in the callee
>
> Hi Haicheng,
>
> This should not kick in for volatile loads. Repeat volatile loads of the same address are obviously not free. This broke an internal lit test for us. Would you mind fixing this in a follow-up?
>
> Thanks,
> Tobias
>
> On 12/15/2017 08:34 AM, Haicheng Wu via llvm-commits wrote:
>> Author: haicheng
>> Date: Fri Dec 15 06:34:41 2017
>> New Revision: 320814
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=320814&view=rev
>> Log:
>> [InlineCost] Find repeated loads in the callee
>>
>> SROA analysis of InlineCost can figure out that some stores can be
>> removed after inlining and then the repeated loads clobbered by these
>> stores are also free.  This patch finds these clobbered loads and
>> adjust the inline cost accordingly.
>>
>> Differential Revision: https://reviews.llvm.org/D33946
>>
>> Added:
>>       llvm/trunk/test/Transforms/Inline/redundant-loads.ll
>> Modified:
>>       llvm/trunk/include/llvm/Analysis/ValueTracking.h
>>       llvm/trunk/lib/Analysis/InlineCost.cpp
>>       llvm/trunk/lib/Analysis/ValueTracking.cpp
>>
> --
> Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project.
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits




More information about the llvm-commits mailing list