[PATCH] Implement Named Register Global Variables in LLVM

Behan Webster behanw at converseincode.com
Mon Apr 28 12:56:17 PDT 2014


Works well, but generates an invalid warning:

         register unsigned long sp asm ("sp");

warning: variable 'sp' is uninitialized when used here [-Wuninitialized]

Is there a way this can be fixed without turning off this check?

Behan

On 04/25/14 10:02, Renato Golin wrote:
> Re-writing the patch after Tim's comments. Changes are:
>
> * DAG node is now legal and dealt with by SelectionDAGISel
> * Each TargetLowering restricts the register names locally
> * Generic TargetLowering restricts all (default implementation)
> * Using report_fatal_error instead of llvm_unreachable
> * ARM64 support and test
> * Changed wording in LangRef
> * Fixed some typos
>
> The only change not done is the type (from pointer to polymorphic), discussions should continue.
>
> 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


-- 
Behan Webster
behanw at converseincode.com




More information about the llvm-commits mailing list