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

lcvon via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 1 01:07:03 PDT 2023


lcvon007 added inline comments.


================
Comment at: llvm/lib/Target/RISCV/RISCVFrameLowering.cpp:583
+  for (auto &Obj : ObjectsToAllocate) {
+    SortingObjects[Obj].IsValid = true;
+    SortingObjects[Obj].ObjectIndex = Obj;
----------------
reames wrote:
> wangpc wrote:
> > wangpc wrote:
> > > Do we really need `IsValid`? It's always true I think (same for X86).
> > OK, ignore it. `SortingObjects` is with bigger size than `ObjectsToAllocate`.
> I think it would be much simpler to remove isValid and have a separate map from frame index to SortedObject index.  Please rework this.
Rework yet, please help review. @reames  thanks very much.


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