On Power PC some data is stored in the TOC. This pass adds statistics
to show how many entries are emitted to the TOC and what types of
entries those are.
Details
- Reviewers
lei nemanjai amyk kamaub - Group Reviewers
Restricted Project - Commits
- rG398effac36a1: [PowerPC] Add statistics to show the number of entries in the TOC.
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Updated test case to include another thread local value.
Updated the code to include all of the thread local flags.
llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp | ||
---|---|---|
708 |
This patch is supposed to count TOC entries for both AIX and Linux. On AIX I expect to see all of the TLS entries in the TOC. However, on Linux the entries are in the GOT or they are accessed directly from the TBSS section. You can take a look at the test for this patch to get the idea. Having said that, I agree that I should add all the rest of the flags here as well. We want to make sure that if there are changes made to AIX in the future they are covered here. |
Thanks for addressing my comments. I don't have any further comments but I just had one clarification question.
Other than that, the patch LGTM.
llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp | ||
---|---|---|
2877 | I might be missing something but how do we know that the type will be TOCType_GlobalInternal? |
Based on the question from Amy I realized that I had made an incorrect assumption.
Fixed the TType ouput to check if we have an internal or external global.
llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp | ||
---|---|---|
2877 | The TType that we emit here is used for Exception Handling on AIX. |
llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp | ||
---|---|---|
2877 | Thanks Stefan! The change you made LGTM. Thanks for looking into this. |
Just out of curiosity, why couldn't this have been added to the conditional block on line 476?