This is an archive of the discontinued LLVM Phabricator instance.

[mips] Compact branch policy setting
ClosedPublic

Authored by sdardis on May 27 2016, 6:29 AM.

Details

Summary

This patch adds the commandline option -mcompact-branches={never,optimal,always),
which controls how LLVM generates compact branches for MIPSR6 targets. By default,
the compact branch policy is 'optimal' where LLVM will generate the most
appropriate branch for any situation. The 'never' and 'always' policy will disable
or always generate compact branches wherever possible respectfully.

Diff Detail

Repository
rL LLVM

Event Timeline

sdardis updated this revision to Diff 58778.May 27 2016, 6:29 AM
sdardis retitled this revision from to [mips] Compact branch policy setting.
sdardis updated this object.
sdardis added reviewers: dsanders, atanasyan.
sdardis added a subscriber: cfe-commits.
atanasyan accepted this revision.May 27 2016, 6:39 AM
atanasyan edited edge metadata.

LGTM with some nits

lib/Driver/Tools.cpp
1446 ↗(On Diff #58778)

Redundant empty line.

7084 ↗(On Diff #58778)

Redundant empty line.

7085 ↗(On Diff #58778)

Is it possible to re-write this line as:

return llvm::StringSwitch<bool>(CPU)
This revision is now accepted and ready to land.May 27 2016, 6:39 AM
This revision was automatically updated to reflect the committed changes.

Thanks for the review.