[Attributor] Add interface to emit remarks in Attributor
authorJoseph Huber <jhuber6@vols.utk.edu>
Mon, 7 Jun 2021 18:31:40 +0000 (14:31 -0400)
committerHuber, Joseph <huberjn@ornl.gov>
Tue, 22 Jun 2021 18:12:46 +0000 (14:12 -0400)
commit30e36c9b3c6a6889ea54c0a4cca60768dfc64421
tree5d422e1da7e0b3cf1b8dee7e95dedf7afed602c5
parent015c27caa2c9de22a0a2181675101412ec777cf8
[Attributor] Add interface to emit remarks in Attributor

Summary:
This patch adds support for the Attributor to emit remarks on behalf of some
other pass. The attributor can now optionally take a callback function that
returns an OptimizationRemarkEmitter object when given a Function pointer. If
this is availible then a remark will be emitted for the corresponding pass
name.

Depends on D102197

Reviewed By: sstefan1 thegameg

Differential Revision: https://reviews.llvm.org/D102444
llvm/include/llvm/Transforms/IPO/Attributor.h
llvm/lib/Transforms/IPO/AttributorAttributes.cpp
llvm/lib/Transforms/IPO/OpenMPOpt.cpp
llvm/test/Transforms/OpenMP/remove_globalization.ll
llvm/test/Transforms/OpenMP/replace_globalization.ll