问题
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