| AI Engine-ML Intrinsics User Guide (v2026.1)

Loading...
Searching...
No Matches
Macros
Resource allocation annotations
Compiler optimizations » Code annotations

## Overview

These annotations are used to interact with the register allocator.

## Macros
#define | __aie_access_always
| Type qualifier to protect the access to a variable (similar to volatile).
#define | __aie_dm_resource_a
| Alias for __aie_register(DM_bankA).
#define | __aie_dm_resource_ab
| Alias for __aie_register(DM_bankAB).
#define | __aie_dm_resource_ac
| Alias for __aie_register(DM_bankAC).
#define | __aie_dm_resource_ad
| Alias for __aie_register(DM_bankAD).
#define | __aie_dm_resource_b
| Alias for __aie_register(DM_bankB).
#define | __aie_dm_resource_bc
| Alias for __aie_register(DM_bankBC).
#define | __aie_dm_resource_bd
| Alias for __aie_register(DM_bankBD).
#define | __aie_dm_resource_c
| Alias for __aie_register(DM_bankC).
#define | __aie_dm_resource_cd
| Alias for __aie_register(DM_bankCD).
#define | __aie_dm_resource_d
| Alias for __aie_register(DM_bankD).
#define | __aie_dm_resource_stack
| Alias for __aie_register(DM_stack).
#define | __aie_register(x)
| Keep the variable in the specified resource.
#define | __aie_register_keep()
| Keep the variable in a register.
#define | __aie_separator()
| Inserts a sequence point inside a basic block.
#define | __aie_stream_resource_in_a
#define | __aie_stream_resource_in_b
#define | __aie_stream_resource_out_a
#define | __aie_stream_resource_out_b

## Macro Definition Documentation

## ◆ __aie_access_always

#define __aie_access_always

Type qualifier to protect the access to a variable (similar to volatile).

Main difference with volatile is that the compiler will not interfere in the scheduling of __aie_access_always variables. On the other hand, compiler maintains the order of any volatile access in the C source code.

## ◆ __aie_dm_resource_a

#define __aie_dm_resource_a

Alias for __aie_register(DM_bankA).

## ◆ __aie_dm_resource_ab

#define __aie_dm_resource_ab

Alias for __aie_register(DM_bankAB).

## ◆ __aie_dm_resource_ac

#define __aie_dm_resource_ac

Alias for __aie_register(DM_bankAC).

## ◆ __aie_dm_resource_ad

#define __aie_dm_resource_ad

Alias for __aie_register(DM_bankAD).

## ◆ __aie_dm_resource_b

#define __aie_dm_resource_b

Alias for __aie_register(DM_bankB).

## ◆ __aie_dm_resource_bc

#define __aie_dm_resource_bc

Alias for __aie_register(DM_bankBC).

## ◆ __aie_dm_resource_bd

#define __aie_dm_resource_bd

Alias for __aie_register(DM_bankBD).

## ◆ __aie_dm_resource_c

#define __aie_dm_resource_c

Alias for __aie_register(DM_bankC).

## ◆ __aie_dm_resource_cd

#define __aie_dm_resource_cd

Alias for __aie_register(DM_bankCD).

## ◆ __aie_dm_resource_d

#define __aie_dm_resource_d

Alias for __aie_register(DM_bankD).

## ◆ __aie_dm_resource_stack

#define __aie_dm_resource_stack

Alias for __aie_register(DM_stack).

## ◆ __aie_register

#define __aie_register | ( |  | x | ) |

Keep the variable in the specified resource.

It can be a specific register or a specific memory.

## ◆ __aie_register_keep

#define __aie_register_keep | ( |  | ) |

Keep the variable in a register.

The compiler has the freedom to store the variable in any register. This directive imposes that the variable in a instruction is used as a register operand. Even if the variable is constant, this directive will keep it in a register.

## ◆ __aie_separator

#define __aie_separator | ( |  | ) |

Inserts a sequence point inside a basic block.

This directive limits the freedom to reorder the expressions and statements inside a basic block during the register allocation phase.

A __aie_separator() splits a basic block into two smaller blocks, which are sequentialized separately.

## ◆ __aie_stream_resource_in_a

#define __aie_stream_resource_in_a

## ◆ __aie_stream_resource_in_b

#define __aie_stream_resource_in_b

## ◆ __aie_stream_resource_out_a

#define __aie_stream_resource_out_a

## ◆ __aie_stream_resource_out_b

#define __aie_stream_resource_out_b