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

Tobias Edler von Koch via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 18 14:53:10 PST 2017

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?


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.

More information about the llvm-commits mailing list