diff options
author | Quentin Colombet <qcolombet@apple.com> | 2016-08-26 22:09:11 +0000 |
---|---|---|
committer | Quentin Colombet <qcolombet@apple.com> | 2016-08-26 22:09:11 +0000 |
commit | e609a9a80a1dcf8d4eb95a679972e22c5aa0c8cb (patch) | |
tree | 60918f69c86961dabfea843214fe30b0f9d69a67 | |
parent | c437aa9c262137ce936ae085364ae627b22cfa9b (diff) | |
download | bcm5719-llvm-e609a9a80a1dcf8d4eb95a679972e22c5aa0c8cb.tar.gz bcm5719-llvm-e609a9a80a1dcf8d4eb95a679972e22c5aa0c8cb.zip |
[MFProperties] Introduce a reset method with no argument.
This method allows to reset all the properties in one go.
llvm-svn: 279874
-rw-r--r-- | llvm/include/llvm/CodeGen/MachineFunction.h | 5 | ||||
-rw-r--r-- | llvm/lib/CodeGen/MIRParser/MIRParser.cpp | 2 |
2 files changed, 6 insertions, 1 deletions
diff --git a/llvm/include/llvm/CodeGen/MachineFunction.h b/llvm/include/llvm/CodeGen/MachineFunction.h index f6af0363b3a..ad72e84c07d 100644 --- a/llvm/include/llvm/CodeGen/MachineFunction.h +++ b/llvm/include/llvm/CodeGen/MachineFunction.h @@ -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; diff --git a/llvm/lib/CodeGen/MIRParser/MIRParser.cpp b/llvm/lib/CodeGen/MIRParser/MIRParser.cpp index 4e9cd8b4493..6dae8b84d37 100644 --- a/llvm/lib/CodeGen/MIRParser/MIRParser.cpp +++ b/llvm/lib/CodeGen/MIRParser/MIRParser.cpp @@ -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) |