This is an archive of the discontinued LLVM Phabricator instance.

Don't generate llvm.expect in IRGen when using -O0
ClosedPublic

Authored by pete on Jan 26 2015, 11:54 AM.

Details

Summary

This patch stops us from generating llvm.expect when using -O0.

The backend only removes these intrinsics when the optimizer is run, and libLTO doesn't remove them at all. In a debug LTO build, this results in many constant llvm.expect calls which are never optimized out.

Diff Detail

Event Timeline

pete updated this revision to Diff 18777.Jan 26 2015, 11:54 AM
pete retitled this revision from to Don't generate llvm.expect in IRGen when using -O0.
pete updated this object.
pete edited the test plan for this revision. (Show Details)
pete added a reviewer: chandlerc.
pete added a subscriber: Unknown Object (MLST).
chandlerc accepted this revision.Jan 26 2015, 11:58 AM
chandlerc edited edge metadata.

Awesome, thanks!

This revision is now accepted and ready to land.Jan 26 2015, 11:58 AM
This revision was automatically updated to reflect the committed changes.