AnsweredAssumed Answered

Why my VGPRs Usage increases so fast when I use this assignment statement code in OpenCL?

Question asked by yanmin950122 on Apr 12, 2018
Latest reply on Apr 12, 2018 by matszpk
if (condition) {*foundFlag = 1; dst[gid] = gid * crack_cnt + num; break; } 

This code is used in ending kernel funtion when password is found(2 AMD 7970 devices and OpenCL platform). *foundFlag is a pointer to a char value,defined in kernel funtion formal parameters as follows:

__global char * foundFlag, 

when I Comment * foundFlag = 1,the usage of VGPRs by CodeXL,only use 4 VGPRs Registers:Snipaste_2018-04-12_15-13-30.png

But when this line code running,the usage of VGPRs increase to 88 VGPRs Registers:

2.png

I guarantee that I just modified this line of code, and that foundFlag is only used here. I'm confused.If you can help me solve this problem I will be grateful.(0_0)

Outcomes