Add llvm.licm.disable metadata
authorTim Corringham <tcorring@amd.com>
Thu, 8 Aug 2019 13:46:17 +0000 (13:46 +0000)
committerTim Corringham <tcorring@amd.com>
Thu, 8 Aug 2019 13:46:17 +0000 (13:46 +0000)
commit4f64f1ba3c540cddbcf3f7f5e5b8a2fd9ebbb416
tree69bb4c8a06f78dafb8905900509c5f5ba51eebe5
parent195ae90307bdbfcb7393da5dfbbb2bb38ff24107
Add llvm.licm.disable metadata

For some targets the LICM pass can result in sub-optimal code in some
cases where it would be better not to run the pass, but it isn't
always possible to suppress the transformations heuristically.

Where the front-end has insight into such cases it is beneficial
to attach loop metadata to disable the pass - this change adds the
llvm.licm.disable metadata to enable that.

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

llvm-svn: 368296
llvm/docs/LangRef.rst
llvm/include/llvm/Transforms/Utils/LoopUtils.h
llvm/lib/Transforms/Scalar/LICM.cpp
llvm/lib/Transforms/Utils/LoopUtils.cpp
llvm/test/Transforms/LICM/pragma-licm-disable.ll [new file with mode: 0644]