This is an archive of the discontinued LLVM Phabricator instance.

[ARM] Modify THREAD_POINTER lowering
Needs ReviewPublic

Authored by samparker on Apr 20 2017, 6:56 AM.
This revision needs review, but there are no reviewers specified.

Details

Reviewers
None
Summary

The current implementation of lowering the thread_pointer intrinsic and ARM's THREAD_POINTER node requires the destination register to be hard-coded in tablegen, which does not seem right to me. I've now changed the ARMthread_pointer node to be purely part of a chain, with the i32 value now being produced by a CopyFromReg from R0. The TPsoft and tTPsoft instructions already add R0 to be one of the implicitly defined registers, as this is the register used to hold the return value of __aeabi_read_tp. The tests have been modified because this implementation allows the call to be slightly reordered.

Diff Detail

Event Timeline

samparker created this revision.Apr 20 2017, 6:56 AM

Hi @compnerd and @dblaikie , would you guys mind taking a look at this? I mainly want to check that the reordering of the call is okay.

Cheers,
sam