Skip to content
Merged
Show file tree
Hide file tree
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
26 changes: 0 additions & 26 deletions bolt/lib/Passes/Inliner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -491,32 +491,6 @@ bool Inliner::inlineCallsInFunction(BinaryFunction &Function) {
}
}

// AArch64 BTI:
// If the callee has an indirect tailcall (BR), we would transform it to
// an indirect call (BLR) in InlineCall. Because of this, we would have to
// update the BTI at the target of the tailcall. However, these targets
// are not known. Instead, we skip inlining blocks with indirect
// tailcalls.
auto HasIndirectTailCall = [&](const BinaryFunction &BF) -> bool {
for (const auto &BB : BF) {
for (const auto &II : BB) {
if (BC.MIB->isIndirectBranch(II) && BC.MIB->isTailCall(II)) {
return true;
}
}
}
return false;
};

if (BC.isAArch64() && BC.usesBTI() &&
HasIndirectTailCall(*TargetFunction)) {
++InstIt;
LLVM_DEBUG(dbgs() << "BOLT-DEBUG: Skipping inlining block with tailcall"
<< " in " << Function << " : " << BB->getName()
<< " to keep BTIs consistent.\n");
continue;
}

LLVM_DEBUG(dbgs() << "BOLT-DEBUG: inlining call to " << *TargetFunction
<< " in " << Function << " : " << BB->getName()
<< ". Count: " << BB->getKnownExecutionCount()
Expand Down
39 changes: 0 additions & 39 deletions bolt/test/AArch64/inline-bti.s

This file was deleted.

Loading