diff options
Diffstat (limited to 'utils/TableGen/NeonEmitter.cpp')
| -rw-r--r-- | utils/TableGen/NeonEmitter.cpp | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/utils/TableGen/NeonEmitter.cpp b/utils/TableGen/NeonEmitter.cpp index 6e7bc9057fd7..b5313a073d16 100644 --- a/utils/TableGen/NeonEmitter.cpp +++ b/utils/TableGen/NeonEmitter.cpp @@ -40,6 +40,7 @@ #include <map> #include <sstream> #include <string> +#include <utility> #include <vector> using namespace llvm; @@ -146,9 +147,10 @@ public: NoManglingQ(false), Bitwidth(0), ElementBitwidth(0), NumVectors(0) {} Type(TypeSpec TS, char CharMod) - : TS(TS), Float(false), Signed(false), Immediate(false), Void(false), - Poly(false), Constant(false), Pointer(false), ScalarForMangling(false), - NoManglingQ(false), Bitwidth(0), ElementBitwidth(0), NumVectors(0) { + : TS(std::move(TS)), Float(false), Signed(false), Immediate(false), + Void(false), Poly(false), Constant(false), Pointer(false), + ScalarForMangling(false), NoManglingQ(false), Bitwidth(0), + ElementBitwidth(0), NumVectors(0) { applyModifier(CharMod); } @@ -257,7 +259,7 @@ class Variable { public: Variable() : T(Type::getVoid()), N("") {} - Variable(Type T, std::string N) : T(T), N(N) {} + Variable(Type T, std::string N) : T(std::move(T)), N(std::move(N)) {} Type getType() const { return T; } std::string getName() const { return "__" + N; } @@ -1195,12 +1197,12 @@ void Intrinsic::emitReverseVariable(Variable &Dest, Variable &Src) { emitNewLine(); for (unsigned K = 0; K < Dest.getType().getNumVectors(); ++K) { - OS << " " << Dest.getName() << ".val[" << utostr(K) << "] = " + OS << " " << Dest.getName() << ".val[" << K << "] = " << "__builtin_shufflevector(" - << Src.getName() << ".val[" << utostr(K) << "], " - << Src.getName() << ".val[" << utostr(K) << "]"; + << Src.getName() << ".val[" << K << "], " + << Src.getName() << ".val[" << K << "]"; for (int J = Dest.getType().getNumElements() - 1; J >= 0; --J) - OS << ", " << utostr(J); + OS << ", " << J; OS << ");"; emitNewLine(); } @@ -1208,7 +1210,7 @@ void Intrinsic::emitReverseVariable(Variable &Dest, Variable &Src) { OS << " " << Dest.getName() << " = __builtin_shufflevector(" << Src.getName() << ", " << Src.getName(); for (int J = Dest.getType().getNumElements() - 1; J >= 0; --J) - OS << ", " << utostr(J); + OS << ", " << J; OS << ");"; emitNewLine(); } @@ -1926,7 +1928,7 @@ void NeonEmitter::createIntrinsic(Record *R, ClassKind CK = ClassNone; if (R->getSuperClasses().size() >= 2) - CK = ClassMap[R->getSuperClasses()[1]]; + CK = ClassMap[R->getSuperClasses()[1].first]; std::vector<std::pair<TypeSpec, TypeSpec>> NewTypeSpecs; for (auto TS : TypeSpecs) { |
