Remove check for sub class of X86Inst from filter function since caller guaranteed it. Replace another sub class check with ShouldBeEmitted flag since it was factored in there already.

llvm-svn: 160949
This commit is contained in:
Craig Topper 2012-07-30 05:39:34 +00:00
parent b58dc17025
commit 6f4ad80dc8
1 changed files with 2 additions and 6 deletions

View File

@ -394,8 +394,7 @@ RecognizableInstr::filter_ret RecognizableInstr::filter() const {
// Filter out intrinsics
if (!Rec->isSubClassOf("X86Inst"))
return FILTER_STRONG;
assert(Rec->isSubClassOf("X86Inst") && "Can only filter X86 instructions");
if (Form == X86Local::Pseudo ||
(IsCodeGenOnly && Name.find("_REV") == Name.npos))
@ -544,7 +543,7 @@ void RecognizableInstr::handleOperand(bool optional, unsigned &operandIndex,
void RecognizableInstr::emitInstructionSpecifier(DisassemblerTables &tables) {
Spec->name = Name;
if (!Rec->isSubClassOf("X86Inst"))
if (!ShouldBeEmitted)
return;
switch (filter()) {
@ -587,9 +586,6 @@ void RecognizableInstr::emitInstructionSpecifier(DisassemblerTables &tables) {
}
}
if (!ShouldBeEmitted)
return;
#define HANDLE_OPERAND(class) \
handleOperand(false, \
operandIndex, \