Lines Matching defs:RK
55 RecordKeeperImpl(RecordKeeper &RK)
56 : SharedBitRecTy(RK), SharedIntRecTy(RK), SharedStringRecTy(RK),
57 SharedDagRecTy(RK), AnyRecord(RK, 0), TheUnsetInit(RK),
142 ListTy = new (RK.getImpl().Allocator) ListRecTy(this);
153 const BitRecTy *BitRecTy::get(RecordKeeper &RK) {
154 return &RK.getImpl().SharedBitRecTy;
165 const BitsRecTy *BitsRecTy::get(RecordKeeper &RK, unsigned Sz) {
166 detail::RecordKeeperImpl &RKImpl = RK.getImpl();
171 Ty = new (RKImpl.Allocator) BitsRecTy(RK, Sz);
186 const IntRecTy *IntRecTy::get(RecordKeeper &RK) {
187 return &RK.getImpl().SharedIntRecTy;
195 const StringRecTy *StringRecTy::get(RecordKeeper &RK) {
196 return &RK.getImpl().SharedStringRecTy;
224 const DagRecTy *DagRecTy::get(RecordKeeper &RK) {
225 return &RK.getImpl().SharedDagRecTy;
239 const RecordRecTy *RecordRecTy::get(RecordKeeper &RK,
241 detail::RecordKeeperImpl &RKImpl = RK.getImpl();
271 RecordRecTy *Ty = new (Mem) RecordRecTy(RK, Classes.size());
391 UnsetInit *UnsetInit::get(RecordKeeper &RK) {
392 return &RK.getImpl().TheUnsetInit;
420 RecordKeeper &RK = Value->getRecordKeeper();
421 detail::RecordKeeperImpl &RKImpl = RK.getImpl();
440 BitInit *BitInit::get(RecordKeeper &RK, bool V) {
441 return V ? &RK.getImpl().TrueBitInit : &RK.getImpl().FalseBitInit;
468 BitsInit *BitsInit::get(RecordKeeper &RK, ArrayRef<const Init *> Range) {
472 detail::RecordKeeperImpl &RKImpl = RK.getImpl();
479 BitsInit *I = new (Mem) BitsInit(RK, Range.size());
591 IntInit *IntInit::get(RecordKeeper &RK, int64_t V) {
592 IntInit *&I = RK.getImpl().TheIntInitPool[V];
594 I = new (RK.getImpl().Allocator) IntInit(RK, V);
648 AnonymousNameInit *AnonymousNameInit::get(RecordKeeper &RK, unsigned V) {
649 return new (RK.getImpl().Allocator) AnonymousNameInit(RK, V);
670 const StringInit *StringInit::get(RecordKeeper &RK, StringRef V,
672 detail::RecordKeeperImpl &RKImpl = RK.getImpl();
677 Entry.second = new (RKImpl.Allocator) StringInit(RK, Entry.getKey(), Fmt);
702 detail::RecordKeeperImpl &RK = EltTy->getRecordKeeper().getImpl();
704 if (const ListInit *I = RK.TheListInitPool.FindNodeOrInsertPos(ID, IP))
710 void *Mem = RK.Allocator.Allocate(
715 RK.TheListInitPool.InsertNode(I, IP);
821 detail::RecordKeeperImpl &RK = Type->getRecordKeeper().getImpl();
823 if (const UnOpInit *I = RK.TheUnOpInitPool.FindNodeOrInsertPos(ID, IP))
826 UnOpInit *I = new (RK.Allocator) UnOpInit(Opc, LHS, Type);
827 RK.TheUnOpInitPool.InsertNode(I, IP);
836 RecordKeeper &RK = getRecordKeeper();
845 return StringInit::get(RK, S);
852 return StringInit::get(RK, LHS->getAsString());
858 return StringInit::get(RK, LHSs->getValue().lower());
862 return StringInit::get(RK, LHSs->getValue().upper());
870 return StringInit::get(RK, LHSd->getAsString());
873 LHS->convertInitializerTo(IntRecTy::get(RK))))
874 return StringInit::get(RK, LHSi->getAsString());
878 const Record *D = RK.getDef(Name->getValue());
923 return IntInit::get(RK, 0);
925 return IntInit::get(RK, 1);
930 LHS->convertInitializerTo(IntRecTy::get(RK))))
931 return IntInit::get(RK, LHSi->getValue() ? 0 : 1);
952 return IntInit::get(RK, LHSl->size());
954 return IntInit::get(RK, LHSd->arg_size());
956 return IntInit::get(RK, LHSs->getValue().size());
961 return IntInit::get(RK, LHSl->empty());
963 return IntInit::get(RK, LHSd->arg_empty());
965 return IntInit::get(RK, LHSs->getValue().empty());
986 LHS->convertInitializerTo(IntRecTy::get(RK)))) {
996 return IntInit::get(RK, static_cast<int64_t>(Log));
1084 detail::RecordKeeperImpl &RK = LHS->getRecordKeeper().getImpl();
1086 if (const BinOpInit *I = RK.TheBinOpInitPool.FindNodeOrInsertPos(ID, IP))
1089 BinOpInit *I = new (RK.Allocator) BinOpInit(Opc, LHS, RHS, Type);
1090 RK.TheBinOpInitPool.InsertNode(I, IP);
1130 RecordKeeper &RK = List->getRecordKeeper();
1132 return StringInit::get(RK, "");
1134 List->getElement(0)->convertInitializerTo(IntRecTy::get(RK)));
1142 List->getElement(I)->convertInitializerTo(IntRecTy::get(RK)));
1147 return StringInit::get(RK, Result);
1639 detail::RecordKeeperImpl &RK = LHS->getRecordKeeper().getImpl();
1641 if (TernOpInit *I = RK.TheTernOpInitPool.FindNodeOrInsertPos(ID, IP))
1644 TernOpInit *I = new (RK.Allocator) TernOpInit(Opc, LHS, MHS, RHS, Type);
1645 RK.TheTernOpInitPool.InsertNode(I, IP);
1737 RecordKeeper &RK = getRecordKeeper();
1778 return StringInit::get(RK, Val);
1797 LHS->convertInitializerTo(IntRecTy::get(RK)))) {
1818 const Init *Node = MHSl ? MHSl->getElement(i) : UnsetInit::get(RK);
1819 const Init *Name = RHSl ? RHSl->getElement(i) : UnsetInit::get(RK);
1872 return StringInit::get(RK, LHSs->getValue().substr(Start, Length),
1892 return IntInit::get(RK, -1);
1893 return IntInit::get(RK, I);
2011 detail::RecordKeeperImpl &RK = Start->getRecordKeeper().getImpl();
2013 if (const FoldOpInit *I = RK.TheFoldOpInitPool.FindNodeOrInsertPos(ID, IP))
2016 FoldOpInit *I = new (RK.Allocator) FoldOpInit(Start, List, A, B, Expr, Type);
2017 RK.TheFoldOpInitPool.InsertNode(I, IP);
2076 detail::RecordKeeperImpl &RK = Expr->getRecordKeeper().getImpl();
2078 if (const IsAOpInit *I = RK.TheIsAOpInitPool.FindNodeOrInsertPos(ID, IP))
2081 IsAOpInit *I = new (RK.Allocator) IsAOpInit(CheckType, Expr);
2082 RK.TheIsAOpInitPool.InsertNode(I, IP);
2138 detail::RecordKeeperImpl &RK = Expr->getRecordKeeper().getImpl();
2141 RK.TheExistsOpInitPool.FindNodeOrInsertPos(ID, IP))
2144 ExistsOpInit *I = new (RK.Allocator) ExistsOpInit(CheckType, Expr);
2145 RK.TheExistsOpInitPool.InsertNode(I, IP);
2263 detail::RecordKeeperImpl &RK = T->getRecordKeeper().getImpl();
2264 VarInit *&I = RK.TheVarInitPool[{T, VN}];
2266 I = new (RK.Allocator) VarInit(VN, T);
2288 detail::RecordKeeperImpl &RK = T->getRecordKeeper().getImpl();
2289 VarBitInit *&I = RK.TheVarBitInitPool[{T, B}];
2291 I = new (RK.Allocator) VarBitInit(T, B);
2343 detail::RecordKeeperImpl &RK = Class->getRecords().getImpl();
2345 if (const VarDefInit *I = RK.TheVarDefInitPool.FindNodeOrInsertPos(ID, IP))
2348 void *Mem = RK.Allocator.Allocate(
2353 RK.TheVarDefInitPool.InsertNode(I, IP);
2464 detail::RecordKeeperImpl &RK = R->getRecordKeeper().getImpl();
2465 FieldInit *&I = RK.TheFieldInitPool[{R, FN}];
2467 I = new (RK.Allocator) FieldInit(R, FN);
2539 detail::RecordKeeperImpl &RK = Ty->getRecordKeeper().getImpl();
2541 if (const CondOpInit *I = RK.TheCondOpInitPool.FindNodeOrInsertPos(ID, IP))
2544 void *Mem = RK.Allocator.Allocate(
2553 RK.TheCondOpInitPool.InsertNode(I, IP);
2581 RecordKeeper &RK = getRecordKeeper();
2587 Cond->convertInitializerTo(IntRecTy::get(RK)))) {
2665 detail::RecordKeeperImpl &RK = V->getRecordKeeper().getImpl();
2667 if (const DagInit *I = RK.TheDagInitPool.FindNodeOrInsertPos(ID, IP))
2671 RK.Allocator.Allocate(totalSizeToAlloc<const Init *, const StringInit *>(
2679 RK.TheDagInitPool.InsertNode(I, IP);
2890 unsigned Record::getNewUID(RecordKeeper &RK) {
2891 return RK.getImpl().LastRecordID++;
3275 raw_ostream &llvm::operator<<(raw_ostream &OS, const RecordKeeper &RK) {
3277 for (const auto &C : RK.getClasses())
3281 for (const auto &D : RK.getDefs())