[LLVMdev] Address space information dropped

Ivan Llopard ivanllopard at gmail.com
Tue May 8 04:59:38 PDT 2012


Hi Eli,

On 07/05/2012 18:15, Eli Friedman wrote:
> On Mon, May 7, 2012 at 5:15 AM, Ivan Llopard<ivanllopard at gmail.com>  wrote:
>> Hi all,
>>
>> Tuning my TargetAsmPrinter implementation in the back-end side, I
>> discovered that the address space number is not passed down while
>> emitting global variables with constant initializers. The information is
>> dropped at AsmPrinter::EmitGlobalConstant() function call which defaults
>> it to zero.
>
> This sounds like a bug.

The feature added to allow targets emit custom data directives based on 
the address space seems to be broken. However, it doesn't produce any 
odd behavior because it's not used.
The attached patch is quite small and shows where the address space 
information is getting lost and it will correctly propagate it. It also 
avoids existent back-ends to break because of an unimplemented hook in 
MCAsmInfo.

Ivan

>
> -Eli

-------------- next part --------------
A non-text attachment was scrubbed...
Name: addrspace-asmprinter.patch
Type: text/x-patch
Size: 2018 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20120508/e0712e29/attachment.bin>


More information about the llvm-dev mailing list