[MFProperties] Introduce a reset method with no argument.
authorQuentin Colombet <qcolombet@apple.com>
Fri, 26 Aug 2016 22:09:11 +0000 (22:09 +0000)
committerQuentin Colombet <qcolombet@apple.com>
Fri, 26 Aug 2016 22:09:11 +0000 (22:09 +0000)
This method allows to reset all the properties in one go.

llvm-svn: 279874

llvm/include/llvm/CodeGen/MachineFunction.h
llvm/lib/CodeGen/MIRParser/MIRParser.cpp

index f6af036..ad72e84 100644 (file)
@@ -136,6 +136,11 @@ public:
     Properties.reset(static_cast<unsigned>(P));
     return *this;
   }
+  /// Reset all the properties.
+  MachineFunctionProperties &reset() {
+    Properties.reset();
+    return *this;
+  }
   MachineFunctionProperties &set(const MachineFunctionProperties &MFP) {
     Properties |= MFP.Properties;
     return *this;
index 4e9cd8b..6dae8b8 100644 (file)
@@ -311,7 +311,7 @@ void MIRParserImpl::computeFunctionProperties(MachineFunction &MF) {
   if (isSSA(MF))
     Properties.set(MachineFunctionProperties::Property::IsSSA);
   else
-    Properties.clear(MachineFunctionProperties::Property::IsSSA);
+    Properties.reset(MachineFunctionProperties::Property::IsSSA);
 
   const MachineRegisterInfo &MRI = MF.getRegInfo();
   if (MRI.getNumVirtRegs() == 0)