[llvm-commits] [patch] Add TLS hook to MCTargetExpr (AArch64 generic change)

Renato Golin renato.golin at linaro.org
Wed Jan 9 06:39:16 PST 2013


I think it's simple enough to not matter much, but it feels like it's a
useless change without the context (apart from the story in the email,
which makes a lot of sense). I mean, in the long run people won't read your
email and the commit would look useless and detached from the AArch64
back-end, which is the whole point.

Can't you join this when you add the lot of AArch64 fixups?

On a side note, maybe other fixup should be handled the same way, instead
of polluting the common namespace...

cheers,
--renato


On 9 January 2013 14:13, Tim Northover <Tim.Northover at arm.com> wrote:

> Hi all,
>
> ELF ABIs require that TLS symbols should have type STT_TLS. This is
> implemented via the function MCELFStreamer::fixSymbolsInTLSFixups. However,
> this function cannot delve into an MCTargetExpr at the moment.
>
> In practice this means that existing targets put their TLS operand variants
> into the global namespace (VK_ARM_TLSGD, VK_Mips_DTPREL_HI, ...). However,
> the
> AArch64 target has more of these modifiers than all other targets combined
> and
> I felt it was inappropriate to pollute the global space for them.
>
> This patch adds a virtual callback to MCTargetExpr so that analysis doesn't
> stop at this barrier and the work can be delegated to the target.
>
> I believe this can be improved further; the implementatoin of
> MCTargetExpr::fixELFSymbolsInTLSFixups involves more duplication than I'd
> like. However, I would prefer to delay this further refactoring until
> AArch64
> is committed since it would provide an example use to reason from more
> easily.
>
> Can I commit it?
>
> Cheers.
>
> Tim.
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130109/b452f4ce/attachment.html>


More information about the llvm-commits mailing list