LLVMers,
On the way to resolving bug 122, I am committing my SymbolTable rewrite.
If you are working on anything that uses the SymbolTable, I suggest you
read the documentation in include/llvm/SymbolTable.h.
The changes I've committed reduce the use of Type::TypeTy. This static
member will go away in the future, so please do not propagate new code
that uses it. There is no reason to use it in order to access the "type
plane" in the new SymbolTable. There are some corner cases where its
still needed elsewhere, however.
Here's a quickie summary of how the new SymbolTable interface affects
its users:
1. The data structures are embedded so if you were thinking of using
any std::map functionality, its gone.
2. Some of the generic std::map functionality has been added to
SymbolTable to make it compatible (e.g. empty() ).
3. The iterator names and concepts have changed significantly. In the
future, please use the following conventions:
(a) To iterate over the all type planes use plane_begin() and
plane_end(). These are semantically equivalent to the begin() and
end() methods inherited from std::map on the old SymbolTable. For
iterating over planes, please use an iterator named PI.
(b) To iterate over the type type plane (the plane of Type::TypeTy),
please use type_begin() and type_end(). Previously, users of the
SymbolTable would use ST.find(Type::TypeTy) to access the type
type plane. This is now semantically incorrect and will always
return std::map.end()! Use type_begin() and type_end() instead.
These will get you an iterator over the name/Type pairs in the
type type plane. For iteration over types, please use an iterator
named TI.
(c) To iterate over the values in one type plane (except for the
plane of types), use value_begin(Type*) and value_end(Type*).
These methods will get you an iterator over the name/Value
pairs in the single type plane given by the arguments. For
iterating over values, please use an iterator named VI.
4. Some functionality (like "strip") has been moved into the
SymbolTable. This means that the SymbolStripping pass is now
a single call to the SymbolTable::strip() method.
These changes pass all feature tests. Some of the regression tests fail
and I'm not sure if its due to (a) my changes, (b) my old cfrontend, or
(c) someone else's changes. I suspect its more of (b) and (c) but I will
look into this in more detail later this week.
Next steps on bug 122 (each a separate commit):
* Completely rid ourselves of Type::TypeTy. This involves a rewrite of
the SlotCalculator which will be divided up between Bytecode writer
and ASM writer.
* Make Type not inherit from Value and fix the resulting fall out.
* Get rid of ConstantPointerRef.
If you have *any* questions about this, please email me.
Thanks,
Reid.
Here's the Feature/Regression test results:
--- STATISTICS
---------------------------------------------------------------
902 tests total
874 ( 97%) tests as expected
27 ( 3%) tests unexpected FAIL
1 ( 0%) tests unexpected PASS
--- TESTS WITH UNEXPECTED OUTCOMES
-------------------------------------------
Regression.Assembler.ConstantExprFold : FAIL , expected
PASS
Script:
/proj/work/llvm/build/test/tmp/trConstantExprFold.llx/testscript.ConstantExprFold.llx
Output:
/proj/work/llvm/build/test/tmp/trConstantExprFold.llx/testscript.ConstantExprFold.llx.out
Regression.C++Frontend.2004-01-11-DynamicInitializedConstant: FAIL
, expected PASS
Script:
/proj/work/llvm/build/test/tmp/tr2004-01-11-DynamicInitializedConstant.cpp.tr/testscript.2004-01-11-DynamicInitializedConstant.cpp.tr
Output:
/proj/work/llvm/build/test/tmp/tr2004-01-11-DynamicInitializedConstant.cpp.tr/testscript.2004-01-11-DynamicInitializedConstant.cpp.tr.out
Regression.C++Frontend.2004-03-08-ReinterpretCastCopy: FAIL ,
expected PASS
Compiling C++ code failed
Regression.C++Frontend.2004-03-15-CleanupsAndGotos: FAIL , expected
PASS
Compiling C++ code failed
Regression.CFrontend.2002-07-14-MiscListTests : FAIL , expected
PASS
Compiling code failed
Regression.CFrontend.2003-06-29-MultipleFunctionDefinition: FAIL ,
expected PASS
Compiling C code failed
Regression.CFrontend.2003-12-14-ExternInlineSupport: FAIL ,
expected PASS
Script:
/proj/work/llvm/build/test/tmp/tr2003-12-14-ExternInlineSupport.c.tr/testscript.2003-12-14-ExternInlineSupport.c.tr
Output:
/proj/work/llvm/build/test/tmp/tr2003-12-14-ExternInlineSupport.c.tr/testscript.2003-12-14-ExternInlineSupport.c.tr.out
Regression.CFrontend.2004-01-08-ExternInlineRedefine: FAIL ,
expected PASS
Compiling C code failed
Regression.CFrontend.2004-02-12-LargeAggregateCopy: FAIL , expected
PASS
Script:
/proj/work/llvm/build/test/tmp/tr2004-02-12-LargeAggregateCopy.c.tr/testscript.2004-02-12-LargeAggregateCopy.c.tr
Output:
/proj/work/llvm/build/test/tmp/tr2004-02-12-LargeAggregateCopy.c.tr/testscript.2004-02-12-LargeAggregateCopy.c.tr.out
Regression.CFrontend.2004-02-13-BuiltinFrameReturnAddress: FAIL ,
expected PASS
Script:
/proj/work/llvm/build/test/tmp/tr2004-02-13-BuiltinFrameReturnAddress.c.tr/testscript.2004-02-13-BuiltinFrameReturnAddress.c.tr
Output:
/proj/work/llvm/build/test/tmp/tr2004-02-13-BuiltinFrameReturnAddress.c.tr/testscript.2004-02-13-BuiltinFrameReturnAddress.c.tr.out
Regression.CFrontend.2004-02-13-IllegalVararg : FAIL , expected
PASS
Script:
/proj/work/llvm/build/test/tmp/tr2004-02-13-IllegalVararg.c.tr/testscript.2004-02-13-IllegalVararg.c.tr
Output:
/proj/work/llvm/build/test/tmp/tr2004-02-13-IllegalVararg.c.tr/testscript.2004-02-13-IllegalVararg.c.tr.out
Regression.CFrontend.2004-02-13-Memset : FAIL , expected
PASS
Script:
/proj/work/llvm/build/test/tmp/tr2004-02-13-Memset.c.tr/testscript.2004-02-13-Memset.c.tr
Output:
/proj/work/llvm/build/test/tmp/tr2004-02-13-Memset.c.tr/testscript.2004-02-13-Memset.c.tr.out
Regression.CFrontend.2004-02-14-ZeroInitializer: FAIL , expected
PASS
Script:
/proj/work/llvm/build/test/tmp/tr2004-02-14-ZeroInitializer.c.tr/testscript.2004-02-14-ZeroInitializer.c.tr
Output:
/proj/work/llvm/build/test/tmp/tr2004-02-14-ZeroInitializer.c.tr/testscript.2004-02-14-ZeroInitializer.c.tr.out
Regression.CFrontend.2004-03-07-ComplexDivEquals: FAIL , expected
PASS
Compiling C code failed
Regression.CFrontend.2004-03-15-SimpleIndirectGoto: FAIL , expected
PASS
Compiling C code failed
Regression.CFrontend.2004-03-16-AsmRegisterCrash: FAIL , expected
PASS
Compiling C code failed
Regression.CFrontend.2004-05-21-IncompleteEnum: FAIL , expected
PASS
Compiling C code failed
Regression.CodeGen.Generic.2004-04-09-SameValueCoalescing: FAIL ,
expected PASS
Script:
/proj/work/llvm/build/test/tmp/tr2004-04-09-SameValueCoalescing.llx/testscript.2004-04-09-SameValueCoalescing.llx
Output:
/proj/work/llvm/build/test/tmp/tr2004-04-09-SameValueCoalescing.llx/testscript.2004-04-09-SameValueCoalescing.llx.out
Regression.CodeGen.Generic.BasicInstrs : FAIL , expected
PASS
Script:
/proj/work/llvm/build/test/tmp/trBasicInstrs.llx/testscript.BasicInstrs.llx
Output:
/proj/work/llvm/build/test/tmp/trBasicInstrs.llx/testscript.BasicInstrs.llx.out
Regression.Linker.2003-01-30-LinkerTypeRename : FAIL , expected
PASS
Script:
/proj/work/llvm/build/test/tmp/tr2003-01-30-LinkerTypeRename.ll/testscript.2003-01-30-LinkerTypeRename.ll
Output:
/proj/work/llvm/build/test/tmp/tr2003-01-30-LinkerTypeRename.ll/testscript.2003-01-30-LinkerTypeRename.ll.out
Regression.Linker.2003-10-21-ConflictingTypesTolerance: FAIL ,
expected PASS
Script:
/proj/work/llvm/build/test/tmp/tr2003-10-21-ConflictingTypesTolerance.ll/testscript.2003-10-21-ConflictingTypesTolerance.ll
Output:
/proj/work/llvm/build/test/tmp/tr2003-10-21-ConflictingTypesTolerance.ll/testscript.2003-10-21-ConflictingTypesTolerance.ll.out
Regression.Other.2002-03-11-ExprAssertion : FAIL , expected
PASS
Script:
/proj/work/llvm/build/test/tmp/tr2002-03-11-ExprAssertion.ll/testscript.2002-03-11-ExprAssertion.ll
Output:
/proj/work/llvm/build/test/tmp/tr2002-03-11-ExprAssertion.ll/testscript.2002-03-11-ExprAssertion.ll.out
Regression.Other.2002-03-14-ValueToLarge : FAIL , expected
PASS
Script:
/proj/work/llvm/build/test/tmp/tr2002-03-14-ValueToLarge.ll/testscript.2002-03-14-ValueToLarge.ll
Output:
/proj/work/llvm/build/test/tmp/tr2002-03-14-ValueToLarge.ll/testscript.2002-03-14-ValueToLarge.ll.out
Regression.Transforms.CorrelatedExprs.nullpointer: XPASS
Regression.Transforms.InstCombine.load : FAIL , expected
PASS
Script: /proj/work/llvm/build/test/tmp/trload.ll/testscript.load.ll
Output:
/proj/work/llvm/build/test/tmp/trload.ll/testscript.load.ll.out
Regression.Transforms.InstCombine.phi : FAIL , expected
PASS
Script: /proj/work/llvm/build/test/tmp/trphi.ll/testscript.phi.ll
Output:
/proj/work/llvm/build/test/tmp/trphi.ll/testscript.phi.ll.out
Regression.Transforms.SimplifyCFG.2002-05-05-EmptyBlockMerge: FAIL
, expected PASS
Script:
/proj/work/llvm/build/test/tmp/tr2002-05-05-EmptyBlockMerge.ll/testscript.2002-05-05-EmptyBlockMerge.ll
Output:
/proj/work/llvm/build/test/tmp/tr2002-05-05-EmptyBlockMerge.ll/testscript.2002-05-05-EmptyBlockMerge.ll.out
Regression.Verifier.2002-04-13-RetTypes : FAIL , expected
PASS
/proj/work/llvm/llvm/test/Regression/Verifier/2002-04-13-RetTypes.ll
assembled
gmake: [qmtest] Error 1 (ignored)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL:
<http://lists.llvm.org/pipermail/llvm-dev/attachments/20040525/94a7a5a7/attachment.sig>