[PATCH] D28742: [InstCombine] Don't DSE across readnone functions that may throw
Daniel Berlin via llvm-commits
llvm-commits at lists.llvm.org
Sun Jan 15 16:07:38 PST 2017
On Sun, Jan 15, 2017 at 12:02 PM, Sanjoy Das <sanjoy at playingwithpointers.com
> wrote:
> Hi,
>
> On Sun, Jan 15, 2017 at 11:46 AM, Daniel Berlin <dberlin at dberlin.org>
> wrote:
> > FWIW: I agree.
> > But i'd go farther.
> > I think at this point, ->hasSideEffects (or ->sideEffects) may just want
> to
> > return a mask, so that the above just becomes
> >
> > ->sideEffects & (MayWrite | MayRead | MayThrow)
> >
> > or whatever nice version we want.
>
> Yes, that's a good idea. I suspect we'll still want to keep things
> like mayRead() and mayThrow(), since it would be tedious to have to
> write
>
> -> sideEffects() & Instruction::MayThrow
>
Sure. I'm mainly concerned with the places we are starting to test like 30
things :)
>
> when we care about just one single thing, but I like the idea.
>
Yup.
>
> I'm not sure about the name though -- generally, most people would not
> say MayRead is a side-effect. I was thinking of something like
> "implicitBehavior()", since this really is an enum of things that an
> instruction can do that are not explicitly specified in SSA / CFG.
>
Yes. I think "side effects" is already way too overloaded :)
> One thing though: let's not stall this set of patches on solving that
> other problem. :)
>
Sure
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170115/248adb48/attachment.html>
More information about the llvm-commits
mailing list