llvm-project/llvm/test
Evan Cheng 1fb8aedd1e Fix some significant problems with constant pools that resulted in unnecessary paddings between constant pool entries, larger than necessary alignments (e.g. 8 byte alignment for .literal4 sections), and potentially other issues.
1. ConstantPoolSDNode alignment field is log2 value of the alignment requirement. This is not consistent with other SDNode variants.
2. MachineConstantPool alignment field is also a log2 value.
3. However, some places are creating ConstantPoolSDNode with alignment value rather than log2 values. This creates entries with artificially large alignments, e.g. 256 for SSE vector values.
4. Constant pool entry offsets are computed when they are created. However, asm printer group them by sections. That means the offsets are no longer valid. However, asm printer uses them to determine size of padding between entries.
5. Asm printer uses expensive data structure multimap to track constant pool entries by sections.
6. Asm printer iterate over SmallPtrSet when it's emitting constant pool entries. This is non-deterministic.


Solutions:
1. ConstantPoolSDNode alignment field is changed to keep non-log2 value.
2. MachineConstantPool alignment field is also changed to keep non-log2 value.
3. Functions that create ConstantPool nodes are passing in non-log2 alignments.
4. MachineConstantPoolEntry no longer keeps an offset field. It's replaced with an alignment field. Offsets are not computed when constant pool entries are created. They are computed on the fly in asm printer and JIT.
5. Asm printer uses cheaper data structure to group constant pool entries.
6. Asm printer compute entry offsets after grouping is done.
7. Change JIT code to compute entry offsets on the fly.

llvm-svn: 66875
2009-03-13 07:51:59 +00:00
..
Analysis Update this test for the LoopInfo::print changes. 2009-02-27 00:17:49 +00:00
Archive sabre brings to my attention that the 'tr' suffix is also obsolete 2008-05-20 21:00:03 +00:00
Assembler Fix a pretty awesome bug that only happened in a strange case with anonymous 2009-03-01 00:53:13 +00:00
Bindings/Ocaml tweak this to accept asmprinter changes. I have no way to verify this, hopefully 2009-03-01 01:28:40 +00:00
Bitcode fix a bitcode reader bug where it can't handle extractelement correctly: 2009-02-03 02:11:28 +00:00
BugPoint Remove accidental check-ins in r65960. :-( 2009-03-03 19:25:16 +00:00
CodeGen Fix some significant problems with constant pools that resulted in unnecessary paddings between constant pool entries, larger than necessary alignments (e.g. 8 byte alignment for .literal4 sections), and potentially other issues. 2009-03-13 07:51:59 +00:00
DebugInfo Global variables don't have a corresponding llvm.dbg.declare, yet it is possible 2009-03-10 13:41:26 +00:00
ExecutionEngine This is case is to uncover the bug in IntrinsicLowering.cpp, 2009-01-30 08:59:51 +00:00
Feature Reimplement the old and horrible bison parser for .ll files with a nice 2009-01-02 07:01:27 +00:00
FrontendAda Adjust this test for recent sroa improvements. 2009-03-12 11:56:12 +00:00
FrontendC Tweak the DejaGNU voodoo to match Bill's advice. 2009-03-10 16:44:45 +00:00
FrontendC++ Temporarily XFAIL this test. 2009-03-13 04:37:11 +00:00
FrontendFortran Testcase for PR2437. 2009-02-09 09:41:49 +00:00
FrontendObjC And now, not so elegant, test case... 2009-02-17 22:48:18 +00:00
FrontendObjC++ This is an objective-c test, not an objective-c++ one. 2008-10-06 18:42:48 +00:00
Integer alignment of 0 is not valid. 2009-01-05 08:14:35 +00:00
LLVMC Add a comment. 2009-03-06 17:59:58 +00:00
Linker Reimplement the old and horrible bison parser for .ll files with a nice 2009-01-02 07:01:27 +00:00
Other Update another test for the LoopInfo::print changes. 2009-02-27 00:20:19 +00:00
Scripts simplify shell syntax to work better on solaris, patch by 2008-06-25 16:03:42 +00:00
TableGen implement support for C-style string literal concatenation in td files. 2009-03-11 17:08:13 +00:00
Transforms Do not attempt to do parial redundancy elimination on void values. 2009-03-10 15:04:53 +00:00
Verifier Reimplement the old and horrible bison parser for .ll files with a nice 2009-01-02 07:01:27 +00:00
lib Trailing whitespace. 2009-03-06 12:21:40 +00:00
Makefile Trailing whitespace. 2009-03-06 12:25:56 +00:00
Makefile.tests Failure.sh is dead, remove it. 2007-04-21 20:46:55 +00:00
TestRunner.sh Fix a bashism in TestRunner.sh. 2008-07-28 18:41:03 +00:00