Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 0 additions & 19 deletions llvm/lib/Transforms/ObjCARC/ObjCARCContract.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -660,7 +660,6 @@ bool ObjCARCContract::run(Function &F, AAResults *A, DominatorTree *D) {
};

Value *Arg = cast<CallInst>(Inst)->getArgOperand(0);
Value *OrigArg = Arg;

// TODO: Change this to a do-while.
for (;;) {
Expand All @@ -687,24 +686,6 @@ bool ObjCARCContract::run(Function &F, AAResults *A, DominatorTree *D) {
break;
}
}

// Replace bitcast users of Arg that are dominated by Inst.
SmallVector<BitCastInst *, 2> BitCastUsers;

// Add all bitcast users of the function argument first.
for (User *U : OrigArg->users())
if (auto *BC = dyn_cast<BitCastInst>(U))
BitCastUsers.push_back(BC);

// Replace the bitcasts with the call return. Iterate until list is empty.
while (!BitCastUsers.empty()) {
auto *BC = BitCastUsers.pop_back_val();
for (User *U : BC->users())
if (auto *B = dyn_cast<BitCastInst>(U))
BitCastUsers.push_back(B);

ReplaceArgUses(BC);
}
}

// If this function has no escaping allocas or suspicious vararg usage,
Expand Down