[PATCH] D32292: [ARM] Modify THREAD_POINTER lowering

Sam Parker via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 20 06:58:00 PDT 2017


samparker created this revision.
Herald added subscribers: rengolin, aemerson.

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.


https://reviews.llvm.org/D32292

Files:
  lib/Target/ARM/ARMExpandPseudoInsts.cpp
  lib/Target/ARM/ARMISelLowering.cpp
  lib/Target/ARM/ARMInstrInfo.td
  lib/Target/ARM/ARMInstrThumb.td
  test/CodeGen/ARM/2010-12-08-tpsoft.ll
  test/CodeGen/ARM/aeabi-read-tp.ll
  test/CodeGen/Thumb2/tls2.ll
  test/CodeGen/Thumb2/tpsoft.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D32292.95950.patch
Type: text/x-patch
Size: 8226 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170420/f0220e56/attachment.bin>


More information about the llvm-commits mailing list