[Remarks] Extend the RemarkStreamer to support other emitters
authorFrancis Visoiu Mistrih <francisvm@yahoo.com>
Mon, 28 Oct 2019 21:53:31 +0000 (14:53 -0700)
committerFrancis Visoiu Mistrih <francisvm@yahoo.com>
Wed, 5 Feb 2020 01:16:02 +0000 (17:16 -0800)
commit7531a5039fd7ee9b48eb8a0d0770e8dfb9fa8bdf
tree85f6ce820fd44fcac45972f3e277ca474b2bdecc
parent1c03cc5a39f7088551151c5c6c64d58819c89369
[Remarks] Extend the RemarkStreamer to support other emitters

This extends the RemarkStreamer to allow for other emitters (e.g.
frontends, SIL, etc.) to emit remarks through a common interface.

See changes in llvm/docs/Remarks.rst for motivation and design choices.

Differential Revision: https://reviews.llvm.org/D73676
23 files changed:
clang/lib/CodeGen/CodeGenAction.cpp
llvm/docs/Remarks.rst
llvm/include/llvm/Analysis/OptimizationRemarkEmitter.h
llvm/include/llvm/CodeGen/AsmPrinter.h
llvm/include/llvm/CodeGen/MachineOptimizationRemarkEmitter.h
llvm/include/llvm/IR/LLVMContext.h
llvm/include/llvm/IR/LLVMRemarkStreamer.h [new file with mode: 0644]
llvm/include/llvm/IR/RemarkStreamer.h [deleted file]
llvm/include/llvm/LTO/LTO.h
llvm/include/llvm/Remarks/RemarkStreamer.h [new file with mode: 0644]
llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
llvm/lib/IR/CMakeLists.txt
llvm/lib/IR/LLVMContext.cpp
llvm/lib/IR/LLVMContextImpl.h
llvm/lib/IR/LLVMRemarkStreamer.cpp [moved from llvm/lib/IR/RemarkStreamer.cpp with 52% similarity]
llvm/lib/LTO/LTO.cpp
llvm/lib/LTO/LTOBackend.cpp
llvm/lib/LTO/LTOCodeGenerator.cpp
llvm/lib/LTO/ThinLTOCodeGenerator.cpp
llvm/lib/Remarks/CMakeLists.txt
llvm/lib/Remarks/RemarkStreamer.cpp [new file with mode: 0644]
llvm/tools/llc/llc.cpp
llvm/tools/opt/opt.cpp