[llvm] r290755 - [NewGVN] Remove unneeded newline from assertion message.

Daniel Berlin via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 30 20:09:18 PST 2016


It was chosen by taking a number of very large codebases, finding the max
number, etc.

1. I just use it for finding infinite loops and bugpointing them, so we
should remove it at some point.
2. The number is basically "what is the max number of loop connectedness of
a program we will ever see".
For most normal programs, it's like "2".
For generated code, you can get to like 10.
It would be an impressive mess of code to get more than that.

We could make it 1000 for now if we want.

We could also directly compute the loop connectedness and assert if we go
more than that, but it's mostly a waste of time :)





On Fri, Dec 30, 2016, 6:51 PM Davide Italiano <davide at freebsd.org> wrote:

> On Fri, Dec 30, 2016 at 3:55 PM, Sean Silva <chisophugis at gmail.com> wrote:
> > Why 100? It seems weird to have an `assert` against a magic number like
> > this; presumably the assert would fail if the magic number were 2 or
> > something? What makes 100 "impossible"? It would be good to have this in
> a
> > comment.
> >
>
> I think the number "100" is chosen kinda arbitrarily. Ideally we
> shouldn't process every instruction more than an handful of times so
> having an instruction processed 100 times is  likely an indication for
> bugs. I agree it could be explained in a comment (happy to change),
> but I'd like Danny to comment further if 100 was chosen for a
> particular reason.
>
> Thanks!
>
> --
> Davide
>
> "There are no solved problems; there are only problems that are more
> or less solved" -- Henri Poincare
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20161230/f7a966a2/attachment.html>


More information about the llvm-commits mailing list