summaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/drivers/nv50/codegen/nv50_ir.h1
-rw-r--r--src/gallium/drivers/nv50/codegen/nv50_ir_bb.cpp10
-rw-r--r--src/gallium/drivers/nv50/codegen/nv50_ir_ssa.cpp8
3 files changed, 12 insertions, 7 deletions
diff --git a/src/gallium/drivers/nv50/codegen/nv50_ir.h b/src/gallium/drivers/nv50/codegen/nv50_ir.h
index d4e7c945226..74692d8251a 100644
--- a/src/gallium/drivers/nv50/codegen/nv50_ir.h
+++ b/src/gallium/drivers/nv50/codegen/nv50_ir.h
@@ -938,6 +938,7 @@ public:
inline LValue *getLValue(int id);
+ void buildLiveSets();
void buildDefSets();
bool convertToSSA();
diff --git a/src/gallium/drivers/nv50/codegen/nv50_ir_bb.cpp b/src/gallium/drivers/nv50/codegen/nv50_ir_bb.cpp
index 7c8f2e97fb5..54d8ef82bb3 100644
--- a/src/gallium/drivers/nv50/codegen/nv50_ir_bb.cpp
+++ b/src/gallium/drivers/nv50/codegen/nv50_ir_bb.cpp
@@ -416,6 +416,16 @@ Function::orderInstructions(ArrayList &result)
}
void
+Function::buildLiveSets()
+{
+ for (unsigned i = 0; i <= loopNestingBound; ++i)
+ buildLiveSetsPreSSA(BasicBlock::get(cfg.getRoot()), cfg.nextSequence());
+
+ for (ArrayList::Iterator bi = allBBlocks.iterator(); !bi.end(); bi.next())
+ BasicBlock::get(bi)->liveSet.marker = false;
+}
+
+void
Function::buildDefSets()
{
for (unsigned i = 0; i <= loopNestingBound; ++i)
diff --git a/src/gallium/drivers/nv50/codegen/nv50_ir_ssa.cpp b/src/gallium/drivers/nv50/codegen/nv50_ir_ssa.cpp
index 21b6cba251c..f8ee4d53f53 100644
--- a/src/gallium/drivers/nv50/codegen/nv50_ir_ssa.cpp
+++ b/src/gallium/drivers/nv50/codegen/nv50_ir_ssa.cpp
@@ -315,13 +315,7 @@ bool
Function::convertToSSA()
{
// 0. calculate live in variables (for pruned SSA)
- int seq = cfg.nextSequence();
- for (unsigned i = 0; i <= loopNestingBound; seq = cfg.nextSequence(), ++i)
- buildLiveSetsPreSSA(BasicBlock::get(cfg.getRoot()), seq);
-
- // reset liveSet marker for use in regalloc
- for (ArrayList::Iterator bi = allBBlocks.iterator(); !bi.end(); bi.next())
- reinterpret_cast<BasicBlock *>(bi.get())->liveSet.marker = false;
+ buildLiveSets();
// 1. create the dominator tree
domTree = new DominatorTree(&cfg);