This is an archive of the discontinued LLVM Phabricator instance.

[AArch64] Mark a move of system register TPIDR_EL0 (thread pointer) as not having side effects.
ClosedPublic

Authored by mcrosier on Mar 20 2017, 2:18 PM.

Diff Detail

Repository
rL LLVM

Event Timeline

mcrosier created this revision.Mar 20 2017, 2:18 PM
gberry edited edge metadata.Mar 21 2017, 8:06 AM

'TP' is a little terse for a name. How about 'MOVbaseTLS' to match with 'MOVaddrTLS'?
Could you also add a test where MachineCSE commons multiple 'mrs' from multiple thread_local loads into a single one?

mcrosier updated this revision to Diff 92504.Mar 21 2017, 9:59 AM

-Address Geoff's comments.

Ping. It would be great to get some feedback from other sub-target owners. FWIW, this is the current behavior of gcc, AFAICT.

t.p.northover edited edge metadata.Mar 23 2017, 3:54 PM

The idea looks fine to me, though I'd suggest including Utils/AArch64BaseInfo.h and using the TPIDR_EL0 enum instead of 0xde82 directly (from AArch64GenSystemOperands.inc).

mcrosier updated this revision to Diff 93137.Mar 27 2017, 8:43 AM

-Address Tim's feedback.

mcrosier accepted this revision.Mar 27 2017, 8:59 AM

Approving, per Tim's comment.

This revision is now accepted and ready to land.Mar 27 2017, 8:59 AM
This revision was automatically updated to reflect the committed changes.