[LLVMdev] [RFC] Stripping unusable intrinsics

Owen Anderson resistor at mac.com
Tue Dec 23 16:07:26 PST 2014


> On Dec 23, 2014, at 3:52 PM, Chandler Carruth <chandlerc at google.com> wrote:
> 
> So, what I was trying to point out is that it isn't clear we need to have the ability to teach the middle end optimizer about the second set above. For example, the only place where I can find us dealing with intrinsics from Hexagon, r600/AMDGPU, or NVPTX in the middle end is for AMDGPU_rcp which has an instcombine. While r600/AMDGPU doesn't really have a lot of intrinsics anyways, NVPTX seems to have many of the kinds of intrinsics that would be directly relevant to GPU shaders... But maybe there is something about how people are using NVPTX that makes this a bad example?
> 
> The largest contribution of target-specific intrinsics in the middle end optimizer is actually x86, and I'm pretty confident that we can and probably should remove most of that code. The operations we optimize there don't actually seem special at all, I suspect this is more a consequence of the historical needs than anything else. (I mean, I'm pretty sure I added some of those combines for x86!)

I’m not sure I agree that the ability to optimize these intrinsics is unnecessary, but I definitely believe there’s a lot of room to improve the separation of concerns and a lot of code that knows about target-specific intrinsics into the targets themselves.  That said, this is still a lot of work and may well have compile time performance implications/

—Owen
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20141223/290ff81c/attachment.html>


More information about the llvm-dev mailing list