MixmasterFresh / rust-on-gpu

A fork of the Rust Language for experimenting with GPU support.
https://www.rust-lang.org
Other
5 stars 0 forks source link

Use the `addrspace` attribute when generating llvm-ir #6

Open japaric opened 8 years ago

japaric commented 8 years ago

The llvm IR of nvptx targets should make use of the addrspace attributes to mark to which memory region a pointer points to.

The example in the LLVM's guide to PTX uses the addrspace(1) (global memory) on pointers that are used as kernel parameters.

More info about address spaces here

We should take a look at the LLVM IR that other cuda frontends (like clang) generate.