Large-model was added first. With the addition of support for multiple PIC
models in LLVM, now add small-model PIC for 32-bit PowerPC, SysV4 ABI. This
generates more optimal code, for shared libraries with less than about 16380
data objects.
Details
Diff Detail
- Repository
- rL LLVM
Event Timeline
lib/Target/PowerPC/PPCAsmPrinter.cpp | ||
---|---|---|
323 ↗ | (On Diff #13837) | It would be nice to have a comment here explaining what the 4 means. |
415 ↗ | (On Diff #13837) | Why? |
lib/Target/PowerPC/PPCISelLowering.cpp | ||
1700 ↗ | (On Diff #13837) | Should we rename the GOTPtr variable? |
1733 ↗ | (On Diff #13837) | Same here. |
lib/Target/PowerPC/PPCInstrInfo.td | ||
3694 ↗ | (On Diff #13837) | Don't need to add a line here. |
test/CodeGen/PowerPC/ppc32-pic.ll | ||
11 ↗ | (On Diff #13837) | SMALL-BSS-LABEL: foo (but make the name something that is not a substring of other things) |
lib/Target/PowerPC/PPCAsmPrinter.cpp | ||
---|---|---|
415 ↗ | (On Diff #13837) | This was part of the cleanup of the original check-in (because both implementations are rather intertwined in code touched, I lumped them together). I can remove this change. |
lib/Target/PowerPC/PPCISelLowering.cpp | ||
1700 ↗ | (On Diff #13837) | In both cases it points to the GOT. Although, GOTPtr is a little silly for 64-bit. |
lib/Target/PowerPC/PPCInstrInfo.td | ||
3694 ↗ | (On Diff #13837) | Hmm, no idea how that snuck in there. |
lib/Target/PowerPC/PPCAsmPrinter.cpp | ||
---|---|---|
415 ↗ | (On Diff #13837) | Specifically, I mean that you renamed ".L.TOC." to ".LTOC.", and I am curious why. |
lib/Target/PowerPC/PPCAsmPrinter.cpp | ||
---|---|---|
415 ↗ | (On Diff #13837) | Aesthetics only. After submitting the PIC and TLS patches, I started cleaning up, and thought the .L.TOC. looked messy. No other reason at all. |
Update the patch to only switch on 'PICLevel::Small', so that the default PIC level is large-model. This way, if no PIC level is specified in the module flags it will always default to Large-model, rather than the current undefined.