[PATCH] D83923: [MachineOutliner][AArch64] WA for cases where AArch64 Outliner needs to do more than one stack fixup.

Jessica Paquette via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 10 09:14:11 PDT 2020


paquette added inline comments.


================
Comment at: llvm/lib/Target/AArch64/AArch64InstrInfo.cpp:6235
+      // pruning the cases where the candidate has calls while also having no
+      // available LR and having no available general purpise registers to copy
+      // LR to (ie one extra stack save/restore).
----------------
typo: purpise


================
Comment at: llvm/test/CodeGen/AArch64/machine-outliner-2fixup-blr-terminator.mir:7
+--- |
+  @var_i32 = global i32 42
+  define void @f1() minsize noinline noredzone "frame-pointer"="all" "branch-target-enforcement" { ret void }
----------------
I don't think you need this, since it isn't referenced at all in the MIR.


================
Comment at: llvm/test/CodeGen/AArch64/machine-outliner-2fixup-blr-terminator.mir:8
+  @var_i32 = global i32 42
+  define void @f1() minsize noinline noredzone "frame-pointer"="all" "branch-target-enforcement" { ret void }
+  define void @f2() minsize noinline noredzone "frame-pointer"="all" "branch-target-enforcement" { ret void }
----------------
Very minor nit: it's probably easier to write

`attributes #0 = {...}`

This really doesn't matter so you don't have to change it, but in the future, it's probably a little cleaner for when you have multiple attributes.

Also do you need `"frame-pointer"="all"` and `noinline` here? At the very least, I'd expect that `noinline` shouldn't do anything this late in the pass pipeline.


================
Comment at: llvm/test/CodeGen/AArch64/machine-outliner-no-noreturn-no-stack.mir:14-16
+  define void @baz() {
+    ret void
+  }
----------------
Nit: can this be consistent with the formatting for `@stack_1` and `@stack_2`?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D83923



More information about the llvm-commits mailing list