I noticed that -reorder-functions=exec-count doesn't work as expected due to
a bug in the comparison function (which isn't symmetric). It is questionable
whether anyone would want to ever use the sorting method (as sorting by say
density is much better in all cases) but it is probably better to fix the bug.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
Added a test. Without the change, the output is
... BOLT-INFO: Starting pass: reorder-functions BOLT-INFO: hot func main (400) BOLT-INFO: hot func func1 (500) BOLT-INFO: hot func func2 (1500) BOLT-INFO: hot func func3 (100) BOLT-INFO: hot func func4 (99) BOLT-INFO: hot func func5 (110) ...