[LLVMbugs] [Bug 19580] New: MergeFunctions::removeUsers should guard against repeated values

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Mon Apr 28 02:29:21 PDT 2014


http://llvm.org/bugs/show_bug.cgi?id=19580

            Bug ID: 19580
           Summary: MergeFunctions::removeUsers should guard against
                    repeated values
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: normal
          Priority: P
         Component: Interprocedural Optimizations
          Assignee: unassignedbugs at nondot.org
          Reporter: ryan at rfk.id.au
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

When using -mergefunc on a large project, I found it would hang forever and
slowly chew up all my RAM (up to several tens of GB of it).  The issue appears
to be a reference loop encountered while running the
MergeFunctions::removeUsers method, meaning that its worklist grows without
bound.

I haven't managed to figure out exactly what causes the loop or to produce a
testcase, but adding a simple "previously seen values" check seems to be fix
the issue for me.  I'm attaching the patch in case it's useful to others, or if
it's obviously correct even without understanding the cause of the bug.

-- 
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/20140428/4c2c1eb9/attachment.html>


More information about the llvm-bugs mailing list