OSDN Git Service

[llvm-opt-report] Fix context-sensitive lines where nothing happened
authorHal Finkel <hfinkel@anl.gov>
Sat, 7 Jan 2017 20:21:17 +0000 (20:21 +0000)
committerHal Finkel <hfinkel@anl.gov>
Sat, 7 Jan 2017 20:21:17 +0000 (20:21 +0000)
commit41b81eb9049b1320f72840b92619bcc0030fd480
treefd916dcda322aaf5f571222270f8be09bc514510
parent071eccb2551364f0354a01263f109155280766cd
[llvm-opt-report] Fix context-sensitive lines where nothing happened

Don't print a line multiple times, each for different inlining contexts, if
nothing happened in any context. This prevents situations like this:

 [[
  > main:
 65     |       if ((i * ni + j) % 20 == 0) fprintf
  > print_array:
 65     |       if ((i * ni + j) % 20 == 0) fprintf
 ]]

which could happen if different optimizations were missed in different inlining
contexts.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291361 91177308-0d34-0410-b5e6-96231b3b80d8
test/tools/llvm-opt-report/Inputs/dm.c [new file with mode: 0644]
test/tools/llvm-opt-report/Inputs/dm.yaml [new file with mode: 0644]
test/tools/llvm-opt-report/func-dm.test [new file with mode: 0644]
tools/llvm-opt-report/OptReport.cpp