git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229976
91177308-0d34-0410-b5e6-
96231b3b80d8
if (LoadInst *LI = dyn_cast<LoadInst>(I)) {
if (LI->getType()->isPointerTy()) {
Value *Op = LI->getOperand(0);
if (LoadInst *LI = dyn_cast<LoadInst>(I)) {
if (LI->getType()->isPointerTy()) {
Value *Op = LI->getOperand(0);
// Has to be a pointer to an gc object, or possibly an array of such?
assert(Op->getType()->isPointerTy());
return LI; // The value loaded is an gc base itself
// Has to be a pointer to an gc object, or possibly an array of such?
assert(Op->getType()->isPointerTy());
return LI; // The value loaded is an gc base itself
} else {
// This is an invoke safepoint
InvokeInst *invoke = dyn_cast<InvokeInst>(bounds.first);
} else {
// This is an invoke safepoint
InvokeInst *invoke = dyn_cast<InvokeInst>(bounds.first);
assert(invoke && "only continues over invokes!");
assert(invoke->getNormalDest() == bounds.second->getParent() &&
"safepoint should continue into normal exit block");
assert(invoke && "only continues over invokes!");
assert(invoke->getNormalDest() == bounds.second->getParent() &&
"safepoint should continue into normal exit block");
Function *F = BB->getParent();
assert(F && "must be set");
Module *M = F->getParent();
Function *F = BB->getParent();
assert(F && "must be set");
Module *M = F->getParent();
assert(M && "must be set");
// We're not changing the function signature of the statepoint since the gc
assert(M && "must be set");
// We're not changing the function signature of the statepoint since the gc
// sanity check
for (auto ptr : live) {
assert(isGCPointerType(ptr->getType()) && "must be a gc pointer type");
}
// sanity check
for (auto ptr : live) {
assert(isGCPointerType(ptr->getType()) && "must be a gc pointer type");
}
relocationViaAlloca(F, DT, live, records);
return !records.empty();
relocationViaAlloca(F, DT, live, records);
return !records.empty();