Add -pass-remarks flag to 'opt'.
authorDiego Novillo <dnovillo@google.com>
Tue, 8 Apr 2014 16:42:38 +0000 (16:42 +0000)
committerDiego Novillo <dnovillo@google.com>
Tue, 8 Apr 2014 16:42:38 +0000 (16:42 +0000)
commit35d647b6f371265519df465ad1e7b28de7515185
treead63e722df8f390fd5ad581e07aebba71c5bb7e9
parentccbf1d2a05a63f18bedbeddffe930cc70d5f5823
Add -pass-remarks flag to 'opt'.

Summary:
This adds support in 'opt' to filter pass remarks emitted by
optimization passes. A new flag -pass-remarks specifies which
passes should emit a diagnostic when LLVMContext::emitOptimizationRemark
is invoked.

This will allow the front end to simply pass along the regular
expression from its own -Rpass flag when launching the backend.

Depends on D3227.

Reviewers: qcolombet

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@205775 91177308-0d34-0410-b5e6-96231b3b80d8
lib/IR/LLVMContext.cpp
lib/IR/LLVMContextImpl.cpp
lib/IR/LLVMContextImpl.h
test/Other/optimization-remarks-inline.ll [new file with mode: 0644]