[llvm] r296766 - [opt-viewer] Treat remarks with different attributes as different
Adam Nemet via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 2 09:00:56 PST 2017
Author: anemet
Date: Thu Mar 2 11:00:56 2017
New Revision: 296766
URL: http://llvm.org/viewvc/llvm-project?rev=296766&view=rev
Log:
[opt-viewer] Treat remarks with different attributes as different
We used to exclude arguments but for a diffed YAML file, it's interesting to
show these as changes.
Turns out this also affects gvn/LoadClobbered because we used to squash
multiple entries of this on the same line even if they reported clobbers
by *different* instructions. This increases the number of unique entries now
and the share of gvn/LoadClobbered.
Total number of remarks 902287
Top 10 remarks by pass:
inline 43%
gvn 37%
licm 11%
loop-vectorize 4%
asm-printer 3%
regalloc 1%
loop-unroll 1%
inline-cost 0%
slp-vectorizer 0%
loop-delete 0%
Top 10 remarks:
gvn/LoadClobbered 33%
inline/Inlined 16%
inline/CanBeInlined 14%
inline/NoDefinition 7%
licm/Hoisted 6%
licm/LoadWithLoopInvariantAddressInvalidated 5%
gvn/LoadElim 3%
asm-printer/InstructionCount 3%
inline/TooCostly 2%
loop-vectorize/MissedDetails 2%
Modified:
llvm/trunk/utils/opt-viewer/optrecord.py
Modified: llvm/trunk/utils/opt-viewer/optrecord.py
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/opt-viewer/optrecord.py?rev=296766&r1=296765&r2=296766&view=diff
==============================================================================
--- llvm/trunk/utils/opt-viewer/optrecord.py (original)
+++ llvm/trunk/utils/opt-viewer/optrecord.py Thu Mar 2 11:00:56 2017
@@ -103,7 +103,22 @@ class Remark(yaml.YAMLObject):
@property
def key(self):
- return (self.__class__, self.Pass, self.Name, self.File, self.Line, self.Column, self.Function)
+ k = (self.__class__, self.Pass, self.Name, self.File, self.Line, self.Column, self.Function)
+ for arg in self.Args:
+ for (key, value) in arg.iteritems():
+ if type(value) is dict:
+ value = tuple(value.items())
+ k += (key, value)
+ return k
+
+ def __hash__(self):
+ return hash(self.key)
+
+ def __eq__(self, other):
+ return self.key == other.key
+
+ def __repr__(self):
+ return str(self.key)
class Analysis(Remark):
More information about the llvm-commits
mailing list