[LoopFusion] Extend use of OptimizationRemarkEmitter
authorKit Barton <kbarton@ca.ibm.com>
Tue, 30 Jul 2019 15:58:43 +0000 (15:58 +0000)
committerKit Barton <kbarton@ca.ibm.com>
Tue, 30 Jul 2019 15:58:43 +0000 (15:58 +0000)
commitde0b6339991dcbaeab4a97a96fbf1570118b06ae
tree3e30dd864b86fd994ade8f50f507a57ed3a3cac3
parent57ef94fb06af30d86c561d3cb18f30d43aedd344
[LoopFusion] Extend use of OptimizationRemarkEmitter

Summary:
This patch extends the use of the OptimizationRemarkEmitter to provide
information about loops that are not fused, and loops that are not eligible for
fusion. In particular, it uses the OptimizationRemarkAnalysis to identify loops
that are not eligible for fusion and the OptimizationRemarkMissed to identify
loops that cannot be fused.

It also reuses the statistics to provide the messages used in the
OptimizationRemarks. This provides common message strings between the
optimization remarks and the statistics.

I would like feedback on this approach, in general. If people are OK with this,
I will flesh out additional remarks in subsequent commits.

Subscribers: hiraditya, jsji, llvm-commits

Tags: #llvm

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

llvm-svn: 367327
llvm/lib/Transforms/Scalar/LoopFuse.cpp
llvm/test/Transforms/LoopFusion/diagnostics_analysis.ll [new file with mode: 0644]
llvm/test/Transforms/LoopFusion/diagnostics_missed.ll [new file with mode: 0644]