diff options
| author | Daniel Dunbar <daniel@zuster.org> | 2009-08-08 07:50:56 +0000 |
|---|---|---|
| committer | Daniel Dunbar <daniel@zuster.org> | 2009-08-08 07:50:56 +0000 |
| commit | a3741fa28b1a397ebfd623ef9d14e978df94ce47 (patch) | |
| tree | 13d45175a09a0f75b0da9b7ca7c865ae74f499ca /lib | |
| parent | b6ab51e8297281888b85eee8c38215eab2649c4b (diff) | |
llvm-mc/AsmMatcher: Improve match code.
- This doesn't actually improve the algorithm (its still linear), but the
generated (match) code is now fairly compact and table driven. Still need a
generic string matcher.
- The table still needs to be compressed, this is quite simple to do and should
shrink it to under 16k.
- This also simplifies and restructures the code to make the match classes more
explicit, in anticipation of resolving ambiguities.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78461 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/Target/X86/AsmParser/X86AsmParser.cpp | 24 |
1 files changed, 1 insertions, 23 deletions
diff --git a/lib/Target/X86/AsmParser/X86AsmParser.cpp b/lib/Target/X86/AsmParser/X86AsmParser.cpp index 62cce47072..841b42743f 100644 --- a/lib/Target/X86/AsmParser/X86AsmParser.cpp +++ b/lib/Target/X86/AsmParser/X86AsmParser.cpp @@ -131,9 +131,7 @@ struct X86Operand { return Mem.Scale; } - bool isToken(const StringRef &Str) const { - return Kind == Token && Str == getToken(); - } + bool isToken() const {return Kind == Token; } bool isImm() const { return Kind == Immediate; } @@ -417,24 +415,4 @@ extern "C" void LLVMInitializeX86AsmParser() { RegisterAsmParser<X86ATTAsmParser> Y(TheX86_64Target); } -// FIXME: Disabled for now, this is causing gcc-4.0 to run out of memory during -// building. -#if 0 - #include "X86GenAsmMatcher.inc" - -#else - -bool X86ATTAsmParser::MatchInstruction(SmallVectorImpl<X86Operand> &Operands, - MCInst &Inst) { - return false; -} - -bool X86ATTAsmParser::MatchRegisterName(const StringRef &Name, - unsigned &RegNo) { - RegNo = 1; - return false; -} - -#endif - |
