[PATCH] D18106: Extract out a SelectionDAGBuilder::LowerAsStatepoint; NFC

Sanjoy Das via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 16 16:13:10 PDT 2016


sanjoy added inline comments.

================
Comment at: lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h:752
@@ +751,3 @@
+    /// The ID that the resulting STATEPOINT instruction has to report.
+    unsigned ID = -1;
+
----------------
reames wrote:
> Why explicitly initial this and none of the other fields?
Will fix -- the only ones with missing initializers right now are `StatepointInstr` and `EHPadBB` (the rest of the arguments are objects that should initialize themselves).

================
Comment at: lib/CodeGen/SelectionDAG/StatepointLowering.cpp:437
@@ -505,12 +436,3 @@
 /// will be set to the last value spilled (if any were).
-static void lowerStatepointMetaArgs(SmallVectorImpl<SDValue> &Ops,
-                                    ImmutableStatepoint StatepointSite,
-                                    SelectionDAGBuilder &Builder) {
-
-  // Lower the deopt and gc arguments for this statepoint.  Layout will
-  // be: deopt argument length, deopt arguments.., gc arguments...
-
-  SmallVector<const Value *, 64> Bases, Ptrs;
-  SmallVector<const GCRelocateInst *, 64> Relocations;
-  getIncomingStatepointGCValues(Bases, Ptrs, Relocations, StatepointSite,
-                                Builder);
+static void lowerStatepointLoweringInfoMetaArgs(
+    SmallVectorImpl<SDValue> &Ops,
----------------
reames wrote:
> minor: I wouldn't bother changing the function name in this way.
Will fix before checkin.

================
Comment at: lib/CodeGen/SelectionDAG/StatepointLowering.cpp:511
@@ -591,3 +510,3 @@
   // the alloca
-  for (Value *V : StatepointSite.gc_args()) {
+  for (Value *V : SI.GCArgs) {
     SDValue Incoming = Builder.getValue(V);
----------------
reames wrote:
> This comment still applies.  A follow on commit is fine.
Ah, sorry, I somehow missed seeing the comment earlier.  I'll check in a follow-on change.

================
Comment at: lib/CodeGen/SelectionDAG/StatepointLowering.cpp:795
@@ +794,3 @@
+
+#ifndef NDEBUG
+  // If this is a malformed statepoint, report it early to simplify debugging.
----------------
reames wrote:
> Might be good to lift these two to the top of the function.
Will fix before checkin.


http://reviews.llvm.org/D18106





More information about the llvm-commits mailing list