Utility pass to remove gc.relocates created by rewrite statepoints for GC.
With respect to safepoint verification, the IR generated would be incorrect, and cannot run on VMs
as such. However, the IR verifier would verify the IR to be correct.
This would be a single transformation on the final optimized IR. LLVM used with most VMs would have the RewriteStatepointsForGC (RS4GC) enabled in the opt pipeline, or some form of garbage collection support. See: http://llvm.org/docs/Statepoints.html
The benefit of this pass is for easy analysis of the IR, when the final optimized IR is 'polluted' by too
many gc.relocates of the original pointers. For example, in manual performance analysis of the optimized IR, we can walk back through the use-def chain without having to deal with all the gc.relocates.
test run: All RS4GC tests with -verify option. Local downstream tests on large
IR files. This also works when the pointer being gc.relocated is another
TODO: There are 2 specific parts that need some more thought. Right now most
GC.relocates are removed.