[PATCH] D39386: [Power9] Allow gpr callee saved spills in prologue to vector registers rather than stack

Matthias Braun via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 30 09:09:03 PDT 2018


MatzeB accepted this revision.
MatzeB added a comment.

LGTM too; some nitpicks below.



================
Comment at: llvm/include/llvm/CodeGen/MachineFrameInfo.h:37
+    int FrameIdx;
+    unsigned DstReg;
+  };
----------------
If `DstReg` must be a physical register then you could use `MCPhysReg` instead of `unsigned`.


================
Comment at: llvm/include/llvm/CodeGen/MachineFrameInfo.h:54
+  /// register.
+  bool SpilledToReg;
 
----------------
You could use `bool SpilledToReg = false;` here instead of setting it in the constructor.


================
Comment at: llvm/lib/CodeGen/PrologEpilogInserter.cpp:78-79
 
+STATISTIC(NumLeafFuncWithSpills, "Number of leaf functions with CSRs");
+STATISTIC(NumFuncSeen, "Number of functions seen in PEI");
+
----------------
I assume adding the statistics is independent of the main change. It's fine for review like this, but would be nice if you could separate it into a separate commit when committing.


https://reviews.llvm.org/D39386





More information about the llvm-commits mailing list