[PATCH] D77565: [AArch64] Remove implicit landing pads.

Momchil Velikov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 4 03:54:02 PDT 2020


chill added inline comments.


================
Comment at: llvm/lib/Target/AArch64/AArch64BranchTargets.cpp:134
+      if (Subtarget.hasV8_3aOps()) {
+        // PACI[A|B] LR, SP performs the same operation but it is not a landing
+        // pad.
----------------
danielkiss wrote:
> chill wrote:
> > Why not create the `PACI[AB]` from the very start, with a comment why are we doing it?
> > 
> Just replacing them here is a why more simpler code.
> I won't change the generated code if BTI is not on. 
I don't find that simpler or logical at all. We have a function called `addBTI` and it *removes" a BTI?
The only two things that make sense are:
* create the right instruction from the very start, we have al the necessary information to do so, it makes sense doing the right thing on the spot, instead of patching it later, which in addition to being harder to understand (you have to have knowledge and be aware of multiple parts of the code in order to figure out what's at the beginning of a function and also has time/space overheads, or
* create the non-BTI instruction and the add the BTI property in the pass that adds the BTIs



CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D77565/new/

https://reviews.llvm.org/D77565



More information about the llvm-commits mailing list