This is an archive of the discontinued LLVM Phabricator instance.

CodeGen: Use 32-bit gep offsets to address vtable address points.
ClosedPublic

Authored by pcc on Mar 11 2016, 5:38 PM.

Details

Summary

The relative vtable ABI will use a struct rather than an array as the type
of a vtable. LLVM only allows 32-bit integers as struct indices, so we need
to use 32-bit integers to get addresses of address points. In order to keep
the code simple, we might as well do that unconditionally.

It's probably a reasonable implementation limit to support no more than 2
billion virtual functions per class.

This change causes quite a bit of churn in the test suite, so I'm making
it separately.

Diff Detail

Repository
rL LLVM

Event Timeline

pcc updated this revision to Diff 50506.Mar 11 2016, 5:38 PM
pcc retitled this revision from to CodeGen: Use 32-bit gep offsets to address vtable address points..
pcc updated this object.
pcc added reviewers: rsmith, rjmccall.
pcc added a subscriber: cfe-commits.
rjmccall edited edge metadata.Mar 13 2016, 12:54 PM

Yes, I guess this is fine.

This revision was automatically updated to reflect the committed changes.