[llvm] r279337 - MachineFunction: Make LastProperty an alias of the last property
Matthias Braun via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 19 15:31:42 PDT 2016
Author: matze
Date: Fri Aug 19 17:31:42 2016
New Revision: 279337
URL: http://llvm.org/viewvc/llvm-project?rev=279337&view=rev
Log:
MachineFunction: Make LastProperty an alias of the last property
This avoids unnecessary cases in switch statements covering all
properties.
Modified:
llvm/trunk/include/llvm/CodeGen/MachineFunction.h
llvm/trunk/lib/CodeGen/MachineFunction.cpp
Modified: llvm/trunk/include/llvm/CodeGen/MachineFunction.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/MachineFunction.h?rev=279337&r1=279336&r2=279337&view=diff
==============================================================================
--- llvm/trunk/include/llvm/CodeGen/MachineFunction.h (original)
+++ llvm/trunk/include/llvm/CodeGen/MachineFunction.h Fri Aug 19 17:31:42 2016
@@ -127,7 +127,7 @@ public:
Legalized,
RegBankSelected,
Selected,
- LastProperty,
+ LastProperty = Selected,
};
bool hasProperty(Property P) const {
@@ -161,7 +161,7 @@ public:
private:
BitVector Properties =
- BitVector(static_cast<unsigned>(Property::LastProperty));
+ BitVector(static_cast<unsigned>(Property::LastProperty)+1);
};
class MachineFunction {
Modified: llvm/trunk/lib/CodeGen/MachineFunction.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/MachineFunction.cpp?rev=279337&r1=279336&r2=279337&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/MachineFunction.cpp (original)
+++ llvm/trunk/lib/CodeGen/MachineFunction.cpp Fri Aug 19 17:31:42 2016
@@ -85,8 +85,6 @@ void MachineFunctionProperties::print(ra
case Property::Selected:
ROS << (HasProperty ? "" : "not ") << "selected";
break;
- default:
- break;
}
}
#endif
More information about the llvm-commits
mailing list