mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-24 23:28:41 +00:00
LiveIntervalAnalysis: Cleanup computeDeadValues
- This also fixes a bug introduced in r223880 where values were not correctly marked as Dead anymore. - Cleanup computeDeadValues(): split up SubRange code variant, simplify arguments. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@224538 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -158,7 +158,7 @@ namespace llvm {
|
||||
/// shrinkToUses(LiveInterval *li, SmallVectorImpl<MachineInstr*> *dead)
|
||||
/// that works on a subregister live range and only looks at uses matching
|
||||
/// the lane mask of the subregister range.
|
||||
bool shrinkToUses(LiveInterval::SubRange &SR, unsigned Reg);
|
||||
void shrinkToUses(LiveInterval::SubRange &SR, unsigned Reg);
|
||||
|
||||
/// extendToIndices - Extend the live range of LI to reach all points in
|
||||
/// Indices. The points in the Indices array must be jointly dominated by
|
||||
@@ -406,17 +406,15 @@ namespace llvm {
|
||||
/// Compute RegMaskSlots and RegMaskBits.
|
||||
void computeRegMasks();
|
||||
|
||||
/// \brief Walk the values in the @p LR live range and compute which ones
|
||||
/// are dead in live range @p Segments. Dead values are not deleted,
|
||||
/// however:
|
||||
/// Walk the values in @p LI and check for dead values:
|
||||
/// - Dead PHIDef values are marked as unused.
|
||||
/// - if @p dead != nullptr then dead operands are marked as such and
|
||||
/// completely dead machine instructions are added to the @p dead vector.
|
||||
/// - CanSeparate is set to true if the interval may have been separated
|
||||
/// into multiple connected components.
|
||||
void computeDeadValues(LiveRange &Segments, LiveRange &LR,
|
||||
bool *CanSeparate = nullptr, unsigned Reg = 0,
|
||||
SmallVectorImpl<MachineInstr*> *dead = nullptr);
|
||||
/// - Dead operands are marked as such.
|
||||
/// - Completely dead machine instructions are added to the @p dead vector
|
||||
/// if it is not nullptr.
|
||||
/// Returns true if any PHI value numbers have been removed which may
|
||||
/// have separated the interval into multiple connected components.
|
||||
bool computeDeadValues(LiveInterval &LI,
|
||||
SmallVectorImpl<MachineInstr*> *dead);
|
||||
|
||||
static LiveInterval* createInterval(unsigned Reg);
|
||||
|
||||
|
Reference in New Issue
Block a user