summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
diff options
context:
space:
mode:
authorAndrew Trick <atrick@apple.com>2013-06-21 18:33:23 +0000
committerAndrew Trick <atrick@apple.com>2013-06-21 18:33:23 +0000
commit8d02e917f451a3e93ee91bdb2cdc6bdaf119c619 (patch)
tree243e45e314387c9fc4e2e30de4fdc9c9704dba3c /llvm/lib/CodeGen
parent6b9c49a275df11379836138b05cea53a3802ea61 (diff)
downloadbcm5719-llvm-8d02e917f451a3e93ee91bdb2cdc6bdaf119c619.tar.gz
bcm5719-llvm-8d02e917f451a3e93ee91bdb2cdc6bdaf119c619.zip
Added -precompute-phys-liveness for testing LiveIntervals updates.
llvm-svn: 184573
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r--llvm/lib/CodeGen/LiveIntervalAnalysis.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp b/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp
index 18eac4c7f96..368094396b0 100644
--- a/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp
+++ b/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp
@@ -52,6 +52,14 @@ INITIALIZE_PASS_DEPENDENCY(SlotIndexes)
INITIALIZE_PASS_END(LiveIntervals, "liveintervals",
"Live Interval Analysis", false, false)
+#ifndef NDEBUG
+static cl::opt<bool> EnablePrecomputePhysRegs(
+ "precompute-phys-liveness", cl::Hidden,
+ cl::desc("Eagerly compute live intervals for all physreg units."));
+#else
+static bool EnablePrecomputePhysRegs = false;
+#endif // NDEBUG
+
void LiveIntervals::getAnalysisUsage(AnalysisUsage &AU) const {
AU.setPreservesCFG();
AU.addRequired<AliasAnalysis>();
@@ -116,6 +124,12 @@ bool LiveIntervals::runOnMachineFunction(MachineFunction &fn) {
computeRegMasks();
computeLiveInRegUnits();
+ if (EnablePrecomputePhysRegs) {
+ // For stress testing, precompute live ranges of all physical register
+ // units, including reserved registers.
+ for (unsigned i = 0, e = TRI->getNumRegUnits(); i != e; ++i)
+ getRegUnit(i);
+ }
DEBUG(dump());
return true;
}
OpenPOWER on IntegriCloud