a little research

hey ,guys, when we coding a kernel function, it
may use up the registers and get a weak performance
respectively. Even your codemay not use up the
registers of a certain device,but it may use up those
of a different device and perform bad.
So i wanna write a program as a plugin,which will
give you a warning when you coding a kernel function
that may use up the registers.
And what i want to know is if this little tool necessary
or valuable?—

Well it may be valuable if you could know this before compiling and if compiling takes a long time so you dont wanna wait for. But actually register usage cant be determined in advance. How do you think to approximate this? Normally you can check the register usage by passing a compiler flag or using the profiler. But only after compilation.