[llvm] [AArch64][BTI] Mark EH landing pads as jump targets (PR #149680)

Benjamin Herrenschmidt via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 23 14:50:09 PDT 2025


ozbenh wrote:

> he guard on MBB.isEHPad() ensures we only advance the iterator when we’re in an EH pad, so for a normal basic block the loop/while immediately terminates and MBBI remains at MBB.begin().

Sure, what I meant is that my original proposed implementation did that without the extra if() by simply putting the test for MBB.isEHPad() in the loop condition. So the loop wouldn't have incremented the iterator for a non-EHPad either.

But I don't care either way as long as the end result works :)

The only other difference with your version is that I would look for an EH_LABEL anywhere in the MBB while your variant only works if the EH_LABEL is at the beginning.  I don't know if this matters (could there be some *other* pseudo-op before the EH_LABEL ?), I don't now enough about llvm here.


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


More information about the llvm-commits mailing list