[llvm-dev] Dereferenceable load semantics & LICM
Daniel Berlin via llvm-dev
llvm-dev at lists.llvm.org
Fri Mar 31 15:45:11 PDT 2017
I have an ebb analysis around that can, in constant time, tell you there
nearest dominating may throw that occurs before a given instruction, if
any.
On Fri, Mar 31, 2017, 11:20 AM Sanjoy Das <sanjoy at playingwithpointers.com>
wrote:
> Hi Piotr,
>
> On March 31, 2017 at 1:07:12 PM, Piotr Padlewski
> (piotr.padlewski at gmail.com) wrote:
> > [snip]
> > Do I understand it correctly, that it is legal to do the hoist because
> all
> > of the instructions above %vtable does not throw?
>
> Yes, I think you're right. HeaderMayThrow is a conservative
> approximation, and the conservativeness is biting us here.
>
> > Are there any plans to fix it in the future? The fix doesn't seem hard to
>
> Not to my knowledge.
>
> > write and I can do it, but I am not sure if it won't be too expensive.
>
> Maybe we can do it (relatively) cheaply:
>
> - Remember the first throwing instruction in the header, instead of a
> boolean, in LoopSafetyInfo
>
> - In hoistRegion, remember if you've seen the first throwing
> instruction yet
>
> - Pass the above as a boolean parameter to isGuaranteedToExecute, and
> instead of
> if (Inst.getParent() == CurLoop->getHeader())
> return !SafetyInfo->HeaderMayThrow;
> do something like
> if (Inst.getParent() == CurLoop->getHeader())
> return IsBeforeThrowingInst;
>
> -- Sanjoy
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20170331/a109d0bf/attachment.html>
More information about the llvm-dev
mailing list