[llvm] [IR] Replace of PointerType::getUnqual(Type) with opaque version (NFC) (PR #123909)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 23 00:13:44 PST 2025
================
@@ -1763,20 +1763,17 @@ void ObjCARCOpt::MoveCalls(Value *Arg, RRInfo &RetainsToMove,
SmallVectorImpl<Instruction *> &DeadInsts,
Module *M) {
Type *ArgTy = Arg->getType();
- Type *ParamTy = PointerType::getUnqual(Type::getInt8Ty(ArgTy->getContext()));
+ Type *ParamTy = PointerType::getUnqual(ArgTy->getContext());
LLVM_DEBUG(dbgs() << "== ObjCARCOpt::MoveCalls ==\n");
// Insert the new retain and release calls.
for (Instruction *InsertPt : ReleasesToMove.ReverseInsertPts) {
- Value *MyArg = ArgTy == ParamTy ? Arg
- : new BitCastInst(Arg, ParamTy, "",
- InsertPt->getIterator());
Function *Decl = EP.get(ARCRuntimeEntryPointKind::Retain);
SmallVector<OperandBundleDef, 1> BundleList;
addOpBundleForFunclet(InsertPt->getParent(), BundleList);
CallInst *Call =
- CallInst::Create(Decl, MyArg, BundleList, "", InsertPt->getIterator());
+ CallInst::Create(Decl, Arg, BundleList, "", InsertPt->getIterator());
----------------
nikic wrote:
There's another bitcast below this you can drop as well.
https://github.com/llvm/llvm-project/pull/123909
More information about the llvm-commits
mailing list