Added -pbqp-pre-coalescing flag to PBQP. If enabled this will cause PBQP to require
authorLang Hames <lhames@gmail.com>
Sun, 18 Jul 2010 00:57:59 +0000 (00:57 +0000)
committerLang Hames <lhames@gmail.com>
Sun, 18 Jul 2010 00:57:59 +0000 (00:57 +0000)
LoopSplitter be run prior to register allocation.

Entirely for testing purposes at the moment.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108634 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/RegAllocPBQP.cpp

index a7ea8e7c3ad3fcda5c94f156cee7fec29958914e..ea2a02ddffa88a76607370716d487ba457ee29b9 100644 (file)
@@ -34,6 +34,7 @@
 #include "PBQP/HeuristicSolver.h"
 #include "PBQP/Graph.h"
 #include "PBQP/Heuristics/Briggs.h"
+#include "Splitter.h"
 #include "VirtRegMap.h"
 #include "VirtRegRewriter.h"
 #include "llvm/CodeGen/CalcSpillWeights.h"
@@ -65,6 +66,11 @@ pbqpCoalescing("pbqp-coalescing",
                 cl::desc("Attempt coalescing during PBQP register allocation."),
                 cl::init(false), cl::Hidden);
 
+static cl::opt<bool>
+pbqpPreSplitting("pbqp-pre-splitting",
+                 cl::desc("Pre-splite before PBQP register allocation."),
+                 cl::init(false), cl::Hidden);
+
 namespace {
 
   ///
@@ -96,6 +102,8 @@ namespace {
       au.addPreserved<LiveStacks>();
       au.addRequired<MachineLoopInfo>();
       au.addPreserved<MachineLoopInfo>();
+      if (pbqpPreSplitting)
+        au.addRequired<LoopSplitter>();
       au.addRequired<VirtRegMap>();
       MachineFunctionPass::getAnalysisUsage(au);
     }