aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/CodeGen
diff options
context:
space:
mode:
authorAndrew Trick <atrick@apple.com>2013-09-04 20:59:59 +0000
committerAndrew Trick <atrick@apple.com>2013-09-04 20:59:59 +0000
commit42ebb3ad41813af292cfa681c1fe2aadd1008721 (patch)
treeabf0f2834ec7c7d95ab971b842a338cf40b15596 /include/llvm/CodeGen
parentb4b7a52ec57ff5d403f6526f24841b1ef81f8706 (diff)
downloadexternal_llvm-42ebb3ad41813af292cfa681c1fe2aadd1008721.zip
external_llvm-42ebb3ad41813af292cfa681c1fe2aadd1008721.tar.gz
external_llvm-42ebb3ad41813af292cfa681c1fe2aadd1008721.tar.bz2
Added -misched-regpressure option.
Register pressure tracking is half the complexity of the scheduler. It's useful to be able to turn it off for compile time and performance comparisons. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189987 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/CodeGen')
-rw-r--r--include/llvm/CodeGen/MachineScheduler.h6
-rw-r--r--include/llvm/CodeGen/RegisterPressure.h2
2 files changed, 6 insertions, 2 deletions
diff --git a/include/llvm/CodeGen/MachineScheduler.h b/include/llvm/CodeGen/MachineScheduler.h
index 69c648c..e36ffdd 100644
--- a/include/llvm/CodeGen/MachineScheduler.h
+++ b/include/llvm/CodeGen/MachineScheduler.h
@@ -227,6 +227,7 @@ protected:
PressureDiffs SUPressureDiffs;
/// Register pressure in this region computed by initRegPressure.
+ bool ShouldTrackPressure;
IntervalPressure RegPressure;
RegPressureTracker RPTracker;
@@ -259,8 +260,9 @@ public:
ScheduleDAGMI(MachineSchedContext *C, MachineSchedStrategy *S):
ScheduleDAGInstrs(*C->MF, *C->MLI, *C->MDT, /*IsPostRA=*/false, C->LIS),
AA(C->AA), RegClassInfo(C->RegClassInfo), SchedImpl(S), DFSResult(0),
- Topo(SUnits, &ExitSU), RPTracker(RegPressure), CurrentTop(),
- TopRPTracker(TopPressure), CurrentBottom(), BotRPTracker(BotPressure),
+ Topo(SUnits, &ExitSU), ShouldTrackPressure(false),
+ RPTracker(RegPressure), CurrentTop(), TopRPTracker(TopPressure),
+ CurrentBottom(), BotRPTracker(BotPressure),
NextClusterPred(NULL), NextClusterSucc(NULL) {
#ifndef NDEBUG
NumInstrsScheduled = 0;
diff --git a/include/llvm/CodeGen/RegisterPressure.h b/include/llvm/CodeGen/RegisterPressure.h
index 694d287..a890bb0 100644
--- a/include/llvm/CodeGen/RegisterPressure.h
+++ b/include/llvm/CodeGen/RegisterPressure.h
@@ -288,6 +288,8 @@ public:
MF(0), TRI(0), RCI(0), LIS(0), MBB(0), P(rp), RequireIntervals(false),
TrackUntiedDefs(false) {}
+ void reset();
+
void init(const MachineFunction *mf, const RegisterClassInfo *rci,
const LiveIntervals *lis, const MachineBasicBlock *mbb,
MachineBasicBlock::const_iterator pos,