[llvm] [CGData][Merger] Avoid merging the attached call target (PR #121030)
Zhaoxuan Jiang via llvm-commits
llvm-commits at lists.llvm.org
Tue Dec 24 17:06:05 PST 2024
================
@@ -60,11 +60,17 @@ static bool canParameterizeCallOperand(const CallBase *CI, unsigned OpIdx) {
if (Name.starts_with("__dtrace"))
return false;
}
- if (isCalleeOperand(CI, OpIdx) &&
- CI->getOperandBundle(LLVMContext::OB_ptrauth).has_value()) {
+ if (isCalleeOperand(CI, OpIdx)) {
// The operand is the callee and it has already been signed. Ignore this
// because we cannot add another ptrauth bundle to the call instruction.
- return false;
+ if (CI->getOperandBundle(LLVMContext::OB_ptrauth).has_value())
+ return false;
+ } else {
+ // The target of the arc-attached call must be a constant and cannot be
----------------
nocchijiang wrote:
Is there a general method to determine whether a bundle is unsafe to optimize? If so, we can avoid enumerating all of them.
https://github.com/llvm/llvm-project/pull/121030
More information about the llvm-commits
mailing list