aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/MachineVerifier.cpp
diff options
context:
space:
mode:
authorDenis Antrushin <dantrushin@gmail.com>2020-06-10 19:53:54 +0700
committerDenis Antrushin <dantrushin@gmail.com>2020-07-17 00:57:21 +0700
commitef658ebd6292f2c555ad774d68705d307c1f2fbf (patch)
treef389a724d69c0db7b21e8b41cc92be8844fe97da /llvm/lib/CodeGen/MachineVerifier.cpp
parentd909764cc763ae4cdf2125e0adfe288afa829f5b (diff)
downloadllvm-ef658ebd6292f2c555ad774d68705d307c1f2fbf.zip
llvm-ef658ebd6292f2c555ad774d68705d307c1f2fbf.tar.gz
llvm-ef658ebd6292f2c555ad774d68705d307c1f2fbf.tar.bz2
MIR Statepoint refactoring. Part 1: Basic MI level changes.
Basic support for variadic-def MIR Statepoint: - Change TableGen STATEPOINT description to variadic out list (For self-documentation purpose; by itself it does not affect code generation in any way). - Update StatepointOpers helper class to handle variadic defs. - Update MachineVerifier to properly handle them, too. With this change, new Statepoint instruction can be passed through backend (excluding ISEL) without errors. Full change set is available at D81603. Reviewed By: reames Differential Revision: https://reviews.llvm.org/D81645
Diffstat (limited to 'llvm/lib/CodeGen/MachineVerifier.cpp')
-rw-r--r--llvm/lib/CodeGen/MachineVerifier.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/MachineVerifier.cpp b/llvm/lib/CodeGen/MachineVerifier.cpp
index c1a2c4e..63f534f 100644
--- a/llvm/lib/CodeGen/MachineVerifier.cpp
+++ b/llvm/lib/CodeGen/MachineVerifier.cpp
@@ -1565,6 +1565,9 @@ MachineVerifier::visitMachineOperand(const MachineOperand *MO, unsigned MONum) {
if (MCID.getOpcode() == TargetOpcode::PATCHPOINT)
NumDefs = (MONum == 0 && MO->isReg()) ? NumDefs : 0;
+ if (MCID.getOpcode() == TargetOpcode::STATEPOINT)
+ NumDefs = MI->getNumDefs();
+
// The first MCID.NumDefs operands must be explicit register defines
if (MONum < NumDefs) {
const MCOperandInfo &MCOI = MCID.OpInfo[MONum];