This is an archive of the discontinued LLVM Phabricator instance.

Generating Assumption loads fix
ClosedPublic

Authored by Prazek on Aug 26 2015, 3:43 PM.

Details

Summary

It wasn't always safe to generate assumption loads. Last time build failed on linking of classes like FenceInst because
it didn't introduce any new virtual function, and it had implicit virtual destructor.

Diff Detail

Event Timeline

Prazek updated this revision to Diff 33262.Aug 26 2015, 3:43 PM
Prazek retitled this revision from to Generating Assumption loads fix.
Prazek updated this object.
Prazek added reviewers: rsmith, majnemer, rjmccall.
Prazek added a subscriber: cfe-commits.
rsmith added inline comments.Aug 26 2015, 3:56 PM
lib/CodeGen/CGCXXABI.h
221

This would benefit from a documentation comment:

Determine whether it's possible to emit a vtable for \p RD, even though we do not know that the vtable has been marked as used by semantic analysis.

I'm also not entirely happy with this name (even though I think I suggested it). canSpeculativelyEmitVTable might be better.

test/CodeGenCXX/vtable-assume-load.cpp
174

Comment doesn't match namespace name testMS.

268–269

Maybe mark this one with FIXME:

Prazek marked 3 inline comments as done.Aug 26 2015, 4:21 PM
Prazek updated this revision to Diff 33269.Aug 26 2015, 4:23 PM
rsmith accepted this revision.Aug 26 2015, 4:25 PM
rsmith edited edge metadata.

LGTM with some comment tweaks.

lib/CodeGen/CGClass.cpp
1861

Typo "availabe"

1863

unused -> safe to speculatively emit

This revision is now accepted and ready to land.Aug 26 2015, 4:25 PM

I will wait with pushing for tomorrow noon, in case someone want's to check the code.

Prazek marked 2 inline comments as done.Aug 26 2015, 4:33 PM
Prazek added inline comments.
lib/CodeGen/CGClass.cpp
1861

lol, I should start to grep availab

Prazek updated this revision to Diff 33273.Aug 26 2015, 4:36 PM
Prazek edited edge metadata.
Prazek marked an inline comment as done.
Prazek marked an inline comment as done.Aug 27 2015, 1:05 PM
Prazek closed this revision.Aug 27 2015, 2:37 PM