diff options
author | Adam Nemet <anemet@apple.com> | 2017-03-02 17:00:56 +0000 |
---|---|---|
committer | Adam Nemet <anemet@apple.com> | 2017-03-02 17:00:56 +0000 |
commit | 7370dad18e3b75a0d1b04f69138cde19f4e3723b (patch) | |
tree | ea6cdb34b9547450bda1a8f534605687194937db | |
parent | a8b692a8e113e8bc5e7b8cb9a4958d895232b743 (diff) | |
download | bcm5719-llvm-7370dad18e3b75a0d1b04f69138cde19f4e3723b.tar.gz bcm5719-llvm-7370dad18e3b75a0d1b04f69138cde19f4e3723b.zip |
[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%
llvm-svn: 296766
-rw-r--r-- | llvm/utils/opt-viewer/optrecord.py | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/llvm/utils/opt-viewer/optrecord.py b/llvm/utils/opt-viewer/optrecord.py index 4a5733dae7d..8b33c0abfe1 100644 --- a/llvm/utils/opt-viewer/optrecord.py +++ b/llvm/utils/opt-viewer/optrecord.py @@ -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): |