This is an archive of the discontinued LLVM Phabricator instance.

Add PIC-level support in LLVM, and implement it for PowerPC
AbandonedPublic

Authored by jhibbits on Sep 8 2014, 2:07 PM.

Details

Reviewers
echristo
hfinkel
Summary

This adds PIC-level (small/large) support to LLVM, and implements the
appropriate levels for PowerPC. The PIC Level argument added to
LLVMTargetMachine is ignored by most architectures, but understood by PowerPC
currently (can be added to SPARC, too). The necessary Clang change is in a
separate commit.

Diff Detail

Event Timeline

jhibbits updated this revision to Diff 13420.Sep 8 2014, 2:07 PM
jhibbits retitled this revision from to Add PIC-level support in LLVM, and implement it for PowerPC.
jhibbits updated this object.
jhibbits edited the test plan for this revision. (Show Details)
jhibbits added a reviewer: hfinkel.
jhibbits added a subscriber: Unknown Object (MLST).
jhibbits updated this revision to Diff 13423.Sep 8 2014, 2:57 PM

Remove vestiges of secure-PLT (pointed out by Joerg Sonnenberger), which belongs in a separate commit.

echristo edited edge metadata.Sep 8 2014, 3:01 PM

Go ahead and separate out the relocation bits from the pic level bits please.

Thanks!

include/llvm/MC/MCCodeGenInfo.h
27

Comment to match.

include/llvm/MC/MCExpr.h
253 ↗(On Diff #13423)

Separate patch from the pic level stuff?

jhibbits updated this revision to Diff 13424.Sep 8 2014, 3:40 PM
jhibbits edited edge metadata.

Break out PIC level ABI change. Usage for PowerPC will be separate.

joerg added a subscriber: joerg.Sep 9 2014, 2:52 AM

Any reason for introducing the "default" level and not just go with large? I think that what's almost all software is using anyway.

In D5252#11, @joerg wrote:

Any reason for introducing the "default" level and not just go with large? I think that what's almost all software is using anyway.

I modeled it after the -relocation-model option. By allowing architecture defaults, the default for any given architecture can change without modifying any other arch.

jhibbits updated this revision to Diff 13566.Sep 10 2014, 4:43 PM

Add missing files from previous diff.

jhibbits abandoned this revision.Sep 12 2014, 9:51 AM

Abandoning in favor of D5332 and subsequent PowerPC commit