diff options
author | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2012-01-13 03:16:35 +0000 |
---|---|---|
committer | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2012-01-13 03:16:35 +0000 |
commit | 9d1c5eeb322565140d67338fac25db3bfc6770a8 (patch) | |
tree | 5105cf7c373b5c880505e99389623d22d9e1a1eb /llvm/lib/TableGen/TGParser.cpp | |
parent | c8002429e52856e7d1abac4ff9278dafd8399940 (diff) | |
download | bcm5719-llvm-9d1c5eeb322565140d67338fac25db3bfc6770a8.tar.gz bcm5719-llvm-9d1c5eeb322565140d67338fac25db3bfc6770a8.zip |
Use uniqued StringInit pointers for lookups.
This avoids a gazillion StringMap and dynamic_cast calls, making
TableGen run 3x faster.
llvm-svn: 148091
Diffstat (limited to 'llvm/lib/TableGen/TGParser.cpp')
-rw-r--r-- | llvm/lib/TableGen/TGParser.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/TableGen/TGParser.cpp b/llvm/lib/TableGen/TGParser.cpp index 8bcb029cbcf..5c13af18c6f 100644 --- a/llvm/lib/TableGen/TGParser.cpp +++ b/llvm/lib/TableGen/TGParser.cpp @@ -64,7 +64,7 @@ bool TGParser::AddValue(Record *CurRec, SMLoc Loc, const RecordVal &RV) { if (CurRec == 0) CurRec = &CurMultiClass->Rec; - if (RecordVal *ERV = CurRec->getValue(RV.getName())) { + if (RecordVal *ERV = CurRec->getValue(RV.getNameInit())) { // The value already exists in the class, treat this as a set. if (ERV->setValue(RV.getValue())) return Error(Loc, "New definition of '" + RV.getName() + "' of type '" + |