{"action":"created","issue":{"url":"https://api.github.com/repos/HSAFoundation/CLOC/issues/16","repository_url":"https://api.github.com/repos/HSAFoundation/CLOC","labels_url":"https://api.github.com/repos/HSAFoundation/CLOC/issues/16/labels{/name}","comments_url":"https://api.github.com/repos/HSAFoundation/CLOC/issues/16/comments","events_url":"https://api.github.com/repos/HSAFoundation/CLOC/issues/16/events","html_url":"https://github.com/HSAFoundation/CLOC/issues/16","id":155028909,"number":16,"title":"CLOC 1.0.x addrspacecast not implemented","user":{"login":"PXAHyLee","id":5600248,"avatar_url":"https://avatars.githubusercontent.com/u/5600248?v=3","gravatar_id":"","url":"https://api.github.com/users/PXAHyLee","html_url":"https://github.com/PXAHyLee","followers_url":"https://api.github.com/users/PXAHyLee/followers","following_url":"https://api.github.com/users/PXAHyLee/following{/other_user}","gists_url":"https://api.github.com/users/PXAHyLee/gists{/gist_id}","starred_url":"https://api.github.com/users/PXAHyLee/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PXAHyLee/subscriptions","organizations_url":"https://api.github.com/users/PXAHyLee/orgs","repos_url":"https://api.github.com/users/PXAHyLee/repos","events_url":"https://api.github.com/users/PXAHyLee/events{/privacy}","received_events_url":"https://api.github.com/users/PXAHyLee/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-05-16T13:25:57Z","updated_at":"2016-05-18T18:08:17Z","closed_at":null,"body":"Hi developers,\r\n\r\nWhen using cloc 0.9 (which is based on llvm 3.2), one of the example, in AMD APP SDK, MonteCarloAsianDP_Kernels.cl can work.\r\n\r\nHowever, when the new LLVM toolchain uses the `addrspacecast` to generate the kernel code, CLOC emits the error message like `error: addrspacecast not implemented`.\r\n\r\nFor now, I can still use `cloc -hsail MonteCarloAsianDP_Kernels.cl` to use the old version (hlc3.2) of LLVM toolchain to run my application. This issue can also be found in the current LLVM trunk.\r\n\r\nSo, how to work around this kind of problem when using new CLOC toolchain now? There are some benchmarks that fail to compile. [EDIT: I think a viable solution may be trying to not use `generic` address space in this case.]\r\n\r\nThanks.\r\n\r\nThe aforementioned example is in the attachment.\r\n[Kernel code](https://gist.github.com/PXAHyLee/be94c55857541b0ef3a60bcda3f5c5e4)\r\n[LLVM Assembly code](https://gist.github.com/PXAHyLee/bb6369d4a0a84a38a4324f9afa98750f)"},"comment":{"url":"https://api.github.com/repos/HSAFoundation/CLOC/issues/comments/220110906","html_url":"https://github.com/HSAFoundation/CLOC/issues/16#issuecomment-220110906","issue_url":"https://api.github.com/repos/HSAFoundation/CLOC/issues/16","id":220110906,"user":{"login":"gregrodgers","id":1031794,"avatar_url":"https://avatars.githubusercontent.com/u/1031794?v=3","gravatar_id":"","url":"https://api.github.com/users/gregrodgers","html_url":"https://github.com/gregrodgers","followers_url":"https://api.github.com/users/gregrodgers/followers","following_url":"https://api.github.com/users/gregrodgers/following{/other_user}","gists_url":"https://api.github.com/users/gregrodgers/gists{/gist_id}","starred_url":"https://api.github.com/users/gregrodgers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gregrodgers/subscriptions","organizations_url":"https://api.github.com/users/gregrodgers/orgs","repos_url":"https://api.github.com/users/gregrodgers/repos","events_url":"https://api.github.com/users/gregrodgers/events{/privacy}","received_events_url":"https://api.github.com/users/gregrodgers/received_events","type":"User","site_admin":false},"created_at":"2016-05-18T18:08:17Z","updated_at":"2016-05-18T18:08:17Z","body":"You are doing the right thing to switch back to cloc.sh -hsail or -brig on this test case.  Also, if you are using snack.sh, you need to switch to snackhsail.sh.    The hsa code object path still has some roughness including some address spaces not implemented.   When I have a new LLVM 3.9 code generator for amdgcn that supports this, I will create a new set of amdllvm packages and then update this issue. "}}