[llvm] r354813 - GlobalISel: Make legalizer/regbankselect clear NoPHIs property

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 25 12:00:25 PST 2019


Author: arsenm
Date: Mon Feb 25 12:00:25 2019
New Revision: 354813

URL: http://llvm.org/viewvc/llvm-project?rev=354813&view=rev
Log:
GlobalISel: Make legalizer/regbankselect clear NoPHIs property

If no phi existed in the original MIR and these introduced one, the
verifier would fail.

Modified:
    llvm/trunk/include/llvm/CodeGen/GlobalISel/Legalizer.h
    llvm/trunk/include/llvm/CodeGen/GlobalISel/RegBankSelect.h

Modified: llvm/trunk/include/llvm/CodeGen/GlobalISel/Legalizer.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/GlobalISel/Legalizer.h?rev=354813&r1=354812&r2=354813&view=diff
==============================================================================
--- llvm/trunk/include/llvm/CodeGen/GlobalISel/Legalizer.h (original)
+++ llvm/trunk/include/llvm/CodeGen/GlobalISel/Legalizer.h Mon Feb 25 12:00:25 2019
@@ -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);
 

Modified: llvm/trunk/include/llvm/CodeGen/GlobalISel/RegBankSelect.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/GlobalISel/RegBankSelect.h?rev=354813&r1=354812&r2=354813&view=diff
==============================================================================
--- llvm/trunk/include/llvm/CodeGen/GlobalISel/RegBankSelect.h (original)
+++ llvm/trunk/include/llvm/CodeGen/GlobalISel/RegBankSelect.h Mon Feb 25 12:00:25 2019
@@ -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




More information about the llvm-commits mailing list