[Local] Make DoesKMove required for combineMetadata.
authorFlorian Hahn <florian.hahn@arm.com>
Fri, 24 Aug 2018 11:40:04 +0000 (11:40 +0000)
committerFlorian Hahn <florian.hahn@arm.com>
Fri, 24 Aug 2018 11:40:04 +0000 (11:40 +0000)
commit406f1ff1cdfe3ef065a3ac3414ff1672dcfb9049
tree6ace68331402e73d75694236d0ced20b8cab2940
parenta98961bc841fe930b80593af2342fa0c7d28d4f8
[Local] Make DoesKMove required for combineMetadata.

This patch makes the DoesKMove argument non-optional, to force people
to think about it. Most cases where it is false are either code hoisting
or code sinking, where we pick one instruction from a set of
equal instructions among different code paths.

Reviewers: dberlin, nlopes, efriedma, davide

Reviewed By: efriedma

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

llvm-svn: 340606
14 files changed:
llvm/include/llvm/Transforms/Utils/Local.h
llvm/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp
llvm/lib/Transforms/InstCombine/InstCombinePHI.cpp
llvm/lib/Transforms/Scalar/GVNHoist.cpp
llvm/lib/Transforms/Scalar/GVNSink.cpp
llvm/lib/Transforms/Scalar/JumpThreading.cpp
llvm/lib/Transforms/Scalar/MemCpyOptimizer.cpp
llvm/lib/Transforms/Utils/Local.cpp
llvm/lib/Transforms/Utils/SimplifyCFG.cpp
llvm/test/Transforms/GVNHoist/hoist-md.ll
llvm/test/Transforms/GVNSink/sink-combine-metadata.ll [new file with mode: 0644]
llvm/test/Transforms/InstCombine/load-combine-metadata-dominance.ll [new file with mode: 0644]
llvm/test/Transforms/InstCombine/phi-load-metadata-dominance.ll [new file with mode: 0644]
llvm/test/Transforms/JumpThreading/combine-metadata.ll [new file with mode: 0644]