This is an archive of the discontinued LLVM Phabricator instance.

WholeProgramDevirt: Separate the code that applies optzns from the code that decides whether to apply them. NFCI.
ClosedPublic

Authored by pcc on Feb 8 2017, 7:17 PM.

Details

Diff Detail

Repository
rL LLVM

Event Timeline

pcc created this revision.Feb 8 2017, 7:17 PM
tejohnson added inline comments.Feb 14 2017, 2:21 PM
llvm/lib/Transforms/IPO/WholeProgramDevirt.cpp
587 ↗(On Diff #87753)

Missing the ZExt you added here in D29744.

613 ↗(On Diff #87753)

What is the significance of the change from CreateConstGEP1_64 to getGetElementPtr?

pcc updated this revision to Diff 88450.Feb 14 2017, 2:49 PM
pcc marked an inline comment as done.

Address review comments

pcc added inline comments.Feb 14 2017, 2:49 PM
llvm/lib/Transforms/IPO/WholeProgramDevirt.cpp
613 ↗(On Diff #87753)

The new code simply builds the same constant but using the ConstantExpr APIs, which can be used outside of a function context. In the old code I used IRBuilder to create this constant because it was convenient to do so. In a later change I will need the constant outside of a function context (see D29917) so I cannot use IRBuilder to create it.

This revision is now accepted and ready to land.Feb 14 2017, 4:39 PM
This revision was automatically updated to reflect the committed changes.