Add initial support for PCRelative addressing to get jump table base address instead of using TOC.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
llvm/lib/Target/PowerPC/PPCISelLowering.cpp | ||
---|---|---|
2913 | I think it would be good if we can put a comment above briefly saying what happens when we have PC relative mem ops. |
LGTM aside from a couple of nits. Feel free to address those on the commit.
llvm/test/CodeGen/PowerPC/jump-table.ll | ||
---|---|---|
13 ↗ | (On Diff #250805) | I think it would be useful to show how the base address is used as well. Please add checks for at least all the instructions until the bctr |
llvm/lib/Target/PowerPC/PPCISelLowering.cpp | ||
---|---|---|
2913 | Also, remove this from the AIX block as there is no PC-Rel on AIX. |
llvm/lib/Target/PowerPC/PPCISelLowering.cpp | ||
---|---|---|
2598–2599 | The naming of the SDNodes is not consistent ConstPoolNode/ GSDN / JT |
llvm/lib/Target/PowerPC/PPCISelLowering.cpp | ||
---|---|---|
2598–2599 | SDNodes GSDN and JT were following the same name convention in "PPCTargetLowering::LowerGlobalAddress" and "PPCTargetLowering::LowerJumpTable", however "ConstPoolNode" is different from the name in "LowerConstantPool" As the code design here has been updated based on nemanja's suggestion in https://reviews.llvm.org/D76294, we can either change the naming for "ConstPoolNode" or apply similar new design here. |
The naming of the SDNodes is not consistent
ConstPoolNode/ GSDN / JT