[llvm-commits] [llvm] r153760 - /llvm/trunk/utils/TableGen/SequenceToOffsetTable.h

Jakob Stoklund Olesen stoklund at 2pi.dk
Fri Mar 30 13:06:57 PDT 2012


On Mar 30, 2012, at 11:48 AM, Chris Lattner <clattner at apple.com> wrote:

> 
> On Mar 30, 2012, at 10:25 AM, Jakob Stoklund Olesen wrote:
> 
>> Author: stoklund
>> Date: Fri Mar 30 12:25:40 2012
>> New Revision: 153760
>> 
>> URL: http://llvm.org/viewvc/llvm-project?rev=153760&view=rev
>> Log:
>> Add a SequenceToOffsetTable to TableGen.
>> 
>> This is similar to the StringToOffsetTable we use to produce string
>> tables, but it can be used for other sequences than strings, and it
>> eliminates entries for suffixes.
> 
> Nice, can StringToOffsetTable go away or be reimplemented in terms of this?  It would be nice to get suffix sharing for strings and not have the algorithm duplication.

Yes, I think it can.

It can also emit a char array instead of a literal string, so we can work around the pedantic 64K limit on string literals.

/jakob




More information about the llvm-commits mailing list