This is an archive of the discontinued LLVM Phabricator instance.

Don't emit inrange for vtable address point when it is not in range.
AbandonedPublic

Authored by eugenis on Mar 6 2017, 5:23 PM.

Details

Reviewers
pcc
Summary

Classes without virtual methods have address point immediately after the virtual table.
Accessing it through inrange getelementptr confuses the global split pass

Diff Detail

Repository
rL LLVM

Event Timeline

eugenis created this revision.Mar 6 2017, 5:23 PM

I can't see how whether the inrange marking is correct could depend on whether the array of virtual methods is empty; AFAIK, it doesn't actually change the layout of anything else. Could you explain in a bit more detail why you think there's a bug in the emission of the inrange marking, as opposed to a bug in the global split pass?

Actually, after sleeping on it, I'm starting to think it's the global split pass that is wrong. One-byte-after is explicitly allowed in the specification for inrange, but the splitting pass simply does not have enough information w/o relying on the knowledge of itanium abi.

eugenis abandoned this revision.Mar 7 2017, 2:45 PM