This is an archive of the discontinued LLVM Phabricator instance.

[LoongArch] Implement MCTargetExpr::fixELFSymbolsInTLSFixups hook
ClosedPublic

Authored by wangleiat on Nov 8 2022, 3:39 AM.

Diff Detail

Event Timeline

wangleiat created this revision.Nov 8 2022, 3:39 AM
Herald added a project: Restricted Project. · View Herald TranscriptNov 8 2022, 3:39 AM
wangleiat requested review of this revision.Nov 8 2022, 3:39 AM
Herald added a project: Restricted Project. · View Herald TranscriptNov 8 2022, 3:39 AM
wangleiat updated this revision to Diff 473948.Nov 8 2022, 3:49 AM

Remove irrelevant code.

SixWeining accepted this revision.Nov 10 2022, 3:44 AM
SixWeining added a reviewer: tangyouling.

LGTM and wait others.

This revision is now accepted and ready to land.Nov 10 2022, 3:44 AM
MaskRay requested changes to this revision.Nov 10 2022, 1:23 PM

This should use an assembly test at MC layer (llvm/test/MC)

llvm/test/CodeGen/LoongArch/tls-symbols.ll
1 ↗(On Diff #473948)

remove <

12 ↗(On Diff #473948)

It's better to use

CHECK-DAG to leave flexibility for MC to order symbol tables in another way. The symbol order is not guaranteed.

This revision now requires changes to proceed.Nov 10 2022, 1:23 PM
wangleiat updated this revision to Diff 474636.Nov 10 2022, 5:13 PM

Address @MaskRay's comments and rebase.

This should use an assembly test at MC layer (llvm/test/MC)

Thanks a lot, it's done.

llvm/test/CodeGen/LoongArch/tls-symbols.ll
1 ↗(On Diff #473948)

thanks

12 ↗(On Diff #473948)

It's better to use

CHECK-DAG to leave flexibility for MC to order symbol tables in another way. The symbol order is not guaranteed.

thanks!

MaskRay accepted this revision.Nov 11 2022, 10:22 AM
MaskRay added inline comments.
llvm/test/MC/LoongArch/Misc/tls-symbols.s
2

remove <

it's conventional to use -o %t and llvm-readobj -s %t

8

{{.*}} can be expanded to GLOBAL DEFAULT. Only a few more characters but check some properties which could be useful.

This revision is now accepted and ready to land.Nov 11 2022, 10:22 AM
wangleiat updated this revision to Diff 474931.Nov 12 2022, 1:20 AM

Use llvm-readobj for test.
Use CHECK directly, since the location doesn't change in the .s file?

wangleiat added inline comments.Nov 12 2022, 1:22 AM
llvm/test/MC/LoongArch/Misc/tls-symbols.s
8

{{.*}} can be expanded to GLOBAL DEFAULT. Only a few more characters but check some properties which could be useful.

thanks!

This revision was landed with ongoing or failed builds.Nov 12 2022, 1:33 AM
This revision was automatically updated to reflect the committed changes.