| AI Engine-ML v2 Intrinsics User Guide v2025.2

Loading...
Searching...
No Matches
Macros
Optimization annotations
Compiler optimizations » Code annotations

These annotations are used to guide the compiler on how to optimize the use of variables. More...

## Macros
#define | __aie_copy(x)
| Copy of its argument x with own protected uses.
#define | __aie_dont_chain(x)
| Protect value x from chain building (post-modification).
#define | __aie_duplicate(x)
| Protect value x and duplicate its input operation for all its uses.
#define | __aie_keep_dead(x)
| Protect value x from dead code removal.

## Detailed Description

These annotations are used to guide the compiler on how to optimize the use of variables.

## Macro Definition Documentation

## ◆ __aie_copy

#define __aie_copy | ( |  | x | ) |

Value:
(x)

Copy of its argument x with own protected uses.

Parameters

  x | input value.

Returns
  copy of x

## ◆ __aie_dont_chain

#define __aie_dont_chain | ( |  | x | ) |

Value:
(x)

Protect value x from chain building (post-modification).

Parameters

  x | input value.

Returns
  protected copy of x.

## ◆ __aie_duplicate

#define __aie_duplicate | ( |  | x | ) |

Value:
(x)

Protect value x and duplicate its input operation for all its uses.

This is useful for forcing the (re)generation of a constant or some cheap operation inside a loop. This is only valid for functional operations, not for memory accesses.

Parameters

  x | input value.

Returns
  protected copy of x.

## ◆ __aie_keep_dead

#define __aie_keep_dead | ( |  | x | ) |

Value:
(x)

Protect value x from dead code removal.

Parameters

  x | input value.

Returns
  protected copy of x.