[llvm] [BOLT][BTI] Add MCPlusBuilder::createBTI (PR #167305)

Kristof Beyls via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 19 06:55:41 PST 2025


================
@@ -1865,6 +1865,11 @@ class MCPlusBuilder {
     llvm_unreachable("not implemented");
   }
 
+  /// Create a BTI landing pad instruction.
+  virtual void createBTI(MCInst &Inst, bool CouldCall, bool CouldJump) const {
----------------
kbeyls wrote:

This is nit-picky: I wonder if the parameters `CouldCall` and `CouldJump` could be given names that are a bit better?
The way I read it now, `CouldCall` and `CouldJump` may suggest that the BTI instruction could make a call or could do a jump.
Maybe one of the following alternatives might be a bit clearer?
- `CanCallTo` and `CanJumpTo`
- `CallAllowed` and `JumpAllowed`
- ...

https://github.com/llvm/llvm-project/pull/167305


More information about the llvm-commits mailing list