Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> Why would you want to do this?

Because SPIR requires that you can load and enqueue an OpenCL kernel from an IR, without having a source. And you need this type information in order to be able to format your arguments properly.

Please note that I'm not commenting here on the very choice of LLVM IR as a common medium made by SPIR committee.

> Your comment comes out to "lowering loses information", which is, of course, true.

Exactly. But the current common uses of LLVM IR do require some of the information which is lost, and, in case of signedness, it was not even necessary to lower it.

> IE where does it result in an incorrect translation, or the inability to optimize something?

You're limiting IR uses to translation and optimisations. Fine. I would have welcomed this way of thinking. But, unfortunately, this is not the case.



" But the current common uses of LLVM IR"

Portability of a high level language is an explicit non-goal of LLVM :)

The fact that someone decided to do it just makes them silly :)


I know it's silly. I can go on forever on what I think about SPIR and RenderScript. But, unfortunately, now it's a fact, an objective reality we have to deal with.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: