forked from OSchip/llvm-project
[InstCombine] Use getFreedOperand() (NFC)
Use getFreedOperand() instead of isFreeCall() to remove the implicit assumption that any pointer operand to a free function is the operand being freed. This won't actually matter until we handle allockind(free).
This commit is contained in:
parent
3ac8587a2b
commit
5e856a8578
|
@ -2801,7 +2801,8 @@ static bool isAllocSiteRemovable(Instruction *AI,
|
|||
continue;
|
||||
}
|
||||
|
||||
if (isFreeCall(I, &TLI) && getAllocationFamily(I, &TLI) == Family) {
|
||||
if (getFreedOperand(cast<CallBase>(I), &TLI) == PI &&
|
||||
getAllocationFamily(I, &TLI) == Family) {
|
||||
assert(Family);
|
||||
Users.emplace_back(I);
|
||||
continue;
|
||||
|
|
Loading…
Reference in New Issue