[PATCH] D80538: [MachineVerifier] Add a new TiedOpsRewritten flag to fix verify two-address constraint error
Nemanja Ivanovic via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 2 06:03:50 PDT 2020
nemanjai accepted this revision.
nemanjai added a comment.
This revision is now accepted and ready to land.
The following sentence in the description is still incorrect:
We should verify two-address constraints after TwoAddressInstructionPass pass has been run, But in the MachineVerifier.cpp, we will
verify two-address constraints when the machine function is SSA, this is not correct.
I think it suffices for the description to just succinctly describe the problem. Something like:
Currently MachineVerifier will attempt to verify that tied operands satisfy register constraints
as soon as the function is no longer in SSA form. However, PHIElimination will take the
function out of SSA form while TwoAddressInstructionPass will actually rewrite tied operands
to match the constraints. PHIElimination runs first in the pipeline.
Therefore whenever the MachineVerifier is run after PHIElimination, it will encounter
verification errors on any tied operands.
This patch adds a function property called TiedOpsRewritten that will be set by
TwoAddressInstructionPass and will control when the verifier checks tied operands.
Other than that, LGTM.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D80538/new/
https://reviews.llvm.org/D80538
More information about the llvm-commits
mailing list