[llvm-dev] Request suggestions about how to remove redundencies caused by SCEV expansion fundementally

Andrew Trick via llvm-dev llvm-dev at lists.llvm.org
Wed Aug 24 10:32:37 PDT 2016


> On Aug 24, 2016, at 10:27 AM, Wei Mi <wmi at google.com> wrote:
> 
>> SCEV is super useful as an analysis without SCEVExpander. The only real issue with SCEV itself is invalidating the expressions.
>> 
>> I’ve always thought SCEVExpander is very dangerous to use directly. Ideally the SCEV expression should always be reformulated based on existing IR values before expanding. It would be nice if that was provided as a layer of functionality on top of SCEVExpander.
>> 
>> -Andy
>> 
> 
> Yes, it makes me think that the original idea in D12090 to try to
> reuse the existing value directly may not be the right way to solve
> the problem fundamentally. Reformulating SCEV to make it more
> consistent with cannonical IR form is more promising. If only the IR
> expanded is cannonical compared with existing IR, cleanup pass can
> have big chance to catch the reuse.

I was thinking that the SCEV expression should be reformulated in terms of opaque nodes for existing IR values before expansion.

-Andy
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160824/2e548133/attachment.html>


More information about the llvm-dev mailing list