[PATCH] [RewriteStatepointsForGC] Limited support for vectors of pointers

Sanjoy Das sanjoy at playingwithpointers.com
Fri Mar 27 15:33:27 PDT 2015


Mostly stylistic issues.


================
Comment at: lib/Transforms/Scalar/RewriteStatepointsForGC.cpp:179
@@ +178,3 @@
+/// liveness code.  Note: It is assumed the V dominates loc.
+static bool isLiveGCReferenceAt(Value &V, Instruction *loc, DominatorTree &DT,
+                                LoopInfo *LI) {
----------------
Nit: variable naming, should be `Instruction *Loc`

================
Comment at: lib/Transforms/Scalar/RewriteStatepointsForGC.cpp:1802
@@ +1801,3 @@
+
+    for (User *U : Users) {
+      if (auto Phi = dyn_cast<PHINode>(U)) {
----------------
Why not `for (Instruction *UI : Users) {`?

================
Comment at: lib/Transforms/Scalar/RewriteStatepointsForGC.cpp:1894
@@ +1893,3 @@
+  // to scalarize here.
+  for (size_t i = 0; i < records.size(); i++) {
+    struct PartiallyConstructedSafepointRecord &info = records[i];
----------------
Range for loop here?

http://reviews.llvm.org/D8671

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






More information about the llvm-commits mailing list