[llvm-branch-commits] [llvm] [BOLT][BTI] Add MCPlusBuilder::addBTItoBBStart (PR #167329)
Gergely Bálint via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Mon Nov 24 05:41:12 PST 2025
================
@@ -1888,6 +1888,19 @@ class MCPlusBuilder {
llvm_unreachable("not implemented");
}
+ /// Checks if the indirect call / jump is accepted by the landing pad at the
+ /// start of the target BasicBlock.
+ virtual bool isBTIVariantCoveringCall(MCInst &Call, MCInst &Pad) const {
+ llvm_unreachable("not implemented");
+ return false;
+ }
+
+ /// Adds a BTI landing pad to the start of the BB, that matches the indirect
+ /// call/jump inst.
+ virtual void addBTItoBBStart(BinaryBasicBlock &BB, MCInst &Call) const {
----------------
bgergely0 wrote:
insert is probably better.
> (and 'ToBBStart would be a bit redundant since presumably we won't expect to insert a BTI anywhere else?)
agree.
The naming should also imply that we don't necessarily insert a new instruction, only if the instruction already at the BBStart is not a BTI (or not compatible with a BTI).
WDYT?
https://github.com/llvm/llvm-project/pull/167329
More information about the llvm-branch-commits
mailing list