diff options
author | Daniel Dunbar <daniel@zuster.org> | 2009-07-30 18:29:44 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2009-07-30 18:29:44 +0000 |
commit | 7212f809662ea3d54974e5ab64f612fb138e3ec9 (patch) | |
tree | 7eff4d504ed3989c2627e0e6e8497d5b82d84c9b /utils/TableGen | |
parent | 98c65173bb27e1df4ebe87f8c864d6dc197209ca (diff) | |
download | external_llvm-7212f809662ea3d54974e5ab64f612fb138e3ec9.zip external_llvm-7212f809662ea3d54974e5ab64f612fb138e3ec9.tar.gz external_llvm-7212f809662ea3d54974e5ab64f612fb138e3ec9.tar.bz2 |
Remove unintended changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77616 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils/TableGen')
-rw-r--r-- | utils/TableGen/AsmMatcherEmitter.cpp | 51 |
1 files changed, 0 insertions, 51 deletions
diff --git a/utils/TableGen/AsmMatcherEmitter.cpp b/utils/TableGen/AsmMatcherEmitter.cpp index 45a1c86..d00ff20 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<StringRef, StringRef> Split = Cur.split('{'); - - Res += Split.first; - if (Split.second.empty()) - break; - - std::pair<StringRef, StringRef> 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<CodeGenRegister> &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<const CodeGenInstruction*> NumberedInstructions; - Target.getInstructionsByEnumValue(NumberedInstructions); - - const std::map<std::string, CodeGenInstruction> &Instructions = - Target.getInstructions(); - for (std::map<std::string, CodeGenInstruction>::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"; - } } |