Skip to content

Commit 9207a90

Browse files
committed
[Attributor] Do not expand dead indirect call sites
1 parent 06e6ec0 commit 9207a90

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

llvm/lib/Transforms/IPO/AttributorAttributes.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12292,8 +12292,13 @@ struct AAIndirectCallInfoCallSite : public AAIndirectCallInfo {
1229212292
if (!AllCalleesKnown && AssumedCallees.empty())
1229312293
return ChangeStatus::UNCHANGED;
1229412294

12295-
ChangeStatus Changed = ChangeStatus::UNCHANGED;
1229612295
CallBase *CB = cast<CallBase>(getCtxI());
12296+
bool UsedAssumedInformation = false;
12297+
if (A.isAssumedDead(*CB, this, /*LivenessAA=*/nullptr,
12298+
UsedAssumedInformation))
12299+
return ChangeStatus::UNCHANGED;
12300+
12301+
ChangeStatus Changed = ChangeStatus::UNCHANGED;
1229712302
Value *FP = CB->getCalledOperand();
1229812303
if (FP->getType()->getPointerAddressSpace())
1229912304
FP = new AddrSpaceCastInst(FP, PointerType::get(FP->getType(), 0),

0 commit comments

Comments
 (0)