[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
This commit is contained in:
Adam Nemet 2017-03-02 17:00:56 +00:00
parent a8b692a8e1
commit 7370dad18e
1 changed files with 16 additions and 1 deletions

View File

@ -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):