Other Parts Discussed in Thread: CCSTUDIO
Hi Champs,
I ask this for our customer. Now they have some questions about compiler optimization
① The customer looked at C:\ti\ccs1100\ccs\eclipse\plugins\com.ti.ccstudio.usersguide.doc_11.0.0.202109231134\html\images\c28x_compiler_optimization.pdf, there is such a page in this document as shown below. Customer checked the assembly code of several loops and found that the assembly results of int variables and uint variables are the same regardless of whether optimization is turned on or not. I didn't find an explanation for this part either, could you please help to check why it prefer signed over unsigned?
② After enabling optimization, is there a possibility that the execution order of C programs will be disrupted? For example, if optimization is turned on, in the following code, is it possible that the function call will be executed before statement1 or after statement2? If the function call is an inline function or an Intrinsic function, will this situation happen?
③ TMS320C28x Optimizing C/C++ Compiler v21.12.0.STS User's Guide mentions that special care should be taken when using assembly statements. The introduction of enabling O3 optimization and _program_level_optimization options is more detailed. How to avoid problems when optimizing O2 and below, is there a design guide? In addition, does the Intrinsic function also have the same problem as the assembly statement?
Could you please kindly help answer these customer questions? Thanks!
Best Regards,
Julia