Details
- Reviewers
jsji nemanjai steven.zhang syzaara shchenz - Group Reviewers
Restricted Project - Commits
- rG52f33f795305: [PowerPC] Enable redundant TOC save removal on AIX
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
llvm/lib/Target/PowerPC/PPCMIPeephole.cpp | ||
---|---|---|
229–252 | Please add a comment as to why moving the TOC save to the prologue isn't to be done on AIX. | |
486 | On ELFv2, we obviously didn't bother with 32-bit mode because it doesn't really exist. However, on AIX we should probably handle 32-bit mode as well and do this for PPC::STW as well. Then of course, we'll need to update PPCInstrInfo::isTOCSaveMI(). |
llvm/lib/Target/PowerPC/PPCMIPeephole.cpp | ||
---|---|---|
229 | I think this is not actually not a fundamental limitation of the ABI itself? Can we make the comment more clear that "TOC save in prologue" is merely a strategy that hasn't been implemented for the AIX ABI code in LLVM? |
LGTM with one minor comment and one idea about further improvement. Thanks for improving this.
llvm/test/CodeGen/PowerPC/remove-redundant-toc-saves.ll | ||
---|---|---|
2 | Maybe it's better to use AIX64 as prefix comparing with below AIX32? | |
65 | This should be out of this patch's scope, but we should have the opportunity to common TOCSave in block if.then and if.else to their common dominator block entry. Then we should only have one TOCSave in the final assembly. |
llvm/test/CodeGen/PowerPC/remove-redundant-toc-saves.ll | ||
---|---|---|
65 | Thanks for pointing this out. Yes, that's a point for future improvement. |
I think this is not actually not a fundamental limitation of the ABI itself? Can we make the comment more clear that "TOC save in prologue" is merely a strategy that hasn't been implemented for the AIX ABI code in LLVM?