[Mesa-dev] [PATCH 1/9] gallium/radeon: clean up HAVE_LLVM #ifdefs in r600_get_llvm_processor_name

Marek Olšák maraeo at gmail.com
Mon Jan 2 20:35:50 UTC 2017


On Mon, Jan 2, 2017 at 9:26 PM, Ilia Mirkin <imirkin at alum.mit.edu> wrote:
> On Mon, Jan 2, 2017 at 3:16 PM, Marek Olšák <maraeo at gmail.com> wrote:
>> From: Marek Olšák <marek.olsak at amd.com>
>>
>> ---
>>  src/gallium/drivers/radeon/r600_pipe_common.c | 28 +++++++++++----------------
>>  1 file changed, 11 insertions(+), 17 deletions(-)
>>
>> diff --git a/src/gallium/drivers/radeon/r600_pipe_common.c b/src/gallium/drivers/radeon/r600_pipe_common.c
>> index e0b914c..74e8de9 100644
>> --- a/src/gallium/drivers/radeon/r600_pipe_common.c
>> +++ b/src/gallium/drivers/radeon/r600_pipe_common.c
>> @@ -873,37 +873,31 @@ const char *r600_get_llvm_processor_name(enum radeon_family family)
>>         case CHIP_HAINAN: return "hainan";
>>         case CHIP_BONAIRE: return "bonaire";
>>         case CHIP_KABINI: return "kabini";
>>         case CHIP_KAVERI: return "kaveri";
>>         case CHIP_HAWAII: return "hawaii";
>>         case CHIP_MULLINS:
>>                 return "mullins";
>>         case CHIP_TONGA: return "tonga";
>>         case CHIP_ICELAND: return "iceland";
>>         case CHIP_CARRIZO: return "carrizo";
>> -#if HAVE_LLVM <= 0x0307
>> -       case CHIP_FIJI: return "tonga";
>> -       case CHIP_STONEY: return "carrizo";
>> -#else
>> -       case CHIP_FIJI: return "fiji";
>> -       case CHIP_STONEY: return "stoney";
>> -#endif
>> -#if HAVE_LLVM <= 0x0308
>> -       case CHIP_POLARIS10: return "tonga";
>> -       case CHIP_POLARIS11: return "tonga";
>> -       case CHIP_POLARIS12: return "tonga";
>> -#else
>> -       case CHIP_POLARIS10: return "polaris10";
>> -       case CHIP_POLARIS11: return "polaris11";
>> -       case CHIP_POLARIS12: return "polaris11";
>> -#endif
>> -       default: return "";
>> +       case CHIP_FIJI:
>> +               return HAVE_LLVM >= 0x0308 ? "fiji" : "carrizo";
>> +       case CHIP_STONEY:
>> +               return HAVE_LLVM >= 0x0308 ? "stoney" : "carrizo";
>> +       case CHIP_POLARIS10:
>> +               return HAVE_LLVM >= 0x0309 ? "polaris10" : "carrizo";
>> +       case CHIP_POLARIS11:
>> +       case CHIP_POLARIS12: /* same as polaris11 */
>> +               return HAVE_LLVM >= 0x0309 ? "polaris11" : "carrizo";
>
> It looks like you always use a fallback of "carrizo" now, but
> previously that fallback was tonga for all but stoney. Just thought
> I'd point it out in case it mattered.

Sorry for not explaining that. It was intended. Carrizo can use more
scalar registers than Tonga. That's why.

Marek


More information about the mesa-dev mailing list