CodeGen: Rename a variable to better fit LLVM style. NFC
llvm-svn: 279159
This commit is contained in:
parent
cf2f4b3251
commit
882f861cc7
|
@ -2468,7 +2468,7 @@ static llvm::Value *tryEmitFusedAutoreleaseOfResult(CodeGenFunction &CGF,
|
|||
// result is in a BasicBlock and is therefore an Instruction.
|
||||
llvm::Instruction *generator = cast<llvm::Instruction>(result);
|
||||
|
||||
SmallVector<llvm::Instruction*,4> insnsToKill;
|
||||
SmallVector<llvm::Instruction *, 4> InstsToKill;
|
||||
|
||||
// Look for:
|
||||
// %generator = bitcast %type1* %generator2 to %type2*
|
||||
|
@ -2481,7 +2481,7 @@ static llvm::Value *tryEmitFusedAutoreleaseOfResult(CodeGenFunction &CGF,
|
|||
if (generator->getNextNode() != bitcast)
|
||||
return nullptr;
|
||||
|
||||
insnsToKill.push_back(bitcast);
|
||||
InstsToKill.push_back(bitcast);
|
||||
}
|
||||
|
||||
// Look for:
|
||||
|
@ -2514,25 +2514,25 @@ static llvm::Value *tryEmitFusedAutoreleaseOfResult(CodeGenFunction &CGF,
|
|||
assert(isa<llvm::CallInst>(prev));
|
||||
assert(cast<llvm::CallInst>(prev)->getCalledValue() ==
|
||||
CGF.CGM.getObjCEntrypoints().retainAutoreleasedReturnValueMarker);
|
||||
insnsToKill.push_back(prev);
|
||||
InstsToKill.push_back(prev);
|
||||
}
|
||||
} else {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
result = call->getArgOperand(0);
|
||||
insnsToKill.push_back(call);
|
||||
InstsToKill.push_back(call);
|
||||
|
||||
// Keep killing bitcasts, for sanity. Note that we no longer care
|
||||
// about precise ordering as long as there's exactly one use.
|
||||
while (llvm::BitCastInst *bitcast = dyn_cast<llvm::BitCastInst>(result)) {
|
||||
if (!bitcast->hasOneUse()) break;
|
||||
insnsToKill.push_back(bitcast);
|
||||
InstsToKill.push_back(bitcast);
|
||||
result = bitcast->getOperand(0);
|
||||
}
|
||||
|
||||
// Delete all the unnecessary instructions, from latest to earliest.
|
||||
for (auto *I : insnsToKill)
|
||||
for (auto *I : InstsToKill)
|
||||
I->eraseFromParent();
|
||||
|
||||
// Do the fused retain/autorelease if we were asked to.
|
||||
|
|
Loading…
Reference in New Issue