diff options
author | Yaron Keren <yaron.keren@gmail.com> | 2015-08-13 18:12:56 +0000 |
---|---|---|
committer | Yaron Keren <yaron.keren@gmail.com> | 2015-08-13 18:12:56 +0000 |
commit | 556b21aa10ee7ffe8724cb0c5f5d5df9bc718ddc (patch) | |
tree | c0a5083d290ea0d5138c674e1a5a8019816b76c9 /llvm/utils/TableGen/FixedLenDecoderEmitter.cpp | |
parent | 1dbb95151b0ed90ba376a1da90a1bd1eb9364e12 (diff) | |
download | bcm5719-llvm-556b21aa10ee7ffe8724cb0c5f5d5df9bc718ddc.tar.gz bcm5719-llvm-556b21aa10ee7ffe8724cb0c5f5d5df9bc718ddc.zip |
Remove and forbid raw_svector_ostream::flush() calls.
After r244870 flush() will only compare two null pointers and return,
doing nothing but wasting run time. The call is not required any more
as the stream and its SmallString are always in sync.
Thanks to David Blaikie for reviewing.
llvm-svn: 244928
Diffstat (limited to 'llvm/utils/TableGen/FixedLenDecoderEmitter.cpp')
-rw-r--r-- | llvm/utils/TableGen/FixedLenDecoderEmitter.cpp | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/llvm/utils/TableGen/FixedLenDecoderEmitter.cpp b/llvm/utils/TableGen/FixedLenDecoderEmitter.cpp index 994039e7c39..f78c6ca6d21 100644 --- a/llvm/utils/TableGen/FixedLenDecoderEmitter.cpp +++ b/llvm/utils/TableGen/FixedLenDecoderEmitter.cpp @@ -1120,7 +1120,6 @@ unsigned FilterChooser::getDecoderIndex(DecoderSet &Decoders, raw_svector_ostream S(Decoder); unsigned I = 4; emitDecoder(S, I, Opc, HasCompleteDecoder); - S.flush(); // Using the full decoder string as the key value here is a bit // heavyweight, but is effective. If the string comparisons become a @@ -1231,7 +1230,6 @@ void FilterChooser::emitPredicateTableEntry(DecoderTableInfo &TableInfo, SmallString<16> PBytes; raw_svector_ostream S(PBytes); encodeULEB128(PIdx, S); - S.flush(); TableInfo.Table.push_back(MCD::OPC_CheckPredicate); // Predicate index @@ -1297,7 +1295,6 @@ void FilterChooser::emitSoftFailTableEntry(DecoderTableInfo &TableInfo, if (NeedNegativeMask) { MaskBytes.clear(); encodeULEB128(NegativeMask.getZExtValue(), S); - S.flush(); for (unsigned i = 0, e = MaskBytes.size(); i != e; ++i) TableInfo.Table.push_back(MaskBytes[i]); } else @@ -1367,7 +1364,6 @@ void FilterChooser::emitSingletonTableEntry(DecoderTableInfo &TableInfo, SmallString<16> Bytes; raw_svector_ostream S(Bytes); encodeULEB128(DIdx, S); - S.flush(); // Decoder index for (unsigned i = 0, e = Bytes.size(); i != e; ++i) |