Add support for missed and analysis optimization remarks.
authorDiego Novillo <dnovillo@google.com>
Thu, 22 May 2014 14:19:46 +0000 (14:19 +0000)
committerDiego Novillo <dnovillo@google.com>
Thu, 22 May 2014 14:19:46 +0000 (14:19 +0000)
commit7f8af8bf91ac2d33eceac932e3f5282ab2db25ba
treeb06d9fa0fdd5966834b5095d553f2c184128e61c
parent8ff177ede3a1647b71a7db11e273f3dd81ef0ccb
Add support for missed and analysis optimization remarks.

Summary:
This adds two new diagnostics: -pass-remarks-missed and
-pass-remarks-analysis. They take the same values as -pass-remarks but
are intended to be triggered in different contexts.

-pass-remarks-missed is used by LLVMContext::emitOptimizationRemarkMissed,
which passes call when they tried to apply a transformation but
couldn't.

-pass-remarks-analysis is used by LLVMContext::emitOptimizationRemarkAnalysis,
which passes call when they want to inform the user about analysis
results.

The patch also:

1- Adds support in the inliner for the two new remarks and a
   test case.

2- Moves emitOptimizationRemark* functions to the llvm namespace.

3- Adds an LLVMContext argument instead of making them member functions
   of LLVMContext.

Reviewers: qcolombet

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D3682

llvm-svn: 209442
12 files changed:
llvm/include/llvm/IR/DiagnosticInfo.h
llvm/include/llvm/IR/LLVMContext.h
llvm/lib/IR/DiagnosticInfo.cpp
llvm/lib/IR/LLVMContext.cpp
llvm/lib/IR/LLVMContextImpl.cpp
llvm/lib/IR/LLVMContextImpl.h
llvm/lib/Transforms/IPO/Inliner.cpp
llvm/lib/Transforms/Scalar/TailRecursionElimination.cpp
llvm/lib/Transforms/Utils/LoopUnroll.cpp
llvm/lib/Transforms/Utils/SimplifyLibCalls.cpp
llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
llvm/test/Transforms/Inline/optimization-remarks.ll [new file with mode: 0644]