From 7212f809662ea3d54974e5ab64f612fb138e3ec9 Mon Sep 17 00:00:00 2001 From: Daniel Dunbar Date: Thu, 30 Jul 2009 18:29:44 +0000 Subject: [PATCH] Remove unintended changes. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77616 91177308-0d34-0410-b5e6-96231b3b80d8 --- utils/TableGen/AsmMatcherEmitter.cpp | 51 ---------------------------- 1 file changed, 51 deletions(-) diff --git a/utils/TableGen/AsmMatcherEmitter.cpp b/utils/TableGen/AsmMatcherEmitter.cpp index 45a1c8622aa..d00ff202ad0 100644 --- a/utils/TableGen/AsmMatcherEmitter.cpp +++ b/utils/TableGen/AsmMatcherEmitter.cpp @@ -17,32 +17,6 @@ #include "Record.h" using namespace llvm; -static std::string FlattenVariants(const std::string &AsmString, - unsigned Index) { - StringRef Cur = AsmString; - std::string Res = ""; - - for (;;) { - std::pair Split = Cur.split('{'); - - Res += Split.first; - if (Split.second.empty()) - break; - - std::pair Inner = Cur.split('}'); - StringRef Selection = Inner.first; - for (unsigned i = 0; i != Index; ++i) - Selection = Selection.split('|').second; - Selection = Selection.split('|').first; - - Res += Selection; - - Cur = Inner.second; - } - - return Res; -} - void AsmMatcherEmitter::run(raw_ostream &OS) { CodeGenTarget Target; const std::vector &Registers = Target.getRegisters(); @@ -70,29 +44,4 @@ void AsmMatcherEmitter::run(raw_ostream &OS) { } OS << " return true;\n"; OS << "}\n"; - - // Emit the function to match instructions. - std::vector NumberedInstructions; - Target.getInstructionsByEnumValue(NumberedInstructions); - - const std::map &Instructions = - Target.getInstructions(); - for (std::map::const_iterator - it = Instructions.begin(), ie = Instructions.end(); it != ie; ++it) { - const CodeGenInstruction &CGI = it->second; - - if (it->first != "SUB8rr") - continue; - - /* -def SUB8rr : I<0x28, MRMDestReg, (outs GR8:$dst), (ins GR8:$src1, GR8:$src2), - "sub{b}\t{$src2, $dst|$dst, $src2}", - [(set GR8:$dst, (sub GR8:$src1, GR8:$src2)), - (implicit EFLAGS)]>; - */ - - outs() << it->first << " " - << FlattenVariants(CGI.AsmString, 0) - << "\n"; - } }