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

Daniel Kiss via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 28 11:50:41 PDT 2020


danielkiss added inline comments.


================
Comment at: llvm/lib/Target/AArch64/AArch64FrameLowering.cpp:3125
+  int ObjectIndex = 0;
+  // Group ID this object belongs to.
+  int GroupIndex = -1;
----------------
eugenis wrote:
> danielkiss wrote:
> > IMHO if the data structure would be vector of vectors of FrameObjects then maybe the whole logic would be a bit simpler, but maybe I missed something.
> > 
> Do you mean a list of groups, where each group is a list of objects?
> In that case we would have to deal with the possibility that one object participates in multiple groups, and resolve that somehow when building the final frame order. In the current implementation, the object always abandons its old group when joining a new one - it's not optimal, but simple and seems to work fine.
> 
> Also, FrameObjectCompare needs a fast way to determine when two objects are in the same group, hence group id is a member of FrameObject, and not vice versa.
> 
> Do you mean a list of groups, where each group is a list of objects?
Yes, like that.
> In that case we would have to deal with the possibility that one object participates in multiple groups
Right, that I missed :) 


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