[llvm-bugs] [Bug 34717] New: LiveDebugValues won`t extend range across empty MachineBasicBlock

via llvm-bugs llvm-bugs at lists.llvm.org
Mon Sep 25 08:16:17 PDT 2017


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

            Bug ID: 34717
           Summary: LiveDebugValues won`t extend range across empty
                    MachineBasicBlock
           Product: new-bugs
           Version: trunk
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: new bugs
          Assignee: unassignedbugs at nondot.org
          Reporter: pichet2000 at gmail.com
                CC: llvm-bugs at lists.llvm.org

For all kind of reasons, llvm will sometimes generate empty MachineBasicBlocks.

These empty MBBs will act as a barrier during LiveDebugValues::join(...).

The reason is:

    VarLocSet KillSet;
    for (auto ID : InLocsT)
      if (!VarLocIDs[ID].dominates(MBB))
        KillSet.set(ID);
    InLocsT.intersectWithComplement(KillSet);

VarLocIDs[ID].dominates(MBB) will always return false for an empty MBB.

I analyzed many cases of missing debug info (optimized mode) where it would
make sense to propagate DebugValue on empty MBB because it eventually lead to
more propagation on the successor of the empty MBB.


I don't know if its the best solution but this give better debuginfo:

  if (!MBB.empty()) {
    VarLocSet KillSet;
    for (auto ID : InLocsT)
      if (!VarLocIDs[ID].dominates(MBB))
        KillSet.set(ID);
    InLocsT.intersectWithComplement(KillSet);
  }

-- 
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/20170925/91d987ca/attachment.html>


More information about the llvm-bugs mailing list