[ADT] Migrate DepthFirstIterator to use NodeRef
authorTim Shen <timshen91@gmail.com>
Thu, 11 Aug 2016 22:36:16 +0000 (22:36 +0000)
committerTim Shen <timshen91@gmail.com>
Thu, 11 Aug 2016 22:36:16 +0000 (22:36 +0000)
commit6aaeb9b1859010589c8522765c46204729d85d60
tree14c87ad21e753398af8ca2a6ad90fec9c025690b
parentcbb5e02f4ae8455e65fae10b0e995489b43411e2
[ADT] Migrate DepthFirstIterator to use NodeRef

Summary:
Notice that the data layout is changed: instead of using
std::pair<PointerIntPair<NodeType*, 1>, ChildItTy>, now use
std::pair<NodeRef, Optional<ChildItTy>>.

A NFC but worth noticing change is operator==(), since we only compare
an iterator against end(), it's better to put an assert there and make
people noticed when it fails.

Reviewers: dblaikie, chandlerc

Subscribers: mzolotukhin, llvm-commits

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

llvm-svn: 278437
llvm/include/llvm/ADT/DepthFirstIterator.h
llvm/include/llvm/Analysis/LoopInfo.h
llvm/include/llvm/Analysis/RegionIterator.h
llvm/include/llvm/CodeGen/MachineDominators.h
llvm/include/llvm/CodeGen/MachineLoopInfo.h
llvm/include/llvm/IR/Dominators.h