Rename isEarlierInSameTrace to isUsefulDominator.
authorJakob Stoklund Olesen <stoklund@2pi.dk>
Thu, 7 Mar 2013 23:55:49 +0000 (23:55 +0000)
committerJakob Stoklund Olesen <stoklund@2pi.dk>
Thu, 7 Mar 2013 23:55:49 +0000 (23:55 +0000)
commit6ffcd5efe15156e2a71bd1a33f5f8e27de894ea3
treeee2380879a398f6837aafe546a50378dadc8ceda
parent11687d4982200fe99a820ea513100f237dfc1609
Rename isEarlierInSameTrace to isUsefulDominator.

In very rare cases caused by irreducible control flow, the dominating
block can have the same trace head without actually being part of the
trace.

As long as such a dominator still has valid instruction depths, it is OK
to use it for computing instruction depths.

Rename the function to avoid lying, and add a check that instruction
depths are computed for the dominator.

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