This change adds a warning if a parameter is passed with named address space to parameter that is in generic address space.
For example:
int i; to_private(&i); //generate warning as conversion from private to private is redundant.
Differential D51411
[OpenCL] Improve diagnostic of argument in address space conversion builtins AlistairD on Aug 29 2018, 4:01 AM. Authored by
Details This change adds a warning if a parameter is passed with named address space to parameter that is in generic address space. For example: int i; to_private(&i); //generate warning as conversion from private to private is redundant.
Diff Detail Event TimelineComment Actions Is this a feature requested by users? I can understand that this may be useful to pinpoint some conversions which are potentially harmful to performance. However such conversions can often be eliminated by optimization, which makes this warning less useful. On the other hand, too many warnings is a nuance to users, therefore I am wondering whether this warning should be off by default. Do you have any chance to have any feedback from users about how useful or intrusive this warning is.
Comment Actions Hi Sam, no feedback from the user. If you think this is not that useful we won't commit or make is off by default as you suggested. Let us know what you think makes more sense. Comment Actions I suggest to make it off by default. Since implicit casting to generic pointer is allowed by spec, we only want to see this warning when we want to debug performance issues. This comment was removed by AlistairD. Comment Actions Reworded warning message, switched warning off by default, and added it to -Wconversion group |
How about change this to:
may cause dynamic conversion affecting performance