OSDN Git Service

Allow ORE.emit to take a closure to delay building the remark object
authorAdam Nemet <anemet@apple.com>
Tue, 19 Sep 2017 23:00:55 +0000 (23:00 +0000)
committerAdam Nemet <anemet@apple.com>
Tue, 19 Sep 2017 23:00:55 +0000 (23:00 +0000)
commit093624c347baf30d43a40f8916f2c89145411e95
tree6b2c6c241362c8fc483fdf3f3eb27653f52e8a5c
parentbc1a94aae18482b67a5fc07e691cfbed8115aea2
Allow ORE.emit to take a closure to delay building the remark object

In the lambda we are now returning the remark by value so we need to preserve
its type in the insertion operator.  This requires making the insertion
operator generic.

I've also converted a few cases to use the new API.  It seems to work pretty
well.  See the LoopUnroller for a slightly more interesting case.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@313691 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Analysis/OptimizationDiagnosticInfo.h
include/llvm/IR/DiagnosticHandler.h
include/llvm/IR/DiagnosticInfo.h
lib/IR/DiagnosticHandler.cpp
lib/IR/DiagnosticInfo.cpp
lib/Transforms/IPO/Inliner.cpp
lib/Transforms/Utils/LoopUnroll.cpp
lib/Transforms/Vectorize/LoopVectorize.cpp