[NFC] Factor out implicit control flow logic from GVN
authorMax Kazantsev <max.kazantsev@azul.com>
Tue, 7 Aug 2018 01:47:20 +0000 (01:47 +0000)
committerMax Kazantsev <max.kazantsev@azul.com>
Tue, 7 Aug 2018 01:47:20 +0000 (01:47 +0000)
commit640cb0036548293c74949801ba9f831344789e99
tree7d3aec6ae25cf7f647600197d08aed4c53f02871
parent7874e40082cc57fc0c44afa40316106789359f0a
[NFC] Factor out implicit control flow logic from GVN

Logic for tracking implicit control flow instructions was added to GVN to
perform PRE optimizations correctly. It appears that GVN is not the only
optimization that sometimes does PRE, so this logic is required in other
places (such as Jump Threading).

This is an NFC patch that encapsulates all ICF-related logic in a dedicated
utility class separated from GVN.

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

llvm-svn: 339086
llvm/include/llvm/Transforms/Scalar/GVN.h
llvm/include/llvm/Transforms/Utils/ImplicitControlFlowTracking.h [new file with mode: 0644]
llvm/lib/Transforms/Scalar/GVN.cpp
llvm/lib/Transforms/Utils/CMakeLists.txt
llvm/lib/Transforms/Utils/ImplicitControlFlowTracking.cpp [new file with mode: 0644]