[llvm-commits] [llvm] r152885 - /llvm/trunk/utils/TableGen/FixedLenDecoderEmitter.cpp
Craig Topper
craig.topper at gmail.com
Thu Mar 15 17:56:01 PDT 2012
Author: ctopper
Date: Thu Mar 15 19:56:01 2012
New Revision: 152885
URL: http://llvm.org/viewvc/llvm-project?rev=152885&view=rev
Log:
Remove unused field NumVariable from Filter class. Even it was needed the same result could be found with VariableInstructions.size(). Also fix some typos in comments.
Modified:
llvm/trunk/utils/TableGen/FixedLenDecoderEmitter.cpp
Modified: llvm/trunk/utils/TableGen/FixedLenDecoderEmitter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/FixedLenDecoderEmitter.cpp?rev=152885&r1=152884&r2=152885&view=diff
==============================================================================
--- llvm/trunk/utils/TableGen/FixedLenDecoderEmitter.cpp (original)
+++ llvm/trunk/utils/TableGen/FixedLenDecoderEmitter.cpp Thu Mar 15 19:56:01 2012
@@ -146,12 +146,8 @@
// Keeps track of the last opcode in the filtered bucket.
unsigned LastOpcFiltered;
- // Number of instructions which fall under VariableInstructions category.
- unsigned NumVariable;
-
public:
unsigned getNumFiltered() { return NumFiltered; }
- unsigned getNumVariable() { return NumVariable; }
unsigned getSingletonOpc() {
assert(NumFiltered == 1);
return LastOpcFiltered;
@@ -386,7 +382,7 @@
///////////////////////////
// //
-// Filter Implmenetation //
+// Filter Implementation //
// //
///////////////////////////
@@ -395,7 +391,7 @@
FilteredInstructions(f.FilteredInstructions),
VariableInstructions(f.VariableInstructions),
FilterChooserMap(f.FilterChooserMap), NumFiltered(f.NumFiltered),
- LastOpcFiltered(f.LastOpcFiltered), NumVariable(f.NumVariable) {
+ LastOpcFiltered(f.LastOpcFiltered) {
}
Filter::Filter(FilterChooser &owner, unsigned startBit, unsigned numBits,
@@ -405,7 +401,6 @@
NumFiltered = 0;
LastOpcFiltered = 0;
- NumVariable = 0;
for (unsigned i = 0, e = Owner->Opcodes.size(); i != e; ++i) {
insn_t Insn;
@@ -424,10 +419,9 @@
FilteredInstructions[Field].push_back(LastOpcFiltered);
++NumFiltered;
} else {
- // Some of the encoding bit(s) are unspecfied. This contributes to
+ // Some of the encoding bit(s) are unspecified. This contributes to
// one additional member of "Variable" instructions.
VariableInstructions.push_back(Owner->Opcodes[i]);
- ++NumVariable;
}
}
More information about the llvm-commits
mailing list