aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Target
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2009-08-08 07:50:56 +0000
committerDaniel Dunbar <daniel@zuster.org>2009-08-08 07:50:56 +0000
commit378bee99d113ad362c1b2deb780fd7e8f6dd5075 (patch)
tree13d45175a09a0f75b0da9b7ca7c865ae74f499ca /lib/Target
parentc1eaa4d40719e34857f514cf567ea3a373d30608 (diff)
downloadexternal_llvm-378bee99d113ad362c1b2deb780fd7e8f6dd5075.zip
external_llvm-378bee99d113ad362c1b2deb780fd7e8f6dd5075.tar.gz
external_llvm-378bee99d113ad362c1b2deb780fd7e8f6dd5075.tar.bz2
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/Target')
-rw-r--r--lib/Target/X86/AsmParser/X86AsmParser.cpp24
1 files changed, 1 insertions, 23 deletions
diff --git a/lib/Target/X86/AsmParser/X86AsmParser.cpp b/lib/Target/X86/AsmParser/X86AsmParser.cpp
index 62cce47..841b427 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
-