[PATCH] [RewriteStatepointsForGC] Generalized vector phi/select handling for base pointers
Pat Gavlin
pagavlin at microsoft.com
Thu Jun 18 10:27:28 PDT 2015
LGTM modulo a few very minor comments.
================
Comment at: lib/Transforms/Scalar/RewriteStatepointsForGC.cpp:346
@@ +345,3 @@
+ Value *InsertIndex = IEI->getOperand(2);
+ // This index is inserting the value, look for it's BDV
+ if (InsertIndex == Index)
----------------
s/it's/its
================
Comment at: lib/Transforms/Scalar/RewriteStatepointsForGC.cpp:399
@@ +398,3 @@
+ if (VectorBase->getType()->isPointerTy())
+ // We found a BDV for this specific element with the vector. This an
+ // optimization, but in practice it covers most of the useful cases
----------------
s/This an/This is an
================
Comment at: lib/Transforms/Scalar/RewriteStatepointsForGC.cpp:1885
@@ +1884,3 @@
+ PointerToBase.erase(V);
+ for (unsigned i = 0; i < Elements.size(); i++) {
+ Value *Elem = Elements[i];
----------------
An `assert(Elements.size() == BaseElements.size())` might be nice here.
http://reviews.llvm.org/D10461
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
More information about the llvm-commits
mailing list