aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Arsenault <Matthew.Arsenault@amd.com>2025-04-08 07:23:00 +0700
committerGitHub <noreply@github.com>2025-04-08 07:23:00 +0700
commit1f359610b048ae31e5ea3a0416f55405ff398753 (patch)
treebd303885421a178dbf6bfe6403850139fad3ddc7
parentd7354e337a4602da1e5913b3e6fceda2e8c5ecc0 (diff)
downloadllvm-1f359610b048ae31e5ea3a0416f55405ff398753.zip
llvm-1f359610b048ae31e5ea3a0416f55405ff398753.tar.gz
llvm-1f359610b048ae31e5ea3a0416f55405ff398753.tar.bz2
ObjCARC: Drop pointer bitcast handling (#134274)
There is more in the file to drop, but this looks like the easier part.
-rw-r--r--llvm/lib/Transforms/ObjCARC/ObjCARCContract.cpp19
1 files changed, 0 insertions, 19 deletions
diff --git a/llvm/lib/Transforms/ObjCARC/ObjCARCContract.cpp b/llvm/lib/Transforms/ObjCARC/ObjCARCContract.cpp
index 311d3b1..e11748b 100644
--- a/llvm/lib/Transforms/ObjCARC/ObjCARCContract.cpp
+++ b/llvm/lib/Transforms/ObjCARC/ObjCARCContract.cpp
@@ -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 (;;) {
@@ -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,