LiveInterval: Introduce createMainRangeFromSubranges().
authorMatthias Braun <matze@braunis.de>
Wed, 24 Dec 2014 02:11:51 +0000 (02:11 +0000)
committerMatthias Braun <matze@braunis.de>
Wed, 24 Dec 2014 02:11:51 +0000 (02:11 +0000)
commit8882414a1107586c13c61a7dd39fd460e6594031
tree4f3830a2eee40e959e16206c7c2289748479df71
parent02add3f1a6f3d5c67f1ce129e4a7a517c2b95799
LiveInterval: Introduce createMainRangeFromSubranges().

This function constructs the main liverange by merging all subranges if
subregister liveness tracking is available. This should be slightly
faster to compute instead of performing the liveness calculation again
for the main range. More importantly it avoids cases where the main
liverange would cover positions where no subrange was live. These cases
happened for partial definitions where the actual defined part was dead
and only the undefined parts used later.

The register coalescing requires that every part covered by the main
live range has at least one subrange live.

I also expect this function to become usefull later for places where the
subranges are modified in a way that it is hard to correctly fix the
main liverange in the machine scheduler, we can simply reconstruct it
from subranges then.

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