[llvm-bugs] [Bug 27299] New: IRPGO crashes calling getBBInfo on BB not in BBInfos

via llvm-bugs llvm-bugs at lists.llvm.org
Fri Apr 8 13:22:48 PDT 2016


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

            Bug ID: 27299
           Summary: IRPGO crashes calling getBBInfo on BB not in BBInfos
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: Miscellaneous Instrumentation passes
          Assignee: unassignedbugs at nondot.org
          Reporter: jvanadrighem at gmail.com
                CC: llvm-bugs at lists.llvm.org
    Classification: Unclassified

Created attachment 16193
  --> https://llvm.org/bugs/attachment.cgi?id=16193&action=edit
Minimal reproducer. Requires attached profdata.

When applying prof data to a function with 2 Basic Blocks where the 2nd is
unreachable, the IRPGO pass crashes. I believe this is due to the unreachable
block not being entered into BBInfos in CFGMST and then later having getBBInfo
called on it. I will attach a patch which applies one of a couple solutions.

The attached profdata has a few counts for the entry block.

Minimal repro shown below and attached:

declare void @foo(%footype*) unnamed_addr #1 align 2

define void @mainfunc(%footype* %this) unnamed_addr #1 align 2 {
entry:
  unreachable

foo.exit:                ; No predecessors!
  ret void
}

-- 
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/20160408/e3599f0a/attachment.html>


More information about the llvm-bugs mailing list