[Mesa-dev] [PATCH] nouveau: Use targ in nv50_ir_generate_code

Tobias Klausmann tobias.johannes.klausmann at mni.thm.de
Mon Aug 31 09:21:00 PDT 2015



On 31.08.2015 17:19, Marcos Paulo de souza wrote:
> ping :)
>
> Em 27-08-2015 12:59, Marcos Paulo de Souza escreveu:
>> instead of call prog->getTarget(), since the target never change in 
>> prog.

It is not changing now, don't know if it will in the future. Using 
prog->getTarget() may save us from hassling with this piece of code 
again. Plus it is more explicit to read in my eyes.

>>
>> Signed-off-by: Marcos Paulo de Souza <marcos.souza.org at gmail.com>
>> ---
>>   src/gallium/drivers/nouveau/codegen/nv50_ir.cpp | 6 +++---
>>   1 file changed, 3 insertions(+), 3 deletions(-)
>>
>> diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir.cpp 
>> b/src/gallium/drivers/nouveau/codegen/nv50_ir.cpp
>> index cce6055..1dad098 100644
>> --- a/src/gallium/drivers/nouveau/codegen/nv50_ir.cpp
>> +++ b/src/gallium/drivers/nouveau/codegen/nv50_ir.cpp
>> @@ -1195,7 +1195,7 @@ nv50_ir_generate_code(struct nv50_ir_prog_info 
>> *info)
>>         prog->print();
>>        targ->parseDriverInfo(info);
>> -   prog->getTarget()->runLegalizePass(prog, nv50_ir::CG_STAGE_PRE_SSA);
>> +   targ->runLegalizePass(prog, nv50_ir::CG_STAGE_PRE_SSA);
>>        prog->convertToSSA();
>>   @@ -1203,7 +1203,7 @@ nv50_ir_generate_code(struct 
>> nv50_ir_prog_info *info)
>>         prog->print();
>>        prog->optimizeSSA(info->optLevel);
>> -   prog->getTarget()->runLegalizePass(prog, nv50_ir::CG_STAGE_SSA);
>> +   targ->runLegalizePass(prog, nv50_ir::CG_STAGE_SSA);
>>        if (prog->dbgFlags & NV50_IR_DEBUG_BASIC)
>>         prog->print();
>> @@ -1212,7 +1212,7 @@ nv50_ir_generate_code(struct nv50_ir_prog_info 
>> *info)
>>         ret = -4;
>>         goto out;
>>      }
>> -   prog->getTarget()->runLegalizePass(prog, nv50_ir::CG_STAGE_POST_RA);
>> +   targ->runLegalizePass(prog, nv50_ir::CG_STAGE_POST_RA);
>>        prog->optimizePostRA(info->optLevel);
>
>

Greetings,
Tobias



More information about the mesa-dev mailing list