Skip to content

[LiveDebugValues] Remove unused static function #7826

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 0 additions & 27 deletions llvm/lib/CodeGen/LiveDebugValues/VarLocBasedImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2203,33 +2203,6 @@ void VarLocBasedLDV::recordEntryValue(const MachineInstr &MI,
OpenRanges.insert(EntryValLocIDs, EntryValLocAsBackup);
}

static bool isSwiftAsyncContext(const MachineInstr &MI) {
const llvm::MachineFunction *MF = MI.getParent()->getParent();
const llvm::Function &F = MF->getFunction();
// FIXME: Missing patch.
//if (F.getCallingConv() != CallingConv::SwiftTail)
// return false;
for (const MachineOperand &Op : MI.debug_operands()) {
if (!Op.isReg())
return false;
bool found = false;
unsigned Reg = Op.getReg();
unsigned I = 0;
if (MF->getProperties().hasProperty(
MachineFunctionProperties::Property::TracksLiveness))
for (auto R : MF->getRegInfo().liveins()) {
if (R.first == Reg && F.hasParamAttribute(I, Attribute::SwiftAsync)) {
found = true;
break;
}
++I;
}
if (!found)
return false;
}
return true;
}

/// Calculate the liveness information for the given machine function and
/// extend ranges across basic blocks.
bool VarLocBasedLDV::ExtendRanges(MachineFunction &MF,
Expand Down