[PATCH] D72366: [AArch64] Stack frame reordering.

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 27 12:55:46 PDT 2020


efriedma added inline comments.


================
Comment at: llvm/lib/Target/AArch64/AArch64FrameLowering.cpp:3187
+  // Otherwise, keep the objects in the original order.
+  return A.ObjectIndex < B.ObjectIndex;
+}
----------------
It's usually more concise to write this sort of thing with std::tuple: `return std::make_tuple(!A.IsValid, A.ObjectFirst, A.GroupFirst, A.GroupIndex, A.ObjectIndex) < std::make_tuple(!B.IsValid, B.ObjectFirst, B.GroupFirst, B.GroupIndex, B.ObjectIndex)`.


================
Comment at: llvm/lib/Target/AArch64/AArch64FrameLowering.cpp:3193
+    const MachineFunction &MF, SmallVectorImpl<int> &ObjectsToAllocate) const {
+  if (!OrderFrameObjects || ObjectsToAllocate.empty())
+    return;
----------------
Can we skip running this code when stack tagging is disabled?  It doesn't do anything in that case, I think, but it would avoid running a bunch of unnecessary code, and make the intent more clear.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D72366





More information about the llvm-commits mailing list