[LLVMdev] Small Data Adressing support

David Wiberg dwiberg at gmail.com
Mon Aug 11 13:16:42 PDT 2014


Hi Tim,

2014-08-11 21:43 GMT+02:00 Tim Northover <t.p.northover at gmail.com>:
> Hi David,
>
>> If someone has a good picture of how to implement this I would really
>> appreciate some advice.
>
> Have you looked at the GlobalMerge pass, used by ARM & AArch64? It
> doesn't seem to discriminate based on size, but its intent is
> definitely to create a single base pointer. Obviously, it also works
> with object emission.
>
Thanks for your suggestion.

I have taken a look at the pass now and it contains similar logic as I
have in my custom lowering for GlobalAddress to determine if a global
is suitable for SDA addressing. One difference (unless I've
misunderstood something) is that the pass operates on IR level which I
don't think is optimal in my case. The reason is that the ABI dictates
which register to use as base pointer. As such I have a feeling that
it would better to do this at a lower level but I don't have enough
knowledge to say this for certain (please feel free to correct me if
I'm wrong).

- David

> Cheers.
>
> Tim.



More information about the llvm-dev mailing list