[PATCH] ADT SortedVector and MachineBasicBlock::LiveIns changes.

Puyan Lotfi plotfi at apple.com
Wed Jul 15 13:58:54 PDT 2015


All:

The following patches include a new ADT I’d like to add to LLVM: the SortedVector.
SortedVector is a std::vector that enforces sorted ordering (ascending for now) and uniqueness on access but allows for insertions to be unsorted. 

The reason I implemented this is because I noticed that MachineBasicBlock LiveIns are not actually sorted or unique even though they are normally almost sorted and almost unique.
So by implementing this ADT and by also adding a machine verifier check they will actually be sorted and unique on access. 

I’ve split my patch into:

- The SortedVector ADT
- Changes to MachineBasicBlock
- Changes to files in lib/CodeGen
- Changes to the targets
- An added machine verifier check

Most of the changes to lib/CodeGen and the Targets are just calls to the sorting method usually after a loop where many LiveIns are added to the MachineBasicBlock::LiveIns vector. 

Thanks

PL


-------------- next part --------------
A non-text attachment was scrubbed...
Name: SortedVector_ADT.patch
Type: application/octet-stream
Size: 3899 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150715/40dc2303/attachment.obj>
-------------- next part --------------
 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: SortedVector_CodeGen.patch
Type: application/octet-stream
Size: 3475 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150715/40dc2303/attachment-0001.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: SortedVector_MachineBasicBlock.patch
Type: application/octet-stream
Size: 2598 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150715/40dc2303/attachment-0002.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: SortedVector_MachineVerifier.patch
Type: application/octet-stream
Size: 571 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150715/40dc2303/attachment-0003.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: SortedVector_Target.patch
Type: application/octet-stream
Size: 4924 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150715/40dc2303/attachment-0004.obj>


More information about the llvm-commits mailing list