Lines Matching defs:GC

1 //===- RewriteStatepointsForGC.cpp - Make GC relocations explicit ---------===//
127 // Find the GC strategy for a function, or null if it doesn't have one.
246 GCPtrLivenessData &Data, GCStrategy *GC);
251 StatepointLiveSetTy &out, GCStrategy *GC);
253 static bool isGCPointerType(Type *T, GCStrategy *GC) {
254 assert(GC && "GC Strategy for isGCPointerType cannot be null");
260 return GC->isGCManagedPointer(T).value_or(true);
263 // Return true if this type is one which a) is a gc pointer or contains a GC
267 static bool isHandledGCPointerType(Type *T, GCStrategy *GC) {
269 if (isGCPointerType(T, GC))
274 if (isGCPointerType(VT->getElementType(), GC))
282 static bool containsGCPtrType(Type *Ty, GCStrategy *GC) {
283 if (isGCPointerType(Ty, GC))
286 return isGCPointerType(VT->getScalarType(), GC);
288 return containsGCPtrType(AT->getElementType(), GC);
291 [GC](Type *Ty) { return containsGCPtrType(Ty, GC); });
295 // Returns true if this is a type which a) is a gc pointer or contains a GC
298 static bool isUnhandledGCPointerType(Type *Ty, GCStrategy *GC) {
299 return containsGCPtrType(Ty, GC) && !isHandledGCPointerType(Ty, GC);
316 PartiallyConstructedSafepointRecord &Result, GCStrategy *GC) {
318 findLiveSetAtInst(Call, OriginalLivenessData, LiveSet, GC);
1353 GCStrategy *GC);
1358 PointerToBaseTy &PointerToBase, GCStrategy *GC) {
1362 computeLiveInValues(DT, F, RevisedLivenessData, GC);
1366 GC);
1507 IRBuilder<> &Builder, GCStrategy *GC) {
1528 assert(isHandledGCPointerType(Ty, GC));
1654 GCStrategy *GC) {
1727 // marked as "gc-leaf-function" should be lowered in a GC parseable way.
1734 // accommodate GC. The underlying source and destination objects might be
1735 // relocated during copy operation should the GC occur. To relocate the
1886 CreateGCRelocates(LiveVariables, BasePtrs, ExceptionalToken, Builder, GC);
1932 CreateGCRelocates(LiveVariables, BasePtrs, Token, Builder, GC);
1944 const PointerToBaseTy &PointerToBase, GCStrategy *GC) {
1961 PointerToBase, GC);
2094 // the gc.statepoint. This will turn some subtle GC problems into
2255 GCStrategy *GC) {
2257 computeLiveInValues(DT, F, OriginalLivenessData, GC);
2260 analyzeParsePointLiveness(DT, OriginalLivenessData, toUpdate[i], info, GC);
2659 std::unique_ptr<GCStrategy> GC = findGCStrategy(F);
2695 assert(!isUnhandledGCPointerType(Arg->getType(), GC.get()) &&
2697 if (isHandledGCPointerType(Arg->getType(), GC.get()))
2708 findLiveReferences(F, DT, ToUpdate, Records, GC.get());
2759 recomputeLiveInValues(F, DT, ToUpdate, Records, PointerToBase, GC.get());
2775 // because we assume they won't move at runtime and the GC doesn't need to be
2819 PointerToBase, GC.get());
2874 assert(isHandledGCPointerType(Ptr->getType(), GC.get()) &&
3001 /// Looks up the GC strategy for a given function, returning null if the
3002 /// function doesn't have a GC tag. The strategy is stored in the cache.
3018 assert(Strategy && "GC strategy is required by function, but was not found");
3198 SetVector<Value *> &LiveTmp, GCStrategy *GC) {
3210 assert(!isUnhandledGCPointerType(V->getType(), GC) &&
3212 if (isHandledGCPointerType(V->getType(), GC) && !isa<Constant>(V)) {
3230 GCStrategy *GC) {
3238 assert(!isUnhandledGCPointerType(V->getType(), GC) &&
3240 if (isHandledGCPointerType(V->getType(), GC) && !isa<Constant>(V))
3246 static SetVector<Value *> computeKillSet(BasicBlock *BB, GCStrategy *GC) {
3249 if (isHandledGCPointerType(I.getType(), GC))
3284 GCPtrLivenessData &Data, GCStrategy *GC) {
3289 Data.KillSet[&BB] = computeKillSet(&BB, GC);
3291 computeLiveInValues(BB.rbegin(), BB.rend(), Data.LiveSet[&BB], GC);
3299 computeLiveOutSeed(&BB, Data.LiveOut[&BB], GC);
3351 StatepointLiveSetTy &Out, GCStrategy *GC) {
3363 GC);
3372 GCStrategy *GC) {
3374 findLiveSetAtInst(Call, RevisedLivenessData, Updated, GC);