OSDN Git Service

LiveInterval: Add utility class to rename independent subregister usage
authorMatthias Braun <matze@braunis.de>
Wed, 20 Jan 2016 00:23:21 +0000 (00:23 +0000)
committerMatthias Braun <matze@braunis.de>
Wed, 20 Jan 2016 00:23:21 +0000 (00:23 +0000)
commit1c6737efbcd0087aea2ecfcbbbb659dd99bd1e26
tree820e2fc37b404a0aea2a99df9b8dd6be531a7852
parent76c52752264fa7a0cff1cdfbbcd3ac0a58bc5e21
LiveInterval: Add utility class to rename independent subregister usage

This renaming is necessary to avoid a subregister aware scheduler
accidentally creating liveness "holes" which are rejected by the
MachineVerifier.

Explanation as found in this patch:

Helper class that can divide MachineOperands of a virtual register into
equivalence classes of connected components.
MachineOperands belong to the same equivalence class when they are part of
the same SubRange segment or adjacent segments (adjacent in control
flow); Different subranges affected by the same MachineOperand belong to
the same equivalence class.

Example:
  vreg0:sub0 = ...
  vreg0:sub1 = ...
  vreg0:sub2 = ...
  ...
  xxx        = op vreg0:sub1
  vreg0:sub1 = ...
  store vreg0:sub0_sub1

The example contains 3 different equivalence classes:
  - One for the (dead) vreg0:sub2 definition
  - One containing the first vreg0:sub1 definition and its use,
    but not the second definition!
  - The remaining class contains all other operands involving vreg0.

We provide a utility function here to rename disjunct classes to different
virtual registers.

Differential Revision: http://reviews.llvm.org/D16126

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