[llvm-dev] RFC: Killing undef and spreading poison

Michael Kuperstein via llvm-dev llvm-dev at lists.llvm.org
Tue Oct 25 15:27:25 PDT 2016


Just a reminder - neither rsp nor rbp are actually guaranteed to stay
constant.
E.g. with -fomit-frame-pointer on 32-bit, both are decidedly non-constant
(ebp because of FP omission, esp because it moves back and forth around
call sites.)

On Tue, Oct 25, 2016 at 3:12 PM, Nuno Lopes via llvm-dev <
llvm-dev at lists.llvm.org> wrote:

> On Tue, Oct 25, 2016 at 10:44 AM, Daniel Berlin via llvm-dev <
>> llvm-dev at lists.llvm.org> wrote:
>>
>>> Easier is a relative term.
>>> I expect optimally choosing  which freezes to eliminate where, etc,
>>> reduces to a covering problem variant (or just straight ILP) :)
>>>
>>
>>
>> I think it's fine for GVN to fold them all to the same thing. The only
>> difference between freeze(poison) and zero is that you can use a
>> pre-existing register like RBP or RSP that says constant across the
>> lifetime of the function so you don't need to materialize a zero if you
>> don't have one already.
>>
>
> That's clever! :)
> In our prototype we do the naive thing: reserve an arbitrary register for
> each freeze (without materializing anything). Your solution neatly reduces
> register pressure.
> Nuno
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20161025/9dcd222b/attachment.html>


More information about the llvm-dev mailing list