Optimization Options - Optimization Options - 2026.1 English - UG1076

AI Engine Tools and Flows User Guide (UG1076)

Document ID
UG1076
Release Date
2026-06-23
Version
2026.1 English

xlopt

Enable kernel optimizations based on the specified value. The default value depends on the target AI Engine architecture.

Table 1. Target Architecture xlopt Values
Target Architecture Default xlopt Value
AI Engine (AIE) 1
AI Engine-ML (AIE-ML) 1
AI Engine-ML v2 (AIE-MLv2) 0
Accepted Values
0: No kernel optimizations applied. On AIE-MLv2, automatic heap and stack estimation is performed at this level (see heapsize).
1: Computation of heap size, generation of guidance based on LLVM IR analysis, and insertion of loop pragmas. Supported on AIE and AIE-ML. On AIE-MLv2, requesting xlopt=1 is silently downgraded to xlopt=0.
2: Deprecated in v2026.1. Falls back to xlopt=0 with a warning.
xlopt=1

Xxloptstr

Option string to enable or disable optimizations in XLOpt level 1. Has no effect when xlopt=0.

  • -annotate-pragma: Insertion of loop unrolling, pipelining, and flattening pragmas (default = true).
  • When you set -align-global-array=1, the compiler aligns global arrays to twice the physical memory bank width. This automatic alignment optimizes load/store performance. Load/Store ports bitwidth is twice the width of a physical bank and aligned on an even index physical bank. This option automatically aligns the data to the even index bank address.
Xxloptstr=-annotate-pragma
Note: The -xlinline-threshold=T sub-option was applicable only at optlevel=2. With the deprecation of xlopt=2 in v2026.1, this sub-option has no effect.