llvm / llvm/circt

[OM] Missing verifier that output field names don't collide with inputs?

Open
#9,252 5 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
C++
Stars
2.2k
Forks
524
Avg merge
3d 2h
Merged PRs (30d)
46

Description

Consider the following:

``` mlir
om.class @Bar_Class(
%a: !om.integer
) -> (
a: !om.integer
) {
om.class.fields %a : !om.integer
}
```

The input and output have the same name `a`. However, there is no verifier to check this. Is this a bug?

I ran into this when using the evaluator where I accidentally did this and some of the logic for getting the fields was then getting the wrong field.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start at the OM class verifier and the evaluator path that resolves fields, using the reproducer to trace how identical input and output names are handled. Done means the invalid name collision is rejected by verification and the evaluator no longer receives an ambiguous field definition.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
compilers
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.