Skip to content

[Water] Verify Attribute types for WaveExprListAttr  #512

@tgymnich

Description

@tgymnich

Have verifiers for WaveExprListAttr verifying the symbol attributes being either a WaveSymbolAttr or WaveIndexSymbolAttr or both, To avoid
duplication of code like this:

if (!llvm::all_of(lds_load_vector_sizes.getSymbols(), llvm::IsaPred<WaveSymbolAttr, WaveIndexSymbolAttr>)) {
   return emitError() << "lds_load_vector_sizes must only contain WaveSymbolAttr or WaveIndexSymbolAttr";
}

#490 (comment)

Take a look at how Integer attributes use verifiers for a possible solution:
https://github.com/llvm/llvm-project/blob/96c69b7393be845dce997ead88a4cfd3ea0f8944/mlir/include/mlir/IR/CommonAttrConstraints.td#L241-L265

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions