[PATCH] D100016: [GreedyRA ORE] Separate Folder Reloads and Zero Cost Folder Reloads

Serguei Katkov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 13 19:46:26 PDT 2021


skatkov added inline comments.


================
Comment at: llvm/lib/CodeGen/RegAllocGreedy.cpp:3208
         llvm::any_of(Accesses, isSpillSlotAccess)) {
-      ++Stats.FoldedSpills;
+      Stats.FoldedSpills += Accesses.size();
     }
----------------
skatkov wrote:
> reames wrote:
> > Side question: Are you planning on extending this to zero-cost folded spills?  Statepoints also have those too.  
> Probably I misses that... I will check the code when statepoint may contain folded spill...
And to be honest in this case my implementation is incorrect. At this moment it considers all spill stack slot accesses in var area as folder reload. If there are folded spills then I should separate them somehow.

Also makes sense to note that original implementation as well as this one does not consider folded spills if there are folded reload. Most probably to avoid accounting then twice due to cost is probably the same...


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

https://reviews.llvm.org/D100016



More information about the llvm-commits mailing list