diff options
author | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2012-03-30 17:42:04 +0000 |
---|---|---|
committer | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2012-03-30 17:42:04 +0000 |
commit | e214c3df40220d6c81b33cf7ae20b6ba3ce82e99 (patch) | |
tree | 1082dc6c7393a72f22e4482d0b319a5398f077cb /llvm/utils/TableGen/SequenceToOffsetTable.h | |
parent | 59f9fd7f6bb0615b3f6ce9812df000cea4598e67 (diff) | |
download | bcm5719-llvm-e214c3df40220d6c81b33cf7ae20b6ba3ce82e99.tar.gz bcm5719-llvm-e214c3df40220d6c81b33cf7ae20b6ba3ce82e99.zip |
Compress SimpleValueType lists by sharing.
Many register classes have the same value types. Share the table space.
llvm-svn: 153764
Diffstat (limited to 'llvm/utils/TableGen/SequenceToOffsetTable.h')
-rw-r--r-- | llvm/utils/TableGen/SequenceToOffsetTable.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/llvm/utils/TableGen/SequenceToOffsetTable.h b/llvm/utils/TableGen/SequenceToOffsetTable.h index 26e705841f2..09dccbb1084 100644 --- a/llvm/utils/TableGen/SequenceToOffsetTable.h +++ b/llvm/utils/TableGen/SequenceToOffsetTable.h @@ -103,7 +103,9 @@ public: /// emit - Print out the table as the body of an array initializer. /// Use the Print function to print elements. - void emit(raw_ostream &OS, void (*Print)(raw_ostream&, ElemT)) const { + void emit(raw_ostream &OS, + void (*Print)(raw_ostream&, ElemT), + const char *Term = "0") const { assert(Entries && "Call layout() before emit()"); for (typename SeqMap::const_iterator I = Seqs.begin(), E = Seqs.end(); I != E; ++I) { @@ -113,7 +115,7 @@ public: Print(OS, *SI); OS << ", "; } - OS << "0,\n"; + OS << Term << ",\n"; } } }; |