[PATCH] D39089: [AArch64][SVE] Asm: Add SVE (Z) Register definitions and parsing support

Sander de Smalen via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 26 07:22:56 PDT 2017


sdesmalen added inline comments.


================
Comment at: lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp:1953
+
+static bool isSVEVectorRegister(std::string Name) {
+  return Name[0] == 'z';
----------------
rengolin wrote:
> Isn't this creating a new temporary string just for the comparison? 
> 
> You can pass by reference, or depending on how the future usage will be, use a StringRef instead (this can be done later).
You're right that this should be a StringRef, I'll fix that, thanks.


https://reviews.llvm.org/D39089





More information about the llvm-commits mailing list