This is an archive of the discontinued LLVM Phabricator instance.

[RISCV] Add cleanup pass for TLS local dynamic
Needs ReviewPublic

Authored by paulkirth on May 25 2023, 9:03 AM.



In the local dynamic case, redundant loads of _TLS_MODULE_BASE_
can be removed. This patch follows the precedent for other backends by
using a dominator relationship to find these loads and replace their
uses whenever it is possible.

Diff Detail

Event Timeline

paulkirth created this revision.May 25 2023, 9:03 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 25 2023, 9:03 AM
paulkirth requested review of this revision.May 25 2023, 9:03 AM
paulkirth planned changes to this revision.May 25 2023, 9:05 AM

I accidentally merged this patch with a subsequent one, so I'll need to fix that.

paulkirth updated this revision to Diff 525665.May 25 2023, 9:32 AM
paulkirth edited the summary of this revision. (Show Details)

Remove changes from subsequent patches introduced by bad interactive rebase.

paulkirth updated this revision to Diff 525908.May 25 2023, 6:52 PM

Update test to match psABI draft

asb added a comment.Jun 6 2023, 12:32 AM

It's normally helpful to pre-commit test changes like this so the differences introduced by the pass - might it make sense to either directly commit the dedup_localdynamic test (with a TODO comment or similar to indicate it's something that can be improved) or add it to D151464?