This is an archive of the discontinued LLVM Phabricator instance.

MIRParser/MIRPrinter: Compute isSSA instead of printing/parsing it.
ClosedPublic

Authored by MatzeB on Jul 22 2016, 8:22 PM.

Details

Diff Detail

Repository
rL LLVM

Event Timeline

MatzeB updated this revision to Diff 65212.Jul 22 2016, 8:22 PM
MatzeB retitled this revision from to MIRParser/MIRPrinter: Compute isSSA instead of printing/parsing it..
MatzeB updated this object.
MatzeB added reviewers: qcolombet, dexonsmith, arphaman.
MatzeB set the repository for this revision to rL LLVM.
MatzeB added a subscriber: llvm-commits.
MatzeB updated this revision to Diff 65213.Jul 22 2016, 9:00 PM
MatzeB edited edge metadata.

Fix some bugs in the patch.

kparzysz added inline comments.
lib/CodeGen/MIRParser/MIRParser.cpp
303 ↗(On Diff #65213)

This check is insufficient. The def must dominate all uses. It is possible to have a non-SSA program where all registers have single definitions, but where a use is not dominated by the def.

MatzeB added inline comments.Jul 27 2016, 10:52 AM
lib/CodeGen/MIRParser/MIRParser.cpp
303 ↗(On Diff #65213)

While true in general, in llvm machine functions we can never have a virtual register use without any dominating definition (you need to place an IMPLICIT_DEF if you do not have a real definition).
I don't think we need to cater for malformed .mir here. The MachineVerifier step performed after reading should catch that case.

qcolombet accepted this revision.Aug 12 2016, 7:09 PM
qcolombet edited edge metadata.

LGTM

This revision is now accepted and ready to land.Aug 12 2016, 7:09 PM
This revision was automatically updated to reflect the committed changes.