[PATCH] D158623: [RISCV] Reorder the stack frame objects.

lcvon via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 30 07:40:27 PDT 2023


lcvon007 added inline comments.


================
Comment at: llvm/lib/Target/RISCV/RISCVFrameLowering.cpp:545
+  // It's only used to reduce codesize.
+  if (!MF.getFunction().hasMinSize())
+    return;
----------------
wangpc wrote:
> `hasMinSize()` means that we only enable this optimization in `-Oz`, not in `-Os`. Is this expected?
> `hasOptSize()` is for both `-Os` and `-Oz`.
Oz is expected and I use RISCVMakeCompressible.cpp as a reference,  and do you know when we need to enable it in Os? is it that decreasing codesize much but regress the performace very less? @wangpc 


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D158623



More information about the llvm-commits mailing list