Calculate dead instructions when a live interval is created.

This gets us closer to being able to remove LiveVariables entirely which is where dead instructions are currently tagged as such.

Reviewed by Jakob Olesen


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210132 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Pete Cooper
2014-06-03 22:42:10 +00:00
parent 957b2cc0f2
commit dc6eaa4125
2 changed files with 29 additions and 9 deletions

View File

@@ -155,6 +155,17 @@ namespace llvm {
bool shrinkToUses(LiveInterval *li,
SmallVectorImpl<MachineInstr*> *dead = nullptr);
/// \brief Walk the values in the given interval and compute which ones
/// are dead. Dead values are not deleted, however:
/// - Dead PHIDef values are marked as unused.
/// - New dead machine instructions are added to the dead vector.
/// - CanSeparate is set to true if the interval may have been separated
/// into multiple connected components.
void computeDeadValues(LiveInterval *li,
LiveRange &LR,
bool *CanSeparate,
SmallVectorImpl<MachineInstr*> *dead);
/// extendToIndices - Extend the live range of LI to reach all points in
/// Indices. The points in the Indices array must be jointly dominated by
/// existing defs in LI. PHI-defs are added as needed to maintain SSA form.