[llvm] r296764 - [opt-viewer] Sort entries with identical hotness by source line
Adam Nemet via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 2 09:00:49 PST 2017
Author: anemet
Date: Thu Mar 2 11:00:49 2017
New Revision: 296764
URL: http://llvm.org/viewvc/llvm-project?rev=296764&view=rev
Log:
[opt-viewer] Sort entries with identical hotness by source line
We want entries that are close to each other in the source appear next to each
other.
Modified:
llvm/trunk/utils/opt-viewer/opt-viewer.py
Modified: llvm/trunk/utils/opt-viewer/opt-viewer.py
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/opt-viewer/opt-viewer.py?rev=296764&r1=296763&r2=296764&view=diff
==============================================================================
--- llvm/trunk/utils/opt-viewer/opt-viewer.py (original)
+++ llvm/trunk/utils/opt-viewer/opt-viewer.py Thu Mar 2 11:00:49 2017
@@ -190,7 +190,7 @@ def generate_report(pmap, all_remarks, f
pmap(_render_file_bound, file_remarks.items())
if should_display_hotness:
- sorted_remarks = sorted(all_remarks.itervalues(), key=lambda r: (r.Hotness, r.__dict__), reverse=True)
+ sorted_remarks = sorted(all_remarks.itervalues(), key=lambda r: (r.Hotness, r.File, r.Line, r.Column, r.__dict__), reverse=True)
else:
sorted_remarks = sorted(all_remarks.itervalues(), key=lambda r: (r.File, r.Line, r.Column, r.__dict__))
IndexRenderer(args.output_dir).render(sorted_remarks)
More information about the llvm-commits
mailing list