[PATCH] D22722: MIRParser/MIRPrinter: Compute isSSA instead of printing/parsing it.
Matthias Braun via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 27 10:52:53 PDT 2016
MatzeB added inline comments.
================
Comment at: lib/CodeGen/MIRParser/MIRParser.cpp:303
@@ +302,3 @@
+ if (!MRI.hasOneDef(Reg) && !MRI.def_empty(Reg)) {
+ IsSSA = false;
+ break;
----------------
kparzysz wrote:
> 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.
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.
Repository:
rL LLVM
https://reviews.llvm.org/D22722
More information about the llvm-commits
mailing list