nv50/ir: Rename "mkLoad" to "mkLoadv" for consistency.
[mesa.git] / src / gallium / drivers / nv50 / codegen / nv50_ir_ra.cpp
index 5e5255fc4f88e81921c584c457ae511905198e7e..e0fea4b933754e6f5e8d3be5b3d47f20c35c1528 100644 (file)
@@ -1586,6 +1586,13 @@ RegAlloc::execFunc()
    unsigned int i, retries;
    bool ret;
 
+   if (!func->ins.empty()) {
+      // Insert a nop at the entry so inputs only used by the first instruction
+      // don't count as having an empty live range.
+      Instruction *nop = new_Instruction(func, OP_NOP, TYPE_NONE);
+      BasicBlock::get(func->cfg.getRoot())->insertHead(nop);
+   }
+
    ret = insertConstr.exec(func);
    if (!ret)
       goto out;