Deal with irreducible control flow when building traces.
authorJakob Stoklund Olesen <stoklund@2pi.dk>
Wed, 8 Aug 2012 22:12:01 +0000 (22:12 +0000)
committerJakob Stoklund Olesen <stoklund@2pi.dk>
Wed, 8 Aug 2012 22:12:01 +0000 (22:12 +0000)
commite723007ee6911c77bedaa2e914961e86b0b4ce61
tree8032a86076cfb78ab76daa43982eca907ed5293a
parent0ca36afc9d30aa2fe550750b2c3f1d3acf8c9fed
Deal with irreducible control flow when building traces.

We filter out MachineLoop back-edges during the trace-building PO
traversals, but it is possible to have CFG cycles that aren't natural
loops, and MachineLoopInfo doesn't include such cycles.

Use a standard visited set to detect such CFG cycles, and completely
ignore them when picking traces.

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