[llvm] [LFI][AArch64] Add rewrites for control flow (PR #192602)
Zachary Yedidia via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 22 12:53:53 PDT 2026
================
@@ -192,6 +236,19 @@ void AArch64MCLFIRewriter::doRewriteInst(const MCInst &Inst, MCStreamer &Out,
return;
}
+ // Control flow.
+ switch (Inst.getOpcode()) {
+ case AArch64::RET:
+ return rewriteReturn(Inst, Out, STI);
+ case AArch64::BR:
+ case AArch64::BLR:
----------------
zyedidia wrote:
Since we are doing rewriting at the MCInst level, all inline assembly has already been lowered to MCInst and is directly visible to the rewriter as AArch64 instructions. This is one of the main benefits of rewriting at this level because it automatically handles inline asm and `.s` files.
https://github.com/llvm/llvm-project/pull/192602
More information about the llvm-commits
mailing list