Lines Matching defs:RK

54   RecordKeeperImpl(RecordKeeper &RK)
55 : SharedBitRecTy(RK), SharedIntRecTy(RK), SharedStringRecTy(RK),
56 SharedDagRecTy(RK), AnyRecord(RK, 0), TheUnsetInit(RK),
109 ListTy = new (RK.getImpl().Allocator) ListRecTy(this);
120 BitRecTy *BitRecTy::get(RecordKeeper &RK) {
121 return &RK.getImpl().SharedBitRecTy;
132 BitsRecTy *BitsRecTy::get(RecordKeeper &RK, unsigned Sz) {
133 detail::RecordKeeperImpl &RKImpl = RK.getImpl();
138 Ty = new (RKImpl.Allocator) BitsRecTy(RK, Sz);
153 IntRecTy *IntRecTy::get(RecordKeeper &RK) {
154 return &RK.getImpl().SharedIntRecTy;
162 StringRecTy *StringRecTy::get(RecordKeeper &RK) {
163 return &RK.getImpl().SharedStringRecTy;
191 DagRecTy *DagRecTy::get(RecordKeeper &RK) {
192 return &RK.getImpl().SharedDagRecTy;
206 RecordRecTy *RecordRecTy::get(RecordKeeper &RK,
208 detail::RecordKeeperImpl &RKImpl = RK.getImpl();
239 RecordRecTy *Ty = new (Mem) RecordRecTy(RK, Classes.size());
358 UnsetInit *UnsetInit::get(RecordKeeper &RK) {
359 return &RK.getImpl().TheUnsetInit;
389 RecordKeeper &RK = Value->getRecordKeeper();
390 detail::RecordKeeperImpl &RKImpl = RK.getImpl();
408 BitInit *BitInit::get(RecordKeeper &RK, bool V) {
409 return V ? &RK.getImpl().TrueBitInit : &RK.getImpl().FalseBitInit;
436 BitsInit *BitsInit::get(RecordKeeper &RK, ArrayRef<Init *> Range) {
440 detail::RecordKeeperImpl &RKImpl = RK.getImpl();
447 BitsInit *I = new (Mem) BitsInit(RK, Range.size());
553 IntInit *IntInit::get(RecordKeeper &RK, int64_t V) {
554 IntInit *&I = RK.getImpl().TheIntInitPool[V];
556 I = new (RK.getImpl().Allocator) IntInit(RK, V);
611 AnonymousNameInit *AnonymousNameInit::get(RecordKeeper &RK, unsigned V) {
612 return new (RK.getImpl().Allocator) AnonymousNameInit(RK, V);
633 StringInit *StringInit::get(RecordKeeper &RK, StringRef V, StringFormat Fmt) {
634 detail::RecordKeeperImpl &RKImpl = RK.getImpl();
639 Entry.second = new (RKImpl.Allocator) StringInit(RK, Entry.getKey(), Fmt);
664 detail::RecordKeeperImpl &RK = EltTy->getRecordKeeper().getImpl();
666 if (ListInit *I = RK.TheListInitPool.FindNodeOrInsertPos(ID, IP))
672 void *Mem = RK.Allocator.Allocate(totalSizeToAlloc<Init *>(Range.size()),
677 RK.TheListInitPool.InsertNode(I, IP);
783 detail::RecordKeeperImpl &RK = Type->getRecordKeeper().getImpl();
785 if (UnOpInit *I = RK.TheUnOpInitPool.FindNodeOrInsertPos(ID, IP))
788 UnOpInit *I = new (RK.Allocator) UnOpInit(Opc, LHS, Type);
789 RK.TheUnOpInitPool.InsertNode(I, IP);
798 RecordKeeper &RK = getRecordKeeper();
808 return StringInit::get(RK, S);
815 return StringInit::get(RK, LHS->getAsString());
821 return StringInit::get(RK, LHSs->getValue().lower());
825 return StringInit::get(RK, LHSs->getValue().upper());
833 return StringInit::get(RK, LHSd->getAsString());
836 LHS->convertInitializerTo(IntRecTy::get(RK))))
837 return StringInit::get(RK, LHSi->getAsString());
841 Record *D = RK.getDef(Name->getValue());
886 LHS->convertInitializerTo(IntRecTy::get(RK))))
887 return IntInit::get(RK, LHSi->getValue() ? 0 : 1);
908 return IntInit::get(RK, LHSl->size());
910 return IntInit::get(RK, LHSd->arg_size());
912 return IntInit::get(RK, LHSs->getValue().size());
917 return IntInit::get(RK, LHSl->empty());
919 return IntInit::get(RK, LHSd->arg_empty());
921 return IntInit::get(RK, LHSs->getValue().empty());
942 LHS->convertInitializerTo(IntRecTy::get(RK)))) {
952 return IntInit::get(RK, static_cast<int64_t>(Log));
1006 detail::RecordKeeperImpl &RK = LHS->getRecordKeeper().getImpl();
1008 if (BinOpInit *I = RK.TheBinOpInitPool.FindNodeOrInsertPos(ID, IP))
1011 BinOpInit *I = new (RK.Allocator) BinOpInit(Opc, LHS, RHS, Type);
1012 RK.TheBinOpInitPool.InsertNode(I, IP);
1052 RecordKeeper &RK = List->getRecordKeeper();
1054 return StringInit::get(RK, "");
1056 List->getElement(0)->convertInitializerTo(IntRecTy::get(RK)));
1064 List->getElement(I)->convertInitializerTo(IntRecTy::get(RK)));
1069 return StringInit::get(RK, Result);
1543 detail::RecordKeeperImpl &RK = LHS->getRecordKeeper().getImpl();
1545 if (TernOpInit *I = RK.TheTernOpInitPool.FindNodeOrInsertPos(ID, IP))
1548 TernOpInit *I = new (RK.Allocator) TernOpInit(Opc, LHS, MHS, RHS, Type);
1549 RK.TheTernOpInitPool.InsertNode(I, IP);
1638 RecordKeeper &RK = getRecordKeeper();
1679 return StringInit::get(RK, Val);
1698 LHS->convertInitializerTo(IntRecTy::get(RK)))) {
1719 Init *Node = MHSl ? MHSl->getElement(i) : UnsetInit::get(RK);
1720 Init *Name = RHSl ? RHSl->getElement(i) : UnsetInit::get(RK);
1773 return StringInit::get(RK, LHSs->getValue().substr(Start, Length),
1793 return IntInit::get(RK, -1);
1794 return IntInit::get(RK, I);
1910 detail::RecordKeeperImpl &RK = Start->getRecordKeeper().getImpl();
1912 if (FoldOpInit *I = RK.TheFoldOpInitPool.FindNodeOrInsertPos(ID, IP))
1915 FoldOpInit *I = new (RK.Allocator) FoldOpInit(Start, List, A, B, Expr, Type);
1916 RK.TheFoldOpInitPool.InsertNode(I, IP);
1975 detail::RecordKeeperImpl &RK = Expr->getRecordKeeper().getImpl();
1977 if (IsAOpInit *I = RK.TheIsAOpInitPool.FindNodeOrInsertPos(ID, IP))
1980 IsAOpInit *I = new (RK.Allocator) IsAOpInit(CheckType, Expr);
1981 RK.TheIsAOpInitPool.InsertNode(I, IP);
2036 detail::RecordKeeperImpl &RK = Expr->getRecordKeeper().getImpl();
2038 if (ExistsOpInit *I = RK.TheExistsOpInitPool.FindNodeOrInsertPos(ID, IP))
2041 ExistsOpInit *I = new (RK.Allocator) ExistsOpInit(CheckType, Expr);
2042 RK.TheExistsOpInitPool.InsertNode(I, IP);
2163 detail::RecordKeeperImpl &RK = T->getRecordKeeper().getImpl();
2164 VarInit *&I = RK.TheVarInitPool[std::make_pair(T, VN)];
2166 I = new (RK.Allocator) VarInit(VN, T);
2188 detail::RecordKeeperImpl &RK = T->getRecordKeeper().getImpl();
2189 VarBitInit *&I = RK.TheVarBitInitPool[std::make_pair(T, B)];
2191 I = new (RK.Allocator) VarBitInit(T, B);
2246 detail::RecordKeeperImpl &RK = Class->getRecords().getImpl();
2248 if (VarDefInit *I = RK.TheVarDefInitPool.FindNodeOrInsertPos(ID, IP))
2251 void *Mem = RK.Allocator.Allocate(
2256 RK.TheVarDefInitPool.InsertNode(I, IP);
2371 detail::RecordKeeperImpl &RK = R->getRecordKeeper().getImpl();
2372 FieldInit *&I = RK.TheFieldInitPool[std::make_pair(R, FN)];
2374 I = new (RK.Allocator) FieldInit(R, FN);
2444 detail::RecordKeeperImpl &RK = Ty->getRecordKeeper().getImpl();
2446 if (CondOpInit *I = RK.TheCondOpInitPool.FindNodeOrInsertPos(ID, IP))
2449 void *Mem = RK.Allocator.Allocate(
2457 RK.TheCondOpInitPool.InsertNode(I, IP);
2485 RecordKeeper &RK = getRecordKeeper();
2491 Cond->convertInitializerTo(IntRecTy::get(RK)))) {
2567 detail::RecordKeeperImpl &RK = V->getRecordKeeper().getImpl();
2569 if (DagInit *I = RK.TheDagInitPool.FindNodeOrInsertPos(ID, IP))
2572 void *Mem = RK.Allocator.Allocate(
2580 RK.TheDagInitPool.InsertNode(I, IP);
2791 unsigned Record::getNewUID(RecordKeeper &RK) {
2792 return RK.getImpl().LastRecordID++;
3165 raw_ostream &llvm::operator<<(raw_ostream &OS, const RecordKeeper &RK) {
3167 for (const auto &C : RK.getClasses())
3171 for (const auto &D : RK.getDefs())