r300/compiler: Cleanups from the regalloc merge

This commit is contained in:
Tom Stellard
2011-04-30 13:15:29 -07:00
parent d7cf9833d7
commit 7679a4ddf4
3 changed files with 4 additions and 8 deletions
@@ -149,7 +149,7 @@ void r3xx_compile_fragment_program(struct r300_fragment_program_compiler* c)
{"pair translate", 1, 1, rc_pair_translate, NULL},
{"pair scheduling", 1, 1, rc_pair_schedule, NULL},
{"dead sources", 1, 1, rc_pair_remove_dead_sources, NULL},
{"register allocation", 1, 1, rc_pair_regalloc, opt},
{"register allocation", 1, 1, rc_pair_regalloc, &opt},
{"final code validation", 0, 1, rc_validate_final_shader, NULL},
{"machine code generation", 0, is_r500, r500BuildFragmentProgramHwCode, NULL},
{"machine code generation", 0, !is_r500, r300BuildFragmentProgramHwCode, NULL},
@@ -151,7 +151,7 @@ static void pair_sub_for_all_args(
unsigned int presub_src_count;
struct rc_pair_instruction_source * src_array;
unsigned int j;
// fprintf(stderr, "Presubtract reader\n");
if (src_type & RC_SOURCE_RGB) {
presub_type = fullinst->
U.P.RGB.Src[RC_PAIR_PRESUB_SRC].Index;
@@ -166,9 +166,7 @@ static void pair_sub_for_all_args(
for(j = 0; j < presub_src_count; j++) {
cb(userdata, fullinst, &sub->Arg[i],
&src_array[j]);
// fprintf(stderr, "Callback for presub %u type=%u\n", j, src_type);
}
// fprintf(stderr, "Done presubtract reader\n");
} else {
struct rc_pair_instruction_source * src =
rc_pair_get_src(&fullinst->U.P, &sub->Arg[i]);
@@ -570,8 +568,6 @@ static void get_readers_pair_read_callback(
0 /*Pair Instructions don't use RelAddr*/,
src->File, src->Index, arg->Swizzle);
// fprintf(stderr, "Shared mask = %u for [%u].%u writemask=%u abort=%u exit=%u\n",
// shared_mask, src->Index, arg->Swizzle, d->AliveWriteMask,d->ReaderData->Abort, d->ReaderData->ExitOnAbort);
if (shared_mask == RC_MASK_NONE)
return;
@@ -672,7 +672,7 @@ void rc_pair_regalloc(struct radeon_compiler *cc, void *user)
struct r300_fragment_program_compiler *c =
(struct r300_fragment_program_compiler*)cc;
struct regalloc_state s;
int do_full_regalloc = (int)user;
int * do_full_regalloc = (int*)user;
memset(&s, 0, sizeof(s));
s.C = cc;
@@ -689,7 +689,7 @@ void rc_pair_regalloc(struct radeon_compiler *cc, void *user)
rc_recompute_ips(s.C);
c->AllocateHwInputs(c, &alloc_input_simple, &s);
if (do_full_regalloc) {
if (*do_full_regalloc) {
do_advanced_regalloc(&s);
} else {
s.Simple = 1;