[llvm-dev] sinking in LICM

Friedman, Eli via llvm-dev llvm-dev at lists.llvm.org
Thu Aug 10 11:55:34 PDT 2017


On 8/10/2017 11:34 AM, via llvm-dev wrote:
> Hi,
>
> In the IR below, %tmp.7 and %tmp.8 are not used in loop, so we can 
> sink them in exit blocks. However, LICM do not handle this case 
> because of the check in isNotUsedInLoop() which returns false when a 
> PHI node use is hooked from a block inside the loop. I'm not sure if 
> we really need to have this check even when the PHI is outside the loop?
>
> Is there any problem I'm missing if we convert the above IR to the IR 
> below :
>

I can't see any problem, except that we don't have code to split a loop 
exit like that.

-Eli

-- 
Employee of Qualcomm Innovation Center, Inc.
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project



More information about the llvm-dev mailing list