Download TASKING VX-toolset for RH850 User Guide
Transcript
TASKING VX-toolset for RH850 User Guide
Trade-off value
Try to rewrite top-loops to Optimize loops for
bottom-loops
size/speed
4
yes
size
Example:
int a;
void i( int l, int m )
{
int i;
for ( i = m; i < l; i++ )
{
a++;
}
return;
}
Coded as a bottom loop (compiled with --tradeoff=4) is:
movhi
ld.w
br
@ha(_a),r0,r11
@lo(_a)[r11],r11
.L2
add
add
1,r11
1,r7
cmp
blt
r6,r7
.L3
;; unconditional jump to loop test at bottom
.L3:
.L2:
;; loop entry point
Coded as a top loop (compiled with --tradeoff=0) is:
movhi
ld.w
cmp
bge
@ha(_a),r0,r11
@lo(_a)[r11],r11
r6,r7
.L2
add
add
cmp
blt
1,r11
1,r7
r6,r7
.L3
.L3:
;; test for at least one loop iteration
;; can be omitted when number of iterations is known
;; loop entry point
.L2:
Automatic Function Inlining
You can enable automatic function inlining with the option --optimize=+inline (-Oi) or by using #pragma
optimize +inline. This option is also part of the -O3 predefined option set.
When automatic inlining is enabled, you can use the options --inline-max-incr and --inline-max-size (or
their corresponding pragmas inline_max_incr / inline_max_size) to control automatic inlining.
118
Related documents
Getting Started Guide - v2.1 RH850 C Compiler
RH850 Coding - Renesas Electronics
TMS320C55x Assembly Language Tools User's Guide
LK SERIES PLC – HARDWARE MANUAL
CA850 Ver. 3.20 C Compiler Package Operation UM
CubeSuite+ V1.00.00 Integrated Development Environment User`s
CS+ V3.02.00 Integrated Development Environment User`s Manual
eFLASHLOAD - Renesas Electronics
Renesas RH850 Technical Notes V9.12.256
E1/E20 Emulator Additional Document for User`s Manual (Notes on