6.1.9.40.13 Optim Flag
The optim psect flag is used to indicate the
optimizations that can be performed on the psect’s content, provided such optimizations are
permitted and have been enabled.
The optimizations are indicated by a colon-separated list of names, shown in the Table 6-11 table. An empty list implies that no optimizations can be performed on the psect.
| Name | Optimization |
|---|---|
inline | Allow the psect content to be inlined. |
jump | Perform jump-based optimizations. |
merge | Allow the psect’s content to be merged with that of other similar psects (PIC10/12/16 devices only). |
pa | Perform proceedural abstraction. |
peep | Perform peephole optimizations. |
remove | Allow the psect to be removed entirely if it is completely inlined. |
split | Allow the psect to be split into smaller psects if it surpasses size restrictions (PIC10/12/16 devices only). |
empty | Perform no optimization on this psect. |
So, for example, the psect definition:
PSECT myText,class=CODE,reloc=2,optim=inline:jump:splitallows the assembler optimizer to perform inlining, splitting and
jump-type optimizations of the myText psect content if those optimizations
are enabled. The definition:
PSECT myText,class=CODE,reloc=2,optim=disables all optimizations associated with this psect regardless of the optimizer setting.
The optim psect flag replaces the use of the separate
psect flags: merge, split, inline and
keep.
