[LLVMbugs] [Bug 5680] New: bitcode files do not preserve order of use lists

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Thu Dec 3 16:58:19 PST 2009


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

           Summary: bitcode files do not preserve order of use lists
           Product: libraries
           Version: trunk
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Bitcode Writer
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: bob.wilson at apple.com
                CC: llvmbugs at cs.uiuc.edu


The order of entries in use lists is deterministic but that order is not
preserved in bitcode files.  Serializing/deserializing the IR to a bitcode file
in between passes may change the behavior of those passes if they depend on the
order of use lists.  This is a problem for bugpoint and for manual debugging as
well.

I ran into this while trying to track down a performance problem in llvm-gcc. 
Writing a bitcode file and running llc produced slightly different results that
prevented me from reproducing the performance issues.  I tracked this down to
CodeGenPrepare splitting critical edges by iterating over the basic block
predecessor list and selecting the first suitable edge to split.  The order of
predecessors was different in llc than in llvm-gcc, which caused a different
edge to be split.  The problem applies to all use lists, not just basic block
predecessors.

It would be good to add information to the bitcode files to preserve the use
list order, at least as an option for debugging.

It would also be good to have a way to keep that same information in llvm
assembly files so that disassembling a bitcode file preserves the information.


-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the llvm-bugs mailing list