This patch adds TLS_IE relocation type to XCOFF writer, and emit code sequence for initial-exec TLS variables.
Details
- Reviewers
amyk hubert.reinterpretcast nemanjai shchenz stefanp lkail - Group Reviewers
Restricted Project - Commits
- rG21bea1a20869: [PowerPC] Support initial-exec TLS relocation on AIX
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
llvm/test/CodeGen/PowerPC/aix-tls-ie-ldst.ll | ||
---|---|---|
1558 | Are these CHECK lines generated by the script? If not, better remove the head line. |
@amyk @hubert.reinterpretcast , do you guys thinks it is ok to make initial exec mode have same code sequences with local exec mode? Seems OK to me.
llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp | ||
---|---|---|
838 | nit: no need for the else | |
llvm/lib/Target/PowerPC/PPCISelLowering.cpp | ||
3360 | Nit: update the comments here. Now we support 3 modes. | |
llvm/test/CodeGen/PowerPC/aix-tls-ie-xcoff-reloc.ll | ||
215 | It may be also necessary to check the relocations in the text section. We want to make sure we have call to .__get_tpointer at 32-bit. |
It is not clear how someone in the future should react if the test case changes behaviour. You should think about maintainability of the test cases. It would appear that a part of the checks were produced using a script and a part was added manually. As such, it is not clear what the essential parts of the tests are so anyone maintaining this in the future must really dive deep into the TLS implementation to understand if changes are safe or not. I'm not sure what the best approach would be. Perhaps add a comment describing what is being tested. Or maybe only test the key parts using manual checks.
llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp | ||
---|---|---|
840 | This message should probably be updated. |
llvm/test/CodeGen/PowerPC/aix-tls-ie-ldst.ll | ||
---|---|---|
1561 | You may add checks of labels L..Cx rather than simply counting number of TOC entries. We should care about each TLV and its corresponding relocation expressions. |
llvm/test/CodeGen/PowerPC/aix-tls-ie-ldst.ll | ||
---|---|---|
1561 | ; CHECK-LABEL: .toc ; CHECK: L..C0: ; CHECK-NEXT: .tc global_int_zero[TE],global_int_zero[TL]@ie ... |
nit: no need for the else