diff options
author | Kang Zhang <shkzhang@cn.ibm.com> | 2020-06-09 07:39:42 +0000 |
---|---|---|
committer | Kang Zhang <shkzhang@cn.ibm.com> | 2020-06-09 07:39:42 +0000 |
commit | 1b6602275d3f902a91e2eab28f2ac506372d9065 (patch) | |
tree | 0e9a06f3ad551bb1bbb72789a21f10b9e0291a50 /llvm/lib/CodeGen/MachineFunction.cpp | |
parent | 09d098506bb9e39d3b0284331a039c8e86eec6e3 (diff) | |
download | llvm-1b6602275d3f902a91e2eab28f2ac506372d9065.zip llvm-1b6602275d3f902a91e2eab28f2ac506372d9065.tar.gz llvm-1b6602275d3f902a91e2eab28f2ac506372d9065.tar.bz2 |
[MachineVerifier] Add TiedOpsRewritten flag to fix verify two-address error
Summary:
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.
Reviewed By: nemanjai
Differential Revision: https://reviews.llvm.org/D80538
Diffstat (limited to 'llvm/lib/CodeGen/MachineFunction.cpp')
-rw-r--r-- | llvm/lib/CodeGen/MachineFunction.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/MachineFunction.cpp b/llvm/lib/CodeGen/MachineFunction.cpp index 3e57e3c..6d45f08 100644 --- a/llvm/lib/CodeGen/MachineFunction.cpp +++ b/llvm/lib/CodeGen/MachineFunction.cpp @@ -98,6 +98,7 @@ static const char *getPropertyName(MachineFunctionProperties::Property Prop) { case P::RegBankSelected: return "RegBankSelected"; case P::Selected: return "Selected"; case P::TracksLiveness: return "TracksLiveness"; + case P::TiedOpsRewritten: return "TiedOpsRewritten"; } llvm_unreachable("Invalid machine function property"); } |