[PATCH] Implement Named Register Global Variables in LLVM

Rafael EspĂ­ndola rafael.espindola at gmail.com
Mon May 5 10:03:53 PDT 2014

+Warning: There is no register reservation at the moment, so it only

+works reliably on non-allocatable registers.

This is not entirely correct. It is not that allocatable registers
"don't work reliably". We reliably error on them. This should probably
be something like "the use of allocatable registers is rejected".

Other than that all the is missing I thing are tests for the errors.
Please include at lest two. One with a truly wrong name and one with
an allocatable register. On the test with the allocatable register
include a FIXME about producing a more specific error message.

On 4 May 2014 05:29, Renato Golin <renato.golin at linaro.org> wrote:
> Changes:
> * Merging docs to make it easier to not get them outdated
> * Removed the "stack" register name for now
> Not changed:
> * It still doesn't check for allocatable vs. non-allocatable, but it has a list of registers it supports and emit an error if the required register is not on the list. This is not the best solution but it's a placeholder for a better implementation, which should be on another patch.
> For better error reporting, the front-end could do some checking. The errors from the back-end are quite ugly and I'd rather it not be the first line of defence in any case.
> http://reviews.llvm.org/D3261
> Files:
>   docs/LangRef.rst
>   include/llvm/CodeGen/ISDOpcodes.h
>   include/llvm/CodeGen/SelectionDAGISel.h
>   include/llvm/IR/Intrinsics.td
>   include/llvm/Target/TargetLowering.h
>   lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
>   lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
>   lib/CodeGen/SelectionDAG/SelectionDAGDumper.cpp
>   lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
>   lib/Target/AArch64/AArch64ISelLowering.cpp
>   lib/Target/AArch64/AArch64ISelLowering.h
>   lib/Target/ARM/ARMISelLowering.cpp
>   lib/Target/ARM/ARMISelLowering.h
>   lib/Target/ARM64/ARM64ISelLowering.cpp
>   lib/Target/ARM64/ARM64ISelLowering.h
>   lib/Target/X86/X86ISelLowering.cpp
>   lib/Target/X86/X86ISelLowering.h
>   test/CodeGen/AArch64/stackpointer.ll
>   test/CodeGen/ARM/stackpointer.ll
>   test/CodeGen/ARM64/stackpointer.ll
>   test/CodeGen/X86/stackpointer.ll

More information about the llvm-commits mailing list