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: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]
                CC: [email protected]


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

Reply via email to