Subzero: Optimize a common live range overlap calculation.
Call instruction lowering includes the FakeKill instruction, which creates several precolored variables, one for each scratch register. The live range for each of these variables consists of a set of "point" ranges, one point for every FakeKill instruction. The overlaps() logic is such that a point range never overlaps with an individual instruction, but it can overlap with a normal non-point range.
It turns out that during register allocation, usually most of the variables on the Inactive list are these FakeKill instructions. The live range representation can be quite large if there are many calls in the function. In the "Check for inactive ranges that have expired or reactivated" section, a lot of time was spent on overlapsStart() calls that were doomed to return false.
This change lets the live range keep track of whether it contains non-point segments, and if not, optimize the overlaps(InstNumberT) method.
BUG= none
R=jvoung@chromium.org
Review URL: https://codereview.chromium.org/631483002
2 files changed