summaryrefslogtreecommitdiff
path: root/utils/TableGen/TGParser.h
diff options
context:
space:
mode:
authorJakob Stoklund Olesen <stoklund@2pi.dk>2011-07-18 17:02:57 +0000
committerJakob Stoklund Olesen <stoklund@2pi.dk>2011-07-18 17:02:57 +0000
commit77f8274c7d4bfb5e2a449eb49dc78dcae37e5457 (patch)
tree49292d4e5c83d913536a8d3021e83d965a6e5c4b /utils/TableGen/TGParser.h
parent22e522e08640be459f237796009cf7666d6d75e7 (diff)
downloadllvm-77f8274c7d4bfb5e2a449eb49dc78dcae37e5457.tar.gz
llvm-77f8274c7d4bfb5e2a449eb49dc78dcae37e5457.tar.bz2
llvm-77f8274c7d4bfb5e2a449eb49dc78dcae37e5457.tar.xz
Intern all RecTy subclass instances to avoid duplicates.
Make all of the RecTy constructors private, and use get() factory methods instead. Return singleton instances when it makes sense. ListTy instance pointers are stored in the element RecTy instance. BitsRecTy instance pointers, one per length, are stored in a static vector. Also unique DefInit instances. A Record has a unique DefInit which has a unique RecordRecTy instance. This saves some 200k-300k RecTy allocations when parsing ARM.td. It reduces TableGen's heap usage by almost 50%. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135399 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils/TableGen/TGParser.h')
-rw-r--r--utils/TableGen/TGParser.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/utils/TableGen/TGParser.h b/utils/TableGen/TGParser.h
index dce7e1dec9..8b56b8a329 100644
--- a/utils/TableGen/TGParser.h
+++ b/utils/TableGen/TGParser.h
@@ -24,7 +24,7 @@ namespace llvm {
class Record;
class RecordVal;
class RecordKeeper;
- struct RecTy;
+ class RecTy;
class Init;
struct MultiClass;
struct SubClassReference;