Everything

-optimize


< Optimizing Linkage Editor (rlink) Options / Optimize Options >

[Format]

-optimize [= <suboption>[,...] ]
<suboption>: { SYmbol_delete | SAMe_code | SHort_format | Branch | SPeed  | SAFe }

 

-

[Default]

When this option is omitted, the default is optimize.

[Description]

-

When optimize is specified, optimization is performed for the file specified with the goptimize option at compilation or assembly.

-

-optimize (no suboptions) executes all optimization. It has the same meaning as
-optimize=symbol_delete,same_code,short_format,branch.

-

-optimize=speed executes optimizations other than those reducing object speed. It has the same meaning as
-optimize=symbol_delete,short_format,branch

-

-optimize=safe executes optimization other than those limited by variable or function attributes. It has the same meaning as -optimize=short_format,branch

-

Other suboptions mean optimization as the following table.

Table 2.18

Suboptions of optimize Option

Suboption

Description

Program to be OptimizedNote1

RXC

RXA

symbol_delete

Deletes variables/functions that are not referenced.

Always be sure to specify #pragma entry at compilation or the entry option in the optimizing linkage editor.

O

X

same_code

Creates a subroutine for the same instruction sequence.

O

X

short_format

Replaces an instruction having a displacement or an immediate value with a smaller-size instruction when the code size of the displacement or immediate value can be reduced.

O

O

branch

Optimizes branch instruction size according to program allocation information. Even if this option is not specified, it is performed when any other optimization is executed.

O

O

Notes 1.

RXC: C/C++ program for RX Family,
RXA: Assembly program for RX Family

[Remarks]

-

When form={object | relocate | library} or strip is specified, this option is unavailable.

-

optimize=symbol_delete is invalid unless the execution start address is specified by using either #pragma entry or the entry option.