[llvm-dev] SCCP is not always correct in presence of undef (+ proposed fix)

Daniel Berlin via llvm-dev llvm-dev at lists.llvm.org
Fri Dec 30 21:53:19 PST 2016


>
>
> >
> > You need to distinguish between not visited and visited but undef.
>
> What I'm getting at is, if you're implementing something close to the
> paper mentioned, I can't think of a case where you'd care to
> distinguish between "not visited" and "visited but undef".  That is,
> instead of starting from "map each each instruction as not visited" we
> should be able to (my unproven conjecture) start from "map each
> instruction to undef", making the "unknown" element superfluous.
>

See the email i just sent.

Your scheme would work if you didn't want to optimize undef, because you'd
just make meet (anything, undef) -> overdefined.
It's the "we want to fill in values for undef" that makes it so you need to
know when you can actually do that.
(and as mentioned, you don't need a separate post-resolver to do *what we
do now*, and so far, it has just been a source of bugs :()
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20161230/a0a0ac7d/attachment.html>


More information about the llvm-dev mailing list