greenhills compiler turn off optimization for file or part of

别来无恙 提交于 2019-12-12 03:04:56

问题


I found several code snippets for disabling GCC optimization for dedicated code parts.

with pragma GCC optimize(0)

But I could not found something like that for Greenhils compiler.

Is there no such option?


回答1:


From the manual:

#pragma ghs Ostring
Turns on optimizations. The optional string may contain any or all of the following letters:
L — Loop optimizations
M — Memory optimizations
S — Small (but Slow) optimizations

#pragma ghs ZO
Disables all optimizations, starting from the next function.


来源:https://stackoverflow.com/questions/40852994/greenhills-compiler-turn-off-optimization-for-file-or-part-of

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!