< Compile Options / Optimize Options >
The default for this option is alias=noansi.
This option selects whether to perform optimization with consideration for the type of the data indicated by the pointer. |
When alias=ansi is specified, based on the ANSI standard, optimization considering the type of the data indicated by the pointer is performed. Although the performance of object code is generally better than when alias=noansi is specified, the results of execution may differ according to whether alias=ansi or alias=noansi is specified. |
In the same way as in V. 1.00, ANSI-standard based optimization in consideration of the type of data indicated by pointers is not performed when alias=noansi is specified. |
The value of n is reloaded at (A) since it is regarded that there is a possibility of the value of n being rewritten by *ps = 2.
_func: MOV.L #_n,R4 MOV.L #1,[R4] ; n = 1; MOV.W #2,[R1] ; *ps = 2; MOV.L [R4],R5 ; (A) n is reloaded MOV.L #_x,R4 MOV.L R5,[R4] RTS |
The value used in assignment at n = 1 is reused at (B) because it is regarded that the value of n will not change at *ps = 2 since *ps and n have different types.
(If the value of n is changed by *ps = 2, the result is also changed.)