This is an archive of the discontinued LLVM Phabricator instance.

Have MachineBlockPlacement select the start of the cold fragment
Needs RevisionPublic

Authored by deadalnix on Apr 12 2016, 3:34 PM.

Details

Summary

This will provide a solid point for cold splitting. See D17555 for details.

Diff Detail

Event Timeline

deadalnix updated this revision to Diff 53481.Apr 12 2016, 3:34 PM
deadalnix retitled this revision from to Have MachineBlockPlacement select the start of the cold fragment.
deadalnix updated this object.
davidxl added inline comments.Apr 13 2016, 10:33 PM
lib/CodeGen/MachineBlockPlacement.cpp
601

The split for non EH code can not yet be safely implemented as is -- so it is better to be removed:

  1. The cold block outlining currently is only turned on with real profile data;
  2. There is on guarantee that the outlining threshold is greater than the split threshold here.
reames requested changes to this revision.Apr 18 2016, 5:07 PM
reames edited edge metadata.
reames added inline comments.
lib/CodeGen/MachineBlockPlacement.cpp
595

This seems like very strange placement. Why would we update our notion of cold blocks for every hot block we find? I think you want to move this elsewhere and use the last block under the assumption that is coldest? Also, comments to explain your reasoning will be required.

This revision now requires changes to proceed.Apr 18 2016, 5:07 PM