This is an archive of the discontinued LLVM Phabricator instance.

WholeProgramDevirt: Implement exporting for uniform ret val opt.
ClosedPublic

Authored by pcc on Feb 10 2017, 1:48 PM.

Diff Detail

Repository
rL LLVM

Event Timeline

pcc created this revision.Feb 10 2017, 1:48 PM
tejohnson added inline comments.Mar 3 2017, 9:28 AM
llvm/lib/Transforms/IPO/WholeProgramDevirt.cpp
707 ↗(On Diff #88049)

The assumption I guess is that we will always have a non-null Res coming into the caller if isExported could possibly be true?

llvm/test/Transforms/WholeProgramDevirt/export-uniform-ret-val.ll
21 ↗(On Diff #88049)

What is this and the below CHECK looking for? They appear to be checking for the same lines being output as were input.

pcc added inline comments.Mar 3 2017, 4:47 PM
llvm/lib/Transforms/IPO/WholeProgramDevirt.cpp
707 ↗(On Diff #88049)

Yes, it can only be true during the export phase.

llvm/test/Transforms/WholeProgramDevirt/export-uniform-ret-val.ll
21 ↗(On Diff #88049)

The pass may change the definitions of the vtables in other cases (i.e. VCP); this is just checking that we are not doing that in this case.

This revision is now accepted and ready to land.Mar 3 2017, 5:00 PM
This revision was automatically updated to reflect the committed changes.