[PATCH] D45156: [MachineVerifier] Verify the RegUsageInfo collected for the current function.

Quentin Colombet via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu May 3 15:52:55 PDT 2018


qcolombet accepted this revision.
qcolombet added inline comments.
This revision is now accepted and ready to land.


================
Comment at: lib/CodeGen/MachineVerifier.cpp:360
+
+void MachineVerifier::verifyUsedPhysRegs(const MachineFunction &MF) {
+  // PhysicalRegisterUsageInfo becomes available with interprocedural
----------------
jonpa wrote:
> qcolombet wrote:
> > I would have named it verifyPreservedMask or something.
> > I would expect a verifyUsedPhysReg to work on UsedPhysRegMask not the PreservedMask one.
> To me verifyPreservedMask mostly associates to getCallPreservedMask(), on the other hand :-)  How about verifyRegUsageInfoCollector() ?
> 
> BTW, is my naming for PreservedRegs good? It seems to be called just RegMask elsewhere. 'PreservedRegs' reflects the fact that if a bit is set, then that reg is preserved.  But this is always true for a RegMask, then perhaps we should stick to that name? Or 'FunctionRegMask'?
> 
I'd say it doesn't hurt to be explicit :). (I.e., I think having preserved in the name is good.)

I like the verifyRegUsageInfoCollector name!


https://reviews.llvm.org/D45156





More information about the llvm-commits mailing list