[PATCH] D43916: Named VReg support for MIR
Puyan Lotfi via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 28 00:23:05 PDT 2018
plotfi marked 5 inline comments as done.
plotfi added inline comments.
================
Comment at: lib/CodeGen/MIRParser/MIParser.cpp:2534
+ if (!Names2VRegs.insert(std::make_pair(RegName, Reg)).second)
+ return error(Twine("Invalid register name '") + RegName + "'");
+ return Reg;
----------------
thegameg wrote:
> plotfi wrote:
> > thegameg wrote:
> > > It's a little unclear how to differentiate from an error (result = 1) or a register with the value 1. How about inlining this in the caller since it's only used once?
> > So just do Names2VRegs.insert(std::make_pair(RegName, Reg)) ?
> Hmm now that I'm thinking about it, if this insertion doesn't succeed it means that the key is already in the map. And since you checked at the beginning of this function I assume this can't happen?
Yeah. I removed the check anyways.
Repository:
rL LLVM
https://reviews.llvm.org/D43916
More information about the llvm-commits
mailing list