[PATCH] Introduce an example statepoint GC strategy

Philip Reames listmail at philipreames.com
Tue Dec 30 08:46:22 PST 2014


Will update with revisions.


================
Comment at: include/llvm/CodeGen/GCStrategy.h:71-73
@@ -69,1 +70,5 @@
   protected:
+    bool UseStatepoints;       /// Uses gc.statepoints as opposed to gc.roots,
+                               /// if set, none of the other options can be
+                               /// anything but their default values.
+
----------------
majnemer wrote:
> The other comments are formatted using ///<
> 
> Also, the layout of GCStrategy might be a little more compact if you shifted this field down.
FYI, I'm going to be doing a fair amount of style/spacing cleanup once I'm done with the current round of changes.  Ordering fields, updating doxygen comments, and the like will happen then.  

================
Comment at: lib/CodeGen/SelectionDAG/StatepointLowering.cpp:429
@@ +428,3 @@
+    GCStrategy &S = Builder.GFI->getStrategy();
+    for(const Value *V : Bases) {
+      auto Opt = S.isGCManagedPointer(V);
----------------
majnemer wrote:
> There should be a space between the for and the (
Thanks.  Will fix this and other style comments.

================
Comment at: lib/CodeGen/StatepointExampleGC.cpp:44
@@ +43,3 @@
+    // updated and that no other pointer does.
+    return (1 == PT->getAddressSpace());
+  }
----------------
majnemer wrote:
> Address space 1 has a special meaning in LLVM, it's identical to address space 0 except for the fact that "null" may be dereferenced.  You might want to consider a different address space.
Er, where are you getting that from?  All I see in the LangRef is that non-zero address spaces are target defined.  

(p.s. I'm planning on raising this question separately on the mailing list at some point.  Changing it shouldn't matter much.)

http://reviews.llvm.org/D6808

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the llvm-commits mailing list