This is an archive of the discontinued LLVM Phabricator instance.

[LTO] Adds a "CodeGenOnly" option. Allows the client to skip the optimizer.
ClosedPublic

Authored by mehdi_amini on Aug 17 2016, 10:44 AM.

Diff Detail

Repository
rL LLVM

Event Timeline

mehdi_amini retitled this revision from to [LTO] Adds a "CodeGenOnly" option. Allows the client to skip the optimizer..
mehdi_amini updated this object.
mehdi_amini added a reviewer: tejohnson.
mehdi_amini added a subscriber: llvm-commits.
tejohnson accepted this revision.Aug 17 2016, 10:03 PM
tejohnson edited edge metadata.

Looks fine but need a test? Is this used for debugging?

This revision is now accepted and ready to land.Aug 17 2016, 10:03 PM

It will be tested by test/ThinLTO/X86/funcimport.ll as soon as ThinLTOCodeGenerator is converted (llvm-lto -thinlto-action=codegen).
Unfortunately, llvm-lto2 is far from on par with llvm-lto at this point and makes it hard to test specific parts of the API.

davide added a subscriber: davide.Aug 19 2016, 7:47 AM

Shouldn't this be semantically equivalent to -O0 ?

Shouldn't this be semantically equivalent to -O0 ?

Not really, O0 runs the always inliner, and uses fast-isel.

davide accepted this revision.Aug 19 2016, 9:08 AM
davide added a reviewer: davide.

Looks good then. Thanks Mehdi!

This revision was automatically updated to reflect the committed changes.
pcc added a comment.Jun 1 2017, 3:03 PM

It looks like we never added testing for this flag. Can we remove it?

This commit was part of the series to get rid of ThinLTOCodeGenerator. Removing this would makes the current state of the "new LTO" further away of the features exposed by ThinLTOCodeGenerator.