[all-commits] [llvm/llvm-project] fee71a: [mlir][tosa] Apply 'Symbol' trait to `tosa.variabl...

Luke Hutton via All-commits all-commits at lists.llvm.org
Mon Oct 6 05:14:56 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: fee71a3474ed09eb06a0d2c10edad376cab61ced
      https://github.com/llvm/llvm-project/commit/fee71a3474ed09eb06a0d2c10edad376cab61ced
  Author: Luke Hutton <luke.hutton at arm.com>
  Date:   2025-10-06 (Mon, 06 Oct 2025)

  Changed paths:
    M mlir/include/mlir/Dialect/Tosa/IR/TosaOpBase.td
    M mlir/include/mlir/Dialect/Tosa/IR/TosaUtilOps.td
    M mlir/lib/Dialect/Tosa/IR/TosaOps.cpp
    M mlir/test/Dialect/Tosa/invalid.mlir
    M mlir/test/Dialect/Tosa/invalid_extension.mlir
    M mlir/test/Dialect/Tosa/level_check.mlir
    M mlir/test/Dialect/Tosa/variables.mlir
    M mlir/test/Dialect/Tosa/verifier.mlir

  Log Message:
  -----------
  [mlir][tosa] Apply 'Symbol' trait to `tosa.variable` (#153223)

Implement SymbolOpInterface on tosa.variable so that it's declaration is
automatically inserted into its parents SymbolTable.

Verifiers for tosa.variable_read/write can now look up the symbol and
guarantee it exists, and duplicate names are caught at creation time.
Previously this was completed by walking the graph which could be
inefficient.

Unfortunately, the Symbol trait expects to find a symbol name via a
hard-coded attribute name "sym_name". Therefore, "name" is renamed
to"sym_name" and a getName() wrapper is provided for backwards
compatibility.

This change also restricts tosa.variable declarations to ops that carry
a SymbolTable (e.g. modules), rather than allowing them to be placed
inside a func.func.

Note: EXT-VARIABLE is an experimental extension in the TOSA
specification, so is not subject to backwards compatibility guarantees.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list