[llvm] r304096 - [TableGen][X86] Remove unnecessary std::string creations. NFC

Craig Topper via llvm-commits llvm-commits at lists.llvm.org
Sun May 28 11:24:35 PDT 2017


Author: ctopper
Date: Sun May 28 13:24:35 2017
New Revision: 304096

URL: http://llvm.org/viewvc/llvm-project?rev=304096&view=rev
Log:
[TableGen][X86] Remove unnecessary std::string creations. NFC

Modified:
    llvm/trunk/utils/TableGen/X86FoldTablesEmitter.cpp

Modified: llvm/trunk/utils/TableGen/X86FoldTablesEmitter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/X86FoldTablesEmitter.cpp?rev=304096&r1=304095&r2=304096&view=diff
==============================================================================
--- llvm/trunk/utils/TableGen/X86FoldTablesEmitter.cpp (original)
+++ llvm/trunk/utils/TableGen/X86FoldTablesEmitter.cpp Sun May 28 13:24:35 2017
@@ -162,8 +162,8 @@ class X86FoldTablesEmitter {
 
     friend raw_ostream &operator<<(raw_ostream &OS,
                                    const X86FoldTableEntry &E) {
-      OS << "{ X86::" << E.RegInst->TheDef->getName().str()
-         << ", X86::" << E.MemInst->TheDef->getName().str() << ", ";
+      OS << "{ X86::" << E.RegInst->TheDef->getName()
+         << ", X86::" << E.MemInst->TheDef->getName() << ", ";
 
       if (E.IsLoad)
         OS << "TB_FOLDED_LOAD | ";
@@ -172,7 +172,7 @@ class X86FoldTablesEmitter {
       if (E.CannotUnfold)
         OS << "TB_NO_REVERSE | ";
       if (E.IsAligned)
-        OS << "TB_ALIGN_" + std::to_string(E.Alignment) + " | ";
+        OS << "TB_ALIGN_" << E.Alignment << " | ";
 
       OS << "0 },\n";
 
@@ -645,7 +645,7 @@ void X86FoldTablesEmitter::run(raw_ostre
     //   class ptr_rc_tailcall, which can be of a size 32 or 64, to ensure
     //   safe mapping of these instruction we manually map them and exclude
     //   them from the automation.
-    if (find(NoFoldSet, Rec->getName().str()) != std::end(NoFoldSet) ||
+    if (find(NoFoldSet, Rec->getName()) != std::end(NoFoldSet) ||
         hasRSTRegClass(Inst) || hasPtrTailcallRegClass(Inst))
       continue;
 




More information about the llvm-commits mailing list