From: Matt Arsenault Date: Mon, 25 Feb 2019 20:00:25 +0000 (+0000) Subject: GlobalISel: Make legalizer/regbankselect clear NoPHIs property X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8b22d53aad4a7147a4613528031f75a8e88475b8;p=llvm GlobalISel: Make legalizer/regbankselect clear NoPHIs property If no phi existed in the original MIR and these introduced one, the verifier would fail. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@354813 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/llvm/CodeGen/GlobalISel/Legalizer.h b/include/llvm/CodeGen/GlobalISel/Legalizer.h index 01816509d4d..13cf3f7e694 100644 --- a/include/llvm/CodeGen/GlobalISel/Legalizer.h +++ b/include/llvm/CodeGen/GlobalISel/Legalizer.h @@ -54,6 +54,11 @@ public: MachineFunctionProperties::Property::Legalized); } + MachineFunctionProperties getClearedProperties() const override { + return MachineFunctionProperties() + .set(MachineFunctionProperties::Property::NoPHIs); + } + bool combineExtracts(MachineInstr &MI, MachineRegisterInfo &MRI, const TargetInstrInfo &TII); diff --git a/include/llvm/CodeGen/GlobalISel/RegBankSelect.h b/include/llvm/CodeGen/GlobalISel/RegBankSelect.h index c31ca5c537e..e704ce44779 100644 --- a/include/llvm/CodeGen/GlobalISel/RegBankSelect.h +++ b/include/llvm/CodeGen/GlobalISel/RegBankSelect.h @@ -633,6 +633,11 @@ public: MachineFunctionProperties::Property::RegBankSelected); } + MachineFunctionProperties getClearedProperties() const override { + return MachineFunctionProperties() + .set(MachineFunctionProperties::Property::NoPHIs); + } + /// Walk through \p MF and assign a register bank to every virtual register /// that are still mapped to nothing. /// The target needs to provide a RegisterBankInfo and in particular