[GVN] Basic optimization remark support
authorAdam Nemet <anemet@apple.com>
Tue, 29 Nov 2016 22:37:01 +0000 (22:37 +0000)
committerAdam Nemet <anemet@apple.com>
Tue, 29 Nov 2016 22:37:01 +0000 (22:37 +0000)
commitd5747be721edab8afa7ef4ff440be55f9a44866f
treed2cfc94f712cc6df0d509e7eb3af7f784b248999
parent849473ae99e6a67af4656ed752fe10d73699751b
[GVN] Basic optimization remark support

[recommiting patches one-by-one to see which breaks the stage2 LTO bot]

Follow-on patches will add more interesting cases.

The goal of this patch-set is to get the GVN messages printed in
opt-viewer from Dhrystone as was presented in my Dev Meeting talk.  This
is the optimization view for the function (the last remark in the
function has a bug which is fixed in this series):
http://lab.llvm.org:8080/artifacts/opt-view_test-suite/build/SingleSource/Benchmarks/Dhrystone/CMakeFiles/dry.dir/html/_org_test-suite_SingleSource_Benchmarks_Dhrystone_dry.c.html#L430

Differential Revision: https://reviews.llvm.org/D26488

llvm-svn: 288210
llvm/include/llvm/IR/DiagnosticInfo.h
llvm/include/llvm/Transforms/Scalar/GVN.h
llvm/lib/IR/DiagnosticInfo.cpp
llvm/lib/Transforms/Scalar/GVN.cpp
llvm/test/Transforms/GVN/opt-remarks.ll [new file with mode: 0644]