Page MenuHomePhabricator

[OpenCL] Align fake address space map with the SPIR target maps.
ClosedPublic

Authored by echuraev on Dec 22 2016, 1:40 AM.

Details

Summary

We compile user opencl kernel code with spir triple. But built-ins are written in OpenCL and we compile it with triple x86_64 to be able to use x86 intrinsics. And we need address spaces to match in both cases. So, we change fake address space map in OpenCL for matching with spir.

On CPU address spaces are not really important but we'd like to preserve address space information in order to perform optimizations relying on this info like enhanced alias analysis.

Diff Detail

Event Timeline

echuraev updated this revision to Diff 82315.Dec 22 2016, 1:40 AM
echuraev retitled this revision from to [OpenCL] Align fake address space map with the SPIR target maps..
echuraev updated this object.
echuraev added a reviewer: Anastasia.
echuraev added subscribers: cfe-commits, bader, yaxunl.
Anastasia edited edge metadata.Dec 22 2016, 3:40 AM
Anastasia added a subscriber: pekka.jaaskelainen.

I believe it's not that important what those numbers actually are, but having the consistency with SPIR might be better indeed at least even for documentation purposes!

@pekka.jaaskelainen, I think you are using x86 target in the POCL toolchain, do you envision any issues with this change?

@pekka.jaaskelainen, I think you are using x86 target in the POCL toolchain, do you envision any issues with this change?

No, this should simplify things actually.

This revision is now accepted and ready to land.Dec 22 2016, 1:44 PM
Anastasia accepted this revision.Dec 23 2016, 5:02 AM
Anastasia edited edge metadata.

Excellent! Thanks!

echuraev closed this revision.Dec 23 2016, 8:21 AM