aboutsummaryrefslogtreecommitdiff
path: root/llvm/utils/TableGen/FixedLenDecoderEmitter.cpp
diff options
context:
space:
mode:
authorCraig Topper <craig.topper@gmail.com>2012-03-16 00:56:01 +0000
committerCraig Topper <craig.topper@gmail.com>2012-03-16 00:56:01 +0000
commit93e6434ca9fe73a1097d916679e39f6aed6024e5 (patch)
tree9e503e5f957f089b54740862e53e4f5b7f5197b2 /llvm/utils/TableGen/FixedLenDecoderEmitter.cpp
parente06535b2f63f2c2fcc3082a9d5d29cce7415fd21 (diff)
downloadllvm-93e6434ca9fe73a1097d916679e39f6aed6024e5.zip
llvm-93e6434ca9fe73a1097d916679e39f6aed6024e5.tar.gz
llvm-93e6434ca9fe73a1097d916679e39f6aed6024e5.tar.bz2
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.
llvm-svn: 152885
Diffstat (limited to 'llvm/utils/TableGen/FixedLenDecoderEmitter.cpp')
-rw-r--r--llvm/utils/TableGen/FixedLenDecoderEmitter.cpp12
1 files changed, 3 insertions, 9 deletions
diff --git a/llvm/utils/TableGen/FixedLenDecoderEmitter.cpp b/llvm/utils/TableGen/FixedLenDecoderEmitter.cpp
index 524d756..5977eea 100644
--- a/llvm/utils/TableGen/FixedLenDecoderEmitter.cpp
+++ b/llvm/utils/TableGen/FixedLenDecoderEmitter.cpp
@@ -146,12 +146,8 @@ protected:
// 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 @@ protected:
///////////////////////////
// //
-// Filter Implmenetation //
+// Filter Implementation //
// //
///////////////////////////
@@ -395,7 +391,7 @@ Filter::Filter(const Filter &f) :
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 @@ Filter::Filter(FilterChooser &owner, unsigned startBit, unsigned numBits,
NumFiltered = 0;
LastOpcFiltered = 0;
- NumVariable = 0;
for (unsigned i = 0, e = Owner->Opcodes.size(); i != e; ++i) {
insn_t Insn;
@@ -424,10 +419,9 @@ Filter::Filter(FilterChooser &owner, unsigned startBit, unsigned numBits,
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;
}
}