[llvm-dev] Early CSE clobbering llvm.assume

Daniel Berlin via llvm-dev llvm-dev at lists.llvm.org
Sat Jun 11 18:17:07 PDT 2016


What he said :)
It also, representationally, has a related  issue  our current assume does
in terms of figuring out the set of assumptions applied.  Given an
instruction, in extended SSA, because " assume" produces a value used by
things, it's trivial to find the chain of assumptions you can use for it.
In a straight control flow representation, it requires finding which side
of the branch you are on all the way up the control dependence tree

On Sat, Jun 11, 2016, 6:07 PM Sanjoy Das via llvm-dev <
llvm-dev at lists.llvm.org> wrote:

> On Sat, Jun 11, 2016 at 5:47 PM, Sean Silva via llvm-dev
> <llvm-dev at lists.llvm.org> wrote:
> > Perhaps a naive question then is: why don't we represent assume as `if
> > (!cond) unreachable; else <the rest of the code>`?
>
> As I understand it, in theory this is fine, but in practice it may end
> up breaking optimizations.  For instance, today we can hoist loads
> across calls to assume, but it may not be obviously safe if you have
> the branch-to-unreachable representation.   The control flow
> representation may also bloat compile time / memory usage due to more
> basic blocks.
>
> -- Sanjoy
> _______________________________________________
> 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/20160612/5f4e6a46/attachment.html>


More information about the llvm-dev mailing list