[PATCH] D26967: Put opt-viewer critical items in parallel

Brian Cain via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 30 15:55:50 PST 2016


bcain added a comment.

I'll omit the formatting changes from autopep8, the encoding change and fix the exception handling bug in _get_rermarks() and the render_file() file_remarks/all_remarks bug.



================
Comment at: utils/opt-viewer/opt-viewer.py:337
+    except Exception as e:
+        print('detail', e)
+
----------------
This is not how this failure should get reported.


================
Comment at: utils/opt-viewer/opt-viewer.py:378-396
+def generate_report(all_remarks, output_dir):
+    if Remark.should_display_hotness():
+        sorted_remarks = sorted(all_remarks.itervalues(), key=lambda r: r.Hotness,
+            reverse=True)
+    else:
+        sorted_remarks = sorted(all_remarks.itervalues(), key=lambda r: (
+                r.File, r.Line, r.Column))
----------------
anemet wrote:
> Since you're passing all_remarks, it's confusing that you're not passing file_remarks.
Yes, this looks to me like a bug.


Repository:
  rL LLVM

https://reviews.llvm.org/D26967





More information about the llvm-commits mailing list