]> granicus.if.org Git - llvm/commit
[MachineOutliner][NFC] Simplify logic in pruneCandidates
authorJessica Paquette <jpaquette@apple.com>
Thu, 28 Sep 2017 23:39:36 +0000 (23:39 +0000)
committerJessica Paquette <jpaquette@apple.com>
Thu, 28 Sep 2017 23:39:36 +0000 (23:39 +0000)
commit3564b1df4b8f4a4e4a256d6ad89863cb5da953d8
treeabafdea80d85299b67bb33aba1f7d26d3e239182
parentc7efeba6682f12c178be381b796ccbd98861d38a
[MachineOutliner][NFC] Simplify logic in pruneCandidates

This commit yanks out the repeated sections of code in pruneCandidates into
two lambdas: ShouldSkipCandidate and Prune. This simplifies the logic in
pruneCandidates significantly, and reduces the chance of introducing bugs by
folding all of the shared logic into one place.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@314475 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/MachineOutliner.cpp