[TransformWarning] Do not warn missed transformations in optnone functions.
authorMichael Kruse <llvm@meinersbur.de>
Fri, 14 Dec 2018 19:45:43 +0000 (19:45 +0000)
committerMichael Kruse <llvm@meinersbur.de>
Fri, 14 Dec 2018 19:45:43 +0000 (19:45 +0000)
commitea9ef345581a6bdb6da1bd4c30d614f424254c0d
treef44dd3c76edfc447ed60d9ba2accafe2113ffae7
parentbaaf2cc7ba02aac73e54f6a9ed5867ad90028dd2
[TransformWarning] Do not warn missed transformations in optnone functions.

Optimization transformations are intentionally disabled by the 'optnone'
function attribute. Therefore do not warn if transformation metadata is
still present.

Using the legacy pass manager structure, the `skipFunction` method takes
care for the optnone attribute (already called before this patch). For
the new pass manager, there is no equivalent, so we check for the
'optnone' attribute manually.

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

llvm-svn: 349184
llvm/lib/Transforms/Scalar/WarnMissedTransforms.cpp
llvm/test/Transforms/LoopTransformWarning/optnone.ll [new file with mode: 0644]