OSDN Git Service

CodeGen: Refactor renameDisconnectedComponents() as a pass
authorMatthias Braun <matze@braunis.de>
Tue, 31 May 2016 22:38:06 +0000 (22:38 +0000)
committerMatthias Braun <matze@braunis.de>
Tue, 31 May 2016 22:38:06 +0000 (22:38 +0000)
commit1cd242fe11b7851fd1a3e8f39ca36f04719dede6
tree79c406f17b4d653155547cb8b0e34439c8fef899
parentc59038317a3f1e0a2fa0410da99129f795319b1a
CodeGen: Refactor renameDisconnectedComponents() as a pass

Refactor LiveIntervals::renameDisconnectedComponents() to be a pass.
Also change the name to "RenameIndependentSubregs":

- renameDisconnectedComponents() worked on a MachineFunction at a time
  so it is a natural candidate for a machine function pass.

- The algorithm is testable with a .mir test now.

- This also fixes a problem where the lazy renaming as part of the
  MachineScheduler introduced IMPLICIT_DEF instructions after the number
  of a nodes in a region were counted leading to a mismatch.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271345 91177308-0d34-0410-b5e6-96231b3b80d8
13 files changed:
include/llvm/CodeGen/LiveInterval.h
include/llvm/CodeGen/LiveIntervalAnalysis.h
include/llvm/CodeGen/Passes.h
include/llvm/InitializePasses.h
lib/CodeGen/CMakeLists.txt
lib/CodeGen/CodeGen.cpp
lib/CodeGen/LiveInterval.cpp
lib/CodeGen/LiveIntervalAnalysis.cpp
lib/CodeGen/LiveRangeUtils.h [new file with mode: 0644]
lib/CodeGen/MachineScheduler.cpp
lib/CodeGen/RenameIndependentSubregs.cpp [new file with mode: 0644]
lib/CodeGen/TargetPassConfig.cpp
test/CodeGen/AMDGPU/rename-independent-subregs.mir [new file with mode: 0644]