Lines Matching defs:GC

1 //===- RewriteStatepointsForGC.cpp - Make GC relocations explicit ---------===//
128 // Find the GC strategy for a function, or null if it doesn't have one.
247 GCPtrLivenessData &Data, GCStrategy *GC);
252 StatepointLiveSetTy &out, GCStrategy *GC);
254 static bool isGCPointerType(Type *T, GCStrategy *GC) {
255 assert(GC && "GC Strategy for isGCPointerType cannot be null");
261 return GC->isGCManagedPointer(T).value_or(true);
264 // Return true if this type is one which a) is a gc pointer or contains a GC
268 static bool isHandledGCPointerType(Type *T, GCStrategy *GC) {
270 if (isGCPointerType(T, GC))
275 if (isGCPointerType(VT->getElementType(), GC))
283 static bool containsGCPtrType(Type *Ty, GCStrategy *GC) {
284 if (isGCPointerType(Ty, GC))
287 return isGCPointerType(VT->getScalarType(), GC);
289 return containsGCPtrType(AT->getElementType(), GC);
292 [GC](Type *Ty) { return containsGCPtrType(Ty, GC); });
296 // Returns true if this is a type which a) is a gc pointer or contains a GC
299 static bool isUnhandledGCPointerType(Type *Ty, GCStrategy *GC) {
300 return containsGCPtrType(Ty, GC) && !isHandledGCPointerType(Ty, GC);
317 PartiallyConstructedSafepointRecord &Result, GCStrategy *GC) {
319 findLiveSetAtInst(Call, OriginalLivenessData, LiveSet, GC);
1346 GCStrategy *GC);
1351 PointerToBaseTy &PointerToBase, GCStrategy *GC) {
1355 computeLiveInValues(DT, F, RevisedLivenessData, GC);
1359 GC);
1500 IRBuilder<> &Builder, GCStrategy *GC) {
1521 assert(isHandledGCPointerType(Ty, GC));
1647 GCStrategy *GC) {
1720 // marked as "gc-leaf-function" should be lowered in a GC parseable way.
1727 // accommodate GC. The underlying source and destination objects might be
1728 // relocated during copy operation should the GC occur. To relocate the
1879 CreateGCRelocates(LiveVariables, BasePtrs, ExceptionalToken, Builder, GC);
1925 CreateGCRelocates(LiveVariables, BasePtrs, Token, Builder, GC);
1937 const PointerToBaseTy &PointerToBase, GCStrategy *GC) {
1954 PointerToBase, GC);
2087 // the gc.statepoint. This will turn some subtle GC problems into
2247 GCStrategy *GC) {
2249 computeLiveInValues(DT, F, OriginalLivenessData, GC);
2252 analyzeParsePointLiveness(DT, OriginalLivenessData, toUpdate[i], info, GC);
2650 std::unique_ptr<GCStrategy> GC = findGCStrategy(F);
2686 assert(!isUnhandledGCPointerType(Arg->getType(), GC.get()) &&
2688 if (isHandledGCPointerType(Arg->getType(), GC.get()))
2699 findLiveReferences(F, DT, ToUpdate, Records, GC.get());
2750 recomputeLiveInValues(F, DT, ToUpdate, Records, PointerToBase, GC.get());
2766 // because we assume they won't move at runtime and the GC doesn't need to be
2810 PointerToBase, GC.get());
2865 assert(isHandledGCPointerType(Ptr->getType(), GC.get()) &&
2992 /// Looks up the GC strategy for a given function, returning null if the
2993 /// function doesn't have a GC tag. The strategy is stored in the cache.
3009 assert(Strategy && "GC strategy is required by function, but was not found");
3190 SetVector<Value *> &LiveTmp, GCStrategy *GC) {
3202 assert(!isUnhandledGCPointerType(V->getType(), GC) &&
3204 if (isHandledGCPointerType(V->getType(), GC) && !isa<Constant>(V)) {
3222 GCStrategy *GC) {
3230 assert(!isUnhandledGCPointerType(V->getType(), GC) &&
3232 if (isHandledGCPointerType(V->getType(), GC) && !isa<Constant>(V))
3238 static SetVector<Value *> computeKillSet(BasicBlock *BB, GCStrategy *GC) {
3241 if (isHandledGCPointerType(I.getType(), GC))
3276 GCPtrLivenessData &Data, GCStrategy *GC) {
3281 Data.KillSet[&BB] = computeKillSet(&BB, GC);
3283 computeLiveInValues(BB.rbegin(), BB.rend(), Data.LiveSet[&BB], GC);
3291 computeLiveOutSeed(&BB, Data.LiveOut[&BB], GC);
3343 StatepointLiveSetTy &Out, GCStrategy *GC) {
3355 GC);
3364 GCStrategy *GC) {
3366 findLiveSetAtInst(Call, RevisedLivenessData, Updated, GC);