[PATCH] D57654: [llvm-exegesis] deserializeMCInst(): bump SmallVector small size up to 16

Roman Lebedev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Feb 3 08:15:46 PST 2019


lebedev.ri created this revision.
lebedev.ri added reviewers: courbet, gchatelet.
lebedev.ri added a project: LLVM.
Herald added a subscriber: tschuett.

... from 8.
`VALIGNDZ128rmbik XMM0 XMM0 K1 XMM3 RDI i_0x1  i_0x0  i_0x1` instruction already has 9 components.
It does not matter much in terms of performance, but avoiding allocation seems to come with low cost here..


Repository:
  rL LLVM

https://reviews.llvm.org/D57654

Files:
  tools/llvm-exegesis/lib/BenchmarkResult.cpp


Index: tools/llvm-exegesis/lib/BenchmarkResult.cpp
===================================================================
--- tools/llvm-exegesis/lib/BenchmarkResult.cpp
+++ tools/llvm-exegesis/lib/BenchmarkResult.cpp
@@ -40,7 +40,7 @@
   }
 
   void deserializeMCInst(llvm::StringRef String, llvm::MCInst &Value) {
-    llvm::SmallVector<llvm::StringRef, 8> Pieces;
+    llvm::SmallVector<llvm::StringRef, 16> Pieces;
     String.split(Pieces, " ", /* MaxSplit */ -1, /* KeepEmpty */ false);
     if (Pieces.empty()) {
       ErrorStream << "Unknown Instruction: '" << String << "'";


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D57654.184957.patch
Type: text/x-patch
Size: 582 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190203/9cbe8ca0/attachment.bin>


More information about the llvm-commits mailing list