Add support for optimization reports.
authorDiego Novillo <dnovillo@google.com>
Tue, 8 Apr 2014 16:42:34 +0000 (16:42 +0000)
committerDiego Novillo <dnovillo@google.com>
Tue, 8 Apr 2014 16:42:34 +0000 (16:42 +0000)
commitccbf1d2a05a63f18bedbeddffe930cc70d5f5823
tree43e244afa7130b9a97233c021c316e00bb659fd9
parent60db02b6feaa7fe08dfeac04a62e3c8ae4298fa1
Add support for optimization reports.

Summary:
This patch adds backend support for -Rpass=, which indicates the name
of the optimization pass that should emit remarks stating when it
made a transformation to the code.

Pass names are taken from their DEBUG_NAME definitions.

When emitting an optimization report diagnostic, the lack of debug
information causes the diagnostic to use "<unknown>:0:0" as the
location string.

This is the back end counterpart for

http://llvm-reviews.chandlerc.com/D3226

Reviewers: qcolombet

CC: llvm-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D3227

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@205774 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/IR/DiagnosticInfo.h
include/llvm/IR/LLVMContext.h
lib/IR/DiagnosticInfo.cpp
lib/IR/LLVMContext.cpp
lib/Transforms/IPO/Inliner.cpp