[GVN] Basic optimization remark support
[recommitting after the fix in r288307]
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):
Differential Revision: https://reviews.llvm.org/D26488