[PATCH] D50954: [NFC] Split logic of ImplicitControlFlowTracking to allow generalization

Max Kazantsev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 20 00:46:12 PDT 2018


mkazantsev created this revision.
mkazantsev added reviewers: fedor.sergeev, dberlin, reames, skatkov.
Herald added a subscriber: mgorny.

We have a class `ImplicitControlFlowTracking` which allows us to keep track of
instructions that can abnormally exit and answer queries like "whether or not
there is side-exiting instruction above this instruction in its block".

We may want to have the similar tracking for other types of "special" instructions,
for example instructions that write memory.

This patch separates ImplicitControlFlowTracking into two classes, isolating all
general logic not related to implicit control flow into its parent class. We can
later make another child of this class to keep track of instructions that write
memory.

The motivation for that is that we want to make these checks efficiently in the
patch https://reviews.llvm.org/D50891.


https://reviews.llvm.org/D50954

Files:
  include/llvm/Transforms/Scalar/GVN.h
  include/llvm/Transforms/Utils/ImplicitControlFlowTracking.h
  include/llvm/Transforms/Utils/InstructionPrecedenceTracking.h
  lib/Transforms/Utils/CMakeLists.txt
  lib/Transforms/Utils/ImplicitControlFlowTracking.cpp
  lib/Transforms/Utils/InstructionPrecedenceTracking.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D50954.161426.patch
Type: text/x-patch
Size: 17046 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180820/79c4d411/attachment-0001.bin>


More information about the llvm-commits mailing list