[LLVMdev] constants in text section for mips 16

Reed Kotler rkotler at mips.com
Mon Feb 25 11:40:05 PST 2013


Why did you take out the constant island code for Arm 64?

Just did not need it?


On 02/21/2013 12:01 PM, Tim Northover wrote:
> Hi Reed,
>
>> I'm wondering if there is already some mechanism where I can assign literals
>> to the text section and get a label for where it has been stored.
>
> I think putting them in the text section is reasonably simple, though
> doesn't have a generic "pleasePutConstantsAfterFunctions()" call in
> LLVM.
>
> A good place to start would be the reverse of my recent patch to
> AArch64 which removed the entire ConstantIslands thing. It looks like
> the key points are creating a "CONSTPOOL_ENTRY" "instruction" which is
> emitted in the AsmPrinter. A relatively simple pass should be able to
> convert constpool entries as LLVM sees them into such instructions
> (see "doInitialPlacement").
>
> Most of the complexity is in moving the constants around so that
> they're accessible from the instructions that use them, but for a
> first approximation that's not needed (beware, PlumHall's ch7_22 is a
> prime candidate for exercising this ability even with a 1MB range).
>
> Regards.
>
> Tim.
>





More information about the llvm-dev mailing list