[llvm] r357110 - [opt-viewer] Teach optrecord.py about !Failure tags

Jessica Paquette via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 27 11:35:05 PDT 2019


Author: paquette
Date: Wed Mar 27 11:35:04 2019
New Revision: 357110

URL: http://llvm.org/viewvc/llvm-project?rev=357110&view=rev
Log:
[opt-viewer] Teach optrecord.py about !Failure tags

WarnMissedTransforms.cpp produces remarks that use !Failure tags.

These weren't supported in optrecord.py, so if you encountered one in any of
the tools, the tool would crash.

Add them as a type of missed optimization.

Differential Revision: https://reviews.llvm.org/D59895

Modified:
    llvm/trunk/tools/opt-viewer/optrecord.py

Modified: llvm/trunk/tools/opt-viewer/optrecord.py
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/opt-viewer/optrecord.py?rev=357110&r1=357109&r2=357110&view=diff
==============================================================================
--- llvm/trunk/tools/opt-viewer/optrecord.py (original)
+++ llvm/trunk/tools/opt-viewer/optrecord.py Wed Mar 27 11:35:04 2019
@@ -264,6 +264,8 @@ class Missed(Remark):
     def color(self):
         return "red"
 
+class Failure(Missed):
+    yaml_tag = '!Failure'
 
 def get_remarks(input_file, filter_=None):
     max_hotness = 0




More information about the llvm-commits mailing list