llvm-6502/include/llvm/CodeGen
Evan Cheng 1606e8e4cd 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66875 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-13 07:51:59 +00:00
..
AsmPrinter.h wire up support for emitting "special" values from inline asm 2009-03-10 05:37:13 +00:00
BreakCriticalMachineEdge.h Tidy up #includes, deleting a bunch of unnecessary #includes. 2009-01-05 17:59:02 +00:00
CallingConvLower.h Define CallSDNode, an SDNode subclass for use with ISD::CALL. 2008-09-13 01:54:27 +00:00
DAGISelHeader.h Delete unnecessary elses. 2009-01-28 18:03:09 +00:00
DebugLoc.h Print out a new label only if the debug location *tuple* is different. The debug 2009-02-19 09:16:38 +00:00
DwarfWriter.h Refine the Dwarf writer timers so that they measure exception writing and debug 2009-03-10 21:23:25 +00:00
ELFRelocation.h Tidy up #includes, deleting a bunch of unnecessary #includes. 2009-01-05 17:59:02 +00:00
FastISel.h Create DebugLoc information in FastISel. Several temporary methods were 2009-02-03 00:55:04 +00:00
FileWriters.h Tidy up #includes, deleting a bunch of unnecessary #includes. 2009-01-05 17:59:02 +00:00
GCMetadata.h Rename some GC classes so that their roll will hopefully be clearer. 2008-08-17 18:44:35 +00:00
GCMetadataPrinter.h Tidy up #includes, deleting a bunch of unnecessary #includes. 2009-01-05 17:59:02 +00:00
GCs.h Rename some GC classes so that their roll will hopefully be clearer. 2008-08-17 18:44:35 +00:00
GCStrategy.h Tidy up #includes, deleting a bunch of unnecessary #includes. 2009-01-05 17:59:02 +00:00
IntrinsicLowering.h
LatencyPriorityQueue.h Fix some register-alias-related bugs in the post-RA scheduler liveness 2008-12-16 03:25:46 +00:00
LinkAllAsmWriterComponents.h Tidy up #includes, deleting a bunch of unnecessary #includes. 2009-01-05 17:59:02 +00:00
LinkAllCodegenComponents.h Move a few containers out of ScheduleDAGInstrs::BuildSchedGraph 2009-01-15 19:20:50 +00:00
LiveInterval.h Two coalescer fixes in one. 2009-03-11 00:03:21 +00:00
LiveIntervalAnalysis.h Fix PR3486. Fix a bug in code that manually patch physical register live interval after its sub-register is coalesced with a virtual register. 2009-02-08 11:04:35 +00:00
LiveStackAnalysis.h Fix the name of an argument. 2009-01-26 20:27:11 +00:00
LiveVariables.h Fix PR3243: a LiveVariables bug. When HandlePhysRegKill is checking whether the last reference is also the last def (i.e. dead def), it should also check if last reference is the current machine instruction being processed. This can happen when it is processing a physical register use and setting the current machine instruction as sub-register's last ref. 2009-01-20 21:25:12 +00:00
MachineBasicBlock.h Revert r66415. It's causing failures during bootstrap builds: 2009-03-09 18:01:33 +00:00
MachineCodeEmitter.h Add support to the JIT for true non-lazy operation. When a call to a function 2009-02-18 08:31:02 +00:00
MachineConstantPool.h 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
MachineDominators.h Tidy up #includes, deleting a bunch of unnecessary #includes. 2009-01-05 17:59:02 +00:00
MachineFrameInfo.h Fix a bunch of Doxygen syntax issues. Escape special characters, 2009-03-03 02:55:14 +00:00
MachineFunction.h Revert r66415. It's causing failures during bootstrap builds: 2009-03-09 18:01:33 +00:00
MachineFunctionPass.h Tidy up several unbeseeming casts from pointer to intptr_t. 2008-09-04 17:05:41 +00:00
MachineInstr.h do not close friendship with every odd class 2009-03-06 01:09:27 +00:00
MachineInstrBuilder.h Factor out the code to add a MachineOperand to a MachineInstrBuilder. 2009-02-18 05:45:50 +00:00
MachineJumpTableInfo.h
MachineLocation.h Switch the MachineOperand accessors back to the short names like 2008-10-03 15:45:36 +00:00
MachineLoopInfo.h Eliminate several more unnecessary intptr_t casts. 2009-02-18 05:09:16 +00:00
MachineMemOperand.h Change the FoldingSetNodeID usage for objects which carry 2008-08-20 15:58:01 +00:00
MachineModuleInfo.h Remove dead code. 2009-02-03 19:46:28 +00:00
MachineOperand.h Comment MO_FPImmediate and doxygenate surrounding comments. 2008-12-23 18:20:16 +00:00
MachinePassRegistry.h
MachineRegisterInfo.h Add empty() methods for register def lists. 2009-01-07 22:28:56 +00:00
MachineRelocation.h Fix MachineCodeEmitter to use uintptr_t instead of intptr_t. This avoids some overflow issues. Patch by Thomas Jablin. 2008-12-10 02:32:19 +00:00
MachORelocation.h
Passes.h Implement stack protectors as function attributes: "ssp" and "sspreq". 2008-11-13 01:02:14 +00:00
PseudoSourceValue.h Have PseudoSourceValue override Value::dump, so that it works 2008-12-03 21:37:21 +00:00
RegAllocRegistry.h
RegisterCoalescer.h Fix a bunch of Doxygen syntax issues. Escape special characters, 2009-03-03 02:55:14 +00:00
RegisterScavenging.h Don't pass BitVectors by value, pass them by reference. 2009-02-06 09:16:15 +00:00
RuntimeLibcalls.h Few targets like PIC16 wants libcall generation for illegal type i16. 2009-01-18 18:25:27 +00:00
ScheduleDAG.h Unbreak the build on win32. 2009-02-14 16:06:42 +00:00
ScheduleHazardRecognizer.h Initial hazard recognizer support in post-pass scheduling. This includes 2009-01-16 01:33:36 +00:00
SchedulerRegistry.h When scheduling a block in parts, keep track of the overall 2009-02-11 04:27:20 +00:00
SelectionDAG.h Revert r66415. It's causing failures during bootstrap builds: 2009-03-09 18:01:33 +00:00
SelectionDAGISel.h When scheduling a block in parts, keep track of the overall 2009-02-11 04:27:20 +00:00
SelectionDAGNodes.h 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
ValueTypes.h Fix PR3453 and probably a bunch of other potential 2009-02-01 18:06:53 +00:00
ValueTypes.td Added support for vector widening. 2008-12-18 20:03:17 +00:00