[LLVMbugs] [Bug 2590] New: TableGen generates different output on different platforms

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Wed Jul 23 19:04:54 PDT 2008


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

           Summary: TableGen generates different output on different
                    platforms
           Product: tools
           Version: trunk
          Platform: PC
        OS/Version: NetBSD
            Status: NEW
          Severity: normal
          Priority: P2
         Component: TableGen
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: krister.walfridsson at gmail.com
                CC: llvmbugs at cs.uiuc.edu


Running the the llvm testsuite on different platforms shows differences for
tests that should give identical result. For example
llvm/test/CodeGen/Alpha/add.ll fails on i386-unknown-netbsdelf4.99.69 but works
on x86_64-unknown-netbsd4.99.69. This is because TableGen generates different
output on different platforms.

The problem is that TableGen keeps some information sorted by pointer values,
and the output is generated by iterating over the list.

I tried to provide a custom ordering operator (that ordered the records by the
Record::Name) to

   std::map<Record*, DAGInstruction> Instructions;

in CodeGenDAGPatterns.h , and that gave me the same testsuite result on the two
machines, but there are still differences between the TableGen-generated files,
so there are probably more maps that should be updated.  But there are several
such candidate variables in CodeGenDAGPatterns.h, e.g.:

   std::map<Record*, SDNodeInfo> SDNodes;
   std::map<Record*, std::pair<Record*, std::string> > SDNodeXForms;
   std::map<Record*, ComplexPattern> ComplexPatterns;
   std::map<Record*, TreePattern*> PatternFragments;
   std::map<Record*, DAGDefaultOperand> DefaultOperands;


-- 
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