This is an archive of the discontinued LLVM Phabricator instance.

Use CodegenOpts::less when creating a TargetMachine for clang `-O1`
ClosedPublic

Authored by mehdi_amini on Jan 6 2017, 12:48 PM.

Details

Summary

Clang was initializing the TargetMachine with CodeGenOpt::Default
for O1. This change is aligning it on llc:

-O0: OptLevel = CodeGenOpt::None
-O1: OptLevel = CodeGenOpt::Less
-O2 -Os -Oz: OptLevel = CodeGenOpt::Default
-O3: OptLevel = CodeGenOpt::Aggressive

Event Timeline

mehdi_amini updated this revision to Diff 83404.
mehdi_amini retitled this revision from to Use CodegenOpts::less when creating a TargetMachine for clang `-O1`.
mehdi_amini updated this object.
mehdi_amini added reviewers: echristo, chandlerc.
mehdi_amini added a subscriber: cfe-commits.

clang-format

echristo accepted this revision.Jan 6 2017, 12:56 PM
echristo edited edge metadata.

Sounds fine to me. I want to modify O1 at some point, but there's nothing wrong with consistency for now.

This revision is now accepted and ready to land.Jan 6 2017, 12:56 PM
This revision was automatically updated to reflect the committed changes.