[PATCH] D43916: Named VReg support for MIR
Justin Bogner via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 14 14:26:28 PDT 2018
bogner added inline comments.
================
Comment at: include/llvm/CodeGen/MachineRegisterInfo.h:430
+ StringRef getVRegName(unsigned Reg) const {
+ return VReg2Name.inBounds(Reg) ? VReg2Name[Reg].c_str() : "";
+ }
----------------
Very minor, but calling c_str() here causes an extra call to strlen - better to construct the StringRef from the std::string directly.
Repository:
rL LLVM
https://reviews.llvm.org/D43916
More information about the llvm-commits
mailing list