[PATCH] D68267: [MBB LiveIn lists, MachineVerifier, SystemZ] New method isLiveOut() and mverifier improvement.
Jonas Paulsson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 29 03:09:51 PDT 2019
jonpa added inline comments.
================
Comment at: lib/CodeGen/MachineVerifier.cpp:2328
+ "%.bb." + Twine((*PrI)->getNumber());
+ report(Msg.str().c_str(), &MBB);
+ }
----------------
arsenm wrote:
> I don't think this needs the .c_str()
It's actually needed since Twine::str() returns a std::string.
Is there a better way to construct the string than using Twine like this? The comment for Twine says it should "never be used directly"... Is this ok or would it be better to have a Twine constructed inside the call to report(), like in MirParser.cpp, for example?
================
Comment at: lib/Target/SystemZ/SystemZElimCompare.cpp:590
// instructions before it.
- bool CompleteCCUsers = !isCCLiveOut(MBB);
+ bool CompleteCCUsers = !MBB.isLiveOut(SystemZ::CC);
SmallVector<MachineInstr *, 4> CCUsers;
----------------
arsenm wrote:
> I would expect this pass to use LivePhysRegs instead of checking the block function directly
I agree it seems even better to use LivePhysRegs::addLiveOuts() since that method is already there.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D68267/new/
https://reviews.llvm.org/D68267
More information about the llvm-commits
mailing list