[PATCH] Implement Named Register Global Variables in LLVM

Rafael EspĂ­ndola rafael.espindola at gmail.com
Mon Apr 28 15:16:27 PDT 2014


> to and will abort in case the register is not supported or not existent

We always reject at compile time.

> Pointer types are used to make sure it has the same bit width as the
register itself.

Having i32 and i64 versions seems better.

> Warning: There is no register reservation at the moment, so it only
works reliably on non-allocatable registers.

We just just error for now if the register is allocatable.

What was the use case for writing to registers? Maybe split that to
another patch?

Do we need the "stack" pseudo register? If it is only to implement
__builting_stack_pointer, it seems better to do it there. In fact, it
could be implemented as regular function once this is in, no?



On 28 April 2014 16:48, Renato Golin <renato.golin at linaro.org> wrote:
> Hi Behan,
>
> This patch should not work yet. It's just the low-level implementation for the feature. We still need the Clang changes to create the metadata/intrinsic calls from the named register usage, and that's another step. You should still use the inline asm hack for now.
>
> cheers,
> --renato
>
> http://reviews.llvm.org/D3261
>
>




More information about the llvm-commits mailing list