[llvm-bugs] [Bug 30966] New: Teach the SCCP solver about `undef`

via llvm-bugs llvm-bugs at lists.llvm.org
Wed Nov 9 12:31:11 PST 2016


https://llvm.org/bugs/show_bug.cgi?id=30966

            Bug ID: 30966
           Summary: Teach the SCCP solver about `undef`
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: normal
          Priority: P
         Component: Scalar Optimizations
          Assignee: unassignedbugs at nondot.org
          Reporter: davide at freebsd.org
                CC: llvm-bugs at lists.llvm.org
    Classification: Unclassified

Currently `undef` are not solved strictly as part of the solver.
Instead, after the solver runs, we assume that everything which has lattice
value Unknown means "undef" and we try to match the correct lattice values in
resolveUndefsIn.

Some of the problems of this approach:
1) There are two parallel pieces of code which have a lockstep ordering of
propagation, and this makes hard to reason about them.
2) It breaks subtly in some cases. See, for example
http://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-20161107/403212.html
Dan's comment or https://llvm.org/bugs/show_bug.cgi?id=30448

A solution could be that of making `undef` actually a lattice value, and
integrate in the solver. Eli pointed out ConstantFolding knows about undef
(although there are some cases that need special attention, e.g. phi nodes).

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20161109/bd311d9e/attachment.html>


More information about the llvm-bugs mailing list