summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMatthias Braun <matze@braunis.de>2016-11-11 22:37:31 +0000
committerMatthias Braun <matze@braunis.de>2016-11-11 22:37:31 +0000
commit97c4b7addd559830a25f52774fe477089f329688 (patch)
tree94cf735b733147ca00b80d076a6bd298bb922b6c /include
parente9923d3f0ae504d349398c80ea01017188476f29 (diff)
ScheduleDAGInstrs: Move VRegUses to ScheduleDAGMILive; NFCI
Push VRegUses/collectVRegUses() down the class hierarchy towards its only user ScheduleDAGMILive. NFCI: The initialization of the map happens at a later point but that should not matter. This is in preparation to allow DAG mutators to merge nodes, which relies on this map getting computed later. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286654 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r--include/llvm/CodeGen/MachineScheduler.h5
-rw-r--r--include/llvm/CodeGen/ScheduleDAGInstrs.h7
2 files changed, 5 insertions, 7 deletions
diff --git a/include/llvm/CodeGen/MachineScheduler.h b/include/llvm/CodeGen/MachineScheduler.h
index 62924e0e3b1..8dec2270a65 100644
--- a/include/llvm/CodeGen/MachineScheduler.h
+++ b/include/llvm/CodeGen/MachineScheduler.h
@@ -379,6 +379,9 @@ protected:
MachineBasicBlock::iterator LiveRegionEnd;
+ /// Maps vregs to the SUnits of their uses in the current scheduling region.
+ VReg2SUnitMultiMap VRegUses;
+
// Map each SU to its summary of pressure changes. This array is updated for
// liveness during bottom-up scheduling. Top-down scheduling may proceed but
// has no affect on the pressure diffs.
@@ -491,6 +494,8 @@ protected:
void updateScheduledPressure(const SUnit *SU,
const std::vector<unsigned> &NewMaxPressure);
+
+ void collectVRegUses(SUnit &SU);
};
//===----------------------------------------------------------------------===//
diff --git a/include/llvm/CodeGen/ScheduleDAGInstrs.h b/include/llvm/CodeGen/ScheduleDAGInstrs.h
index 805b33a0114..2746765f6e4 100644
--- a/include/llvm/CodeGen/ScheduleDAGInstrs.h
+++ b/include/llvm/CodeGen/ScheduleDAGInstrs.h
@@ -138,11 +138,6 @@ namespace llvm {
/// scheduling region is mapped to an SUnit.
DenseMap<MachineInstr*, SUnit*> MISUnitMap;
- /// After calling BuildSchedGraph, each vreg used in the scheduling region
- /// is mapped to a set of SUnits. These include all local vreg uses, not
- /// just the uses for a singly defined vreg.
- VReg2SUnitMultiMap VRegUses;
-
/// State internal to DAG building.
/// -------------------------------
@@ -333,8 +328,6 @@ namespace llvm {
/// Returns a mask for which lanes get read/written by the given (register)
/// machine operand.
LaneBitmask getLaneMaskForMO(const MachineOperand &MO) const;
-
- void collectVRegUses(SUnit *SU);
};
/// newSUnit - Creates a new SUnit and return a ptr to it.