This is an archive of the discontinued LLVM Phabricator instance.

IR: Teach Constant::needsRelocation() that relative pointers don't need to be relocated.
ClosedPublic

Authored by pcc on Jul 18 2019, 1:43 PM.

Details

Summary

This causes sections with relative pointers to be marked as read only,
which means that they won't end up sharing pages with writable data.

Event Timeline

pcc created this revision.Jul 18 2019, 1:43 PM
Herald added a project: Restricted Project. · View Herald TranscriptJul 18 2019, 1:43 PM
Herald added a subscriber: hiraditya. · View Herald Transcript
rnk accepted this revision.Jul 18 2019, 1:49 PM

lgtm

This revision is now accepted and ready to land.Jul 18 2019, 1:49 PM
This revision was automatically updated to reflect the committed changes.
ychen added a subscriber: ychen.Jul 18 2019, 1:59 PM
ychen added inline comments.
llvm/lib/IR/Constants.cpp
518

Second isa<BlockAddress>(LHSOp0) -> isa<BlockAddress>(RHSOp0) ?

pcc marked an inline comment as done.Jul 18 2019, 2:03 PM
pcc added inline comments.
llvm/lib/IR/Constants.cpp
518

Good catch, fixed in r366497.