This commit renames GCRelocateOperands to GCRelocateInst and makes it an
intrinsic wrapper, similar to e.g. MemCpyInst. Also, all users of
GCRelocateOperands were changed to use the new intrinsic wrapper instead.
Details
Diff Detail
Event Timeline
Won't have a chance for an actual review until next week, but wanted to say thanks for the cleanup. This is a major improvement over the current code. We probably should do the same for gc.result and gc.statepoint as well at some point.
Naming wise, I think GCRelocateInst would be more consistent with the other intrinsic wrapper classes.
Philip
I'm not sure it makes sense to introduce a wrapper class for gc.result because it would probably only provide a getStatepoint() method. And gc.statepoint would require something different because it can be an invoke as well. I have something in mind which involves making Statepoint a subclass of CallSite.
Naming wise, I think GCRelocateInst would be more consistent with the other intrinsic wrapper classes.
Yes, that makes sense. I'll change it in the next version.
LGTM. Thanks again for the cleanup!
lib/Transforms/Scalar/RewriteStatepointsForGC.cpp | ||
---|---|---|
1650 | minor: the normal idiom is to dyn_cast, then check for null. |
LLVM convention is auto * to make it obvious that Relocate is a pointer.