This is an archive of the discontinued LLVM Phabricator instance.

IRGen: Move vtable load after argument evaluation.
ClosedPublic

Authored by pcc on Jan 30 2018, 7:07 PM.

Details

Summary

This change reduces the live range of the loaded function pointer,
resulting in a slight code size decrease (~10KB in clang), and also
improves the security of CFI for virtual calls by making it less
likely that the function pointer will be spilled, and ensuring that
it is not spilled across a function call boundary.

Fixes PR35353.

Event Timeline

pcc created this revision.Jan 30 2018, 7:07 PM
vsk added a subscriber: vsk.Jan 31 2018, 9:55 AM
vlad.tsyrklevich accepted this revision.Feb 1 2018, 9:30 PM
This revision is now accepted and ready to land.Feb 1 2018, 9:30 PM
This revision was automatically updated to reflect the committed changes.