tra abandoned this revision. tra added a comment. Emitting IR is not sufficient to ensure that the kernels survive GDCE, so the patch does not work with optimizations on. http://reviews.llvm.org/D11666 would have to do for now. http://reviews.llvm.org/D11993