[llvm] r279874 - [MFProperties] Introduce a reset method with no argument.
Quentin Colombet via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 26 15:09:12 PDT 2016
Author: qcolombet
Date: Fri Aug 26 17:09:11 2016
New Revision: 279874
URL: http://llvm.org/viewvc/llvm-project?rev=279874&view=rev
Log:
[MFProperties] Introduce a reset method with no argument.
This method allows to reset all the properties in one go.
Modified:
llvm/trunk/include/llvm/CodeGen/MachineFunction.h
llvm/trunk/lib/CodeGen/MIRParser/MIRParser.cpp
Modified: llvm/trunk/include/llvm/CodeGen/MachineFunction.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/MachineFunction.h?rev=279874&r1=279873&r2=279874&view=diff
==============================================================================
--- llvm/trunk/include/llvm/CodeGen/MachineFunction.h (original)
+++ llvm/trunk/include/llvm/CodeGen/MachineFunction.h Fri Aug 26 17:09:11 2016
@@ -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;
Modified: llvm/trunk/lib/CodeGen/MIRParser/MIRParser.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/MIRParser/MIRParser.cpp?rev=279874&r1=279873&r2=279874&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/MIRParser/MIRParser.cpp (original)
+++ llvm/trunk/lib/CodeGen/MIRParser/MIRParser.cpp Fri Aug 26 17:09:11 2016
@@ -311,7 +311,7 @@ void MIRParserImpl::computeFunctionPrope
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)
More information about the llvm-commits
mailing list