|
|
|
![]() |
AMD Developer Forums | ![]() |
|
help :
faq :
home
|
||
|
Latest News:
|
latest topics : statistics | |


|
Topic Title: Possible compiler bug ( volatile qualifier ) Topic Summary: Created On: 11/05/2009 06:36 PM Status: Post and Reply |
Linear : Threading : Single : Branch |
Search Topic |
Topic Tools
|
|
|
|
|
Access to memory with volatile qualifier is optimized out by compiler ( only first access is generated to IL/ISA , following reads from the same address are removed ). Sample code global volatile flot4* v; a1 = v[0]; <- this read is generated a2 = v[0]; <- optimized out a3 = v[0]; <- optimized out The standard says "The type qualifiers const, restrict, volatile as defined by the C99 specification are supported". So I think this needs to be corrected.
|
|
|
|
|
|
|
|
|
hazeman,
Thanks for reporting this, I've passed on this test case to the person who owns this. ------------------------- Micah Villmow Advanced Micro Devices Inc. -------------------------------- The information presented in this document is for informational purposes only and may contain technical inaccuracies, omissions and typographical errors. Links to third party sites are for convenience only, and no endorsement is implied. |
|
|
|
|
|
|
|
|
How do you verify that it's getting optimized out? |
|
|
|
|
|
|
|
|
OpenCL is written on top of CAL. So it's a matter of catching calls to CAL library. Here is how http://oscarbg.blogspot.com/2009/10/cal-wrapper-for-getting-amd-il-from.html . |
|
|
|
|
FuseTalk Hosting Executive Plan v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.
| Contact AMD | Terms and Conditions | Forum Rules | ©2009 Advanced Micro Devices, Inc. | Privacy | Trademark information |