default:
fprintf(stderr, "%s: Bad register file %i\n", __FUNCTION__, file);
/* fall-through */
+ case RC_FILE_NONE:
case RC_FILE_TEMPORARY:
return PVS_SRC_REG_TEMPORARY;
case RC_FILE_INPUT:
if (compiler->Base.Debug) {
fprintf(stderr, "Vertex program after native rewrite:\n");
- rc_print_program(&compiler->Base.Program, 0);
+ rc_print_program(&compiler->Base.Program);
fflush(stderr);
}
if (compiler->Base.Debug) {
fprintf(stderr, "Vertex program after source conflict resolve:\n");
- rc_print_program(&compiler->Base.Program, 0);
+ rc_print_program(&compiler->Base.Program);
+ fflush(stderr);
+ }
+
+ rc_dataflow_deadcode(&compiler->Base, &dataflow_outputs_mark_used, compiler);
+
+ if (compiler->Base.Debug) {
+ fprintf(stderr, "Vertex program after deadcode:\n");
+ rc_print_program(&compiler->Base.Program);
fflush(stderr);
}
- rc_dataflow_annotate(&compiler->Base, &dataflow_outputs_mark_used, compiler);
- rc_dataflow_dealias(&compiler->Base);
rc_dataflow_swizzles(&compiler->Base);
- /* This invalidates dataflow annotations and should be replaced
- * by a future generic register allocation pass. */
allocate_temporary_registers(compiler);
if (compiler->Base.Debug) {
fprintf(stderr, "Vertex program after dataflow:\n");
- rc_print_program(&compiler->Base.Program, 0);
+ rc_print_program(&compiler->Base.Program);
fflush(stderr);
}