This is an archive of the discontinued LLVM Phabricator instance.

[AArch 64] Use a constant pool load for weak symbol references when using static relocation model and small code model
ClosedPublic

Authored by rmaprath on Sep 10 2014, 2:43 AM.

Details

Reviewers
rengolin
Summary

Original patch email: http://thread.gmane.org/gmane.comp.compilers.llvm.cvs/203866 (from Keith Walker)

Currently we generate GOT based relocations for weak symbol references regardless of the underlying relocation model. This should be change so that in static relocation model we use a constant pool load instead. This is a regression from ARM64 - AArch64 merge (it was a constant pool load before).

Diff Detail

Event Timeline

rmaprath updated this revision to Diff 13521.Sep 10 2014, 2:43 AM
rmaprath retitled this revision from to [AArch 64] Use a constant pool load for weak symbol references when using static relocation model and small code model.
rmaprath updated this object.
rmaprath edited the test plan for this revision. (Show Details)
rmaprath updated this object.Sep 10 2014, 2:44 AM
rengolin accepted this revision.Sep 10 2014, 3:28 AM
rengolin added a reviewer: rengolin.
rengolin added a subscriber: rengolin.

As discussed in the list, with the minor comment, LGTM. Thanks!

lib/Target/AArch64/AArch64ISelLowering.cpp
2739

Would be good to add a comment here to state that the ranges are big enough so that this load doesn't end up with the same problem you were trying to fix in the first place.

This revision is now accepted and ready to land.Sep 10 2014, 3:28 AM

Thanks both!

Committed in r217503.

rmaprath closed this revision.Sep 10 2014, 7:13 AM