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: [email protected]
          Reporter: [email protected]
                CC: [email protected]
    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.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to