]> granicus.if.org Git - llvm/commit
[LICM] Make sinkRegion and hoistRegion non-recursive
authorDavid Majnemer <david.majnemer@gmail.com>
Thu, 20 Jul 2017 03:27:02 +0000 (03:27 +0000)
committerDavid Majnemer <david.majnemer@gmail.com>
Thu, 20 Jul 2017 03:27:02 +0000 (03:27 +0000)
commitf03c0a25c00288a887da97b20ccbc1cedc5e7885
tree27b0432e71c20a4d70c44032e237493b5dc5f197
parent610076276190fcc386473745b402ac137e3ede84
[LICM] Make sinkRegion and hoistRegion non-recursive

Large CFGs can cause us to blow up the stack because we would have a
recursive step for each basic block in a region.

Instead, create a worklist and iterate it. This limits the stack usage
to something more manageable.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308582 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Scalar/LICM.cpp