Modify df_iterator to support post-order actions
authorDavid Callahan <dcallahan@fb.com>
Wed, 5 Oct 2016 21:36:16 +0000 (21:36 +0000)
committerDavid Callahan <dcallahan@fb.com>
Wed, 5 Oct 2016 21:36:16 +0000 (21:36 +0000)
commitc1051ab26e8b2182268130343b9b11e2e4b61df2
tree6a5ccc150ceedc01edc274dd6ac86db2c11c0e66
parent71bba7253e1465daa02a79644baa23926e6b4ccc
Modify df_iterator to support post-order actions

Summary: This makes a change to the state used to maintain visited information for depth first iterator. We know assume a method "completed(...)" which is called after all children of a node have been visited. In all existing cases, this method does nothing so this patch has no functional changes.  It will however allow a client to distinguish back from cross edges in a DFS tree.

Reviewers: nadav, mehdi_amini, dberlin

Subscribers: MatzeB, mzolotukhin, twoh, freik, llvm-commits

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

llvm-svn: 283391
14 files changed:
llvm/include/llvm/ADT/DepthFirstIterator.h
llvm/include/llvm/Analysis/LoopInfoImpl.h
llvm/include/llvm/Analysis/RegionInfo.h
llvm/include/llvm/Analysis/RegionIterator.h
llvm/include/llvm/CodeGen/MachineRegionInfo.h
llvm/include/llvm/IR/Dominators.h
llvm/lib/CodeGen/LiveIntervalAnalysis.cpp
llvm/lib/CodeGen/LiveVariables.cpp
llvm/lib/CodeGen/MachineVerifier.cpp
llvm/lib/CodeGen/PrologEpilogInserter.cpp
llvm/lib/CodeGen/UnreachableBlockElim.cpp
llvm/lib/Target/X86/X86FloatingPoint.cpp
llvm/lib/Transforms/IPO/ArgumentPromotion.cpp
llvm/unittests/ADT/DepthFirstIteratorTest.cpp