Remove check for sub class of X86Inst from filter function since caller guaranteed...
authorCraig Topper <craig.topper@gmail.com>
Mon, 30 Jul 2012 05:39:34 +0000 (05:39 +0000)
committerCraig Topper <craig.topper@gmail.com>
Mon, 30 Jul 2012 05:39:34 +0000 (05:39 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160949 91177308-0d34-0410-b5e6-96231b3b80d8

utils/TableGen/X86RecognizableInstr.cpp

index e05ab4a9888e90a5a0948748e370b734f1ddc0f7..d2847a91c68b290c61600b06857252326584559b 100644 (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,               \