[PATCH] D100020: [GreedyRA ORE] Add Cost of spill locations into remark

Philip Reames via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 19 09:27:33 PDT 2021


reames accepted this revision.
reames added a comment.
This revision is now accepted and ready to land.

LGTM w/required changes.



================
Comment at: llvm/lib/CodeGen/RegAllocGreedy.cpp:583
+
+    void addCost(float freq) {
+      ReloadsCost += freq * Reloads;
----------------
Personally, I don't think this function adds any clarity since it's used once, and the naming isn't super obvious.  Please just inline this into the caller w/a comment about computing cost.


================
Comment at: llvm/lib/CodeGen/RegAllocGreedy.cpp:3159
     R << NV("NumSpills", Spills) << " spills ";
-  if (FoldedSpills)
+    R << NV("SpillsLocationCost", SpillsCost) << " spills location cost ";
+  }
----------------
replace "spills location cost" with "total spill cost", analogously for the others below.


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

https://reviews.llvm.org/D100020



More information about the llvm-commits mailing list