Skip to content

[REFACTOR][IR] Remove dead AttrFunctor template - #19528

Merged
tlopex merged 1 commit into
apache:mainfrom
tqchen:tvm-phase-out-attrfunctor-dead-code
May 9, 2026
Merged

tlopex merged 1 commit into
apache:mainfrom
tqchen:tvm-phase-out-attrfunctor-dead-code

Conversation

@tqchen

@tqchen tqchen commented May 9, 2026

Copy link
Copy Markdown
Member

Summary

AttrFunctor is declared infrastructure with no remaining users.
An exhaustive search across include/, src/, tests/, python/,
apps/, web/, and cmake/ confirms zero subclasses, zero friend
declarations, and zero macro callers outside the header itself —
its two internal macros (ATTR_FUNCTOR_DEFAULT, ATTR_FUNCTOR_DISPATCH)
are only used inside src/ir/attr_functor.h. The one
#include "attr_functor.h" in src/ir/attrs.cc is a stale leftover
from a prior migration; that file references only DictAttrs and
AttrFieldInfoNode (from tvm/ir/attrs.h), not any AttrFunctor
symbols.

Removes src/ir/attr_functor.h (150 lines) and drops the stale include.
No build-system changes needed — the header was never enumerated in
any CMakeLists.txt.

AttrFunctor had no remaining subclasses, friend declarations, or macro
callers outside its own header. An exhaustive search across include/,
src/, tests/, python/, apps/, web/, and cmake/ confirms it is unused
infrastructure. The one #include "attr_functor.h" in src/ir/attrs.cc
is a stale leftover from a prior migration — the file references only
DictAttrs and AttrFieldInfoNode (declared in tvm/ir/attrs.h), not any
AttrFunctor symbols.

Removes src/ir/attr_functor.h and drops the stale include.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request removes the attr_functor.h header file and its inclusion in src/ir/attrs.cc. The AttrFunctor template class, which provided a dispatch mechanism for common attribute types and symbolic integer expressions, has been deleted. I have no feedback to provide.

@tlopex
tlopex merged commit 6b27d19 into apache:main May 9, 2026
10 checks passed
tqchen added a commit that referenced this pull request Oct 16, 2026
## Summary

`AttrFunctor` is declared infrastructure with no remaining users.
An exhaustive search across `include/`, `src/`, `tests/`, `python/`,
`apps/`, `web/`, and `cmake/` confirms zero subclasses, zero friend
declarations, and zero macro callers outside the header itself —
its two internal macros (`ATTR_FUNCTOR_DEFAULT`,
`ATTR_FUNCTOR_DISPATCH`)
are only used inside `src/ir/attr_functor.h`. The one
`#include "attr_functor.h"` in `src/ir/attrs.cc` is a stale leftover
from a prior migration; that file references only `DictAttrs` and
`AttrFieldInfoNode` (from `tvm/ir/attrs.h`), not any `AttrFunctor`
symbols.

Removes `src/ir/attr_functor.h` (150 lines) and drops the stale include.
No build-system changes needed — the header was never enumerated in
any `CMakeLists.txt`.
tqchen added a commit that referenced this pull request Oct 18, 2026
## Summary

`AttrFunctor` is declared infrastructure with no remaining users.
An exhaustive search across `include/`, `src/`, `tests/`, `python/`,
`apps/`, `web/`, and `cmake/` confirms zero subclasses, zero friend
declarations, and zero macro callers outside the header itself —
its two internal macros (`ATTR_FUNCTOR_DEFAULT`,
`ATTR_FUNCTOR_DISPATCH`)
are only used inside `src/ir/attr_functor.h`. The one
`#include "attr_functor.h"` in `src/ir/attrs.cc` is a stale leftover
from a prior migration; that file references only `DictAttrs` and
`AttrFieldInfoNode` (from `tvm/ir/attrs.h`), not any `AttrFunctor`
symbols.

Removes `src/ir/attr_functor.h` (150 lines) and drops the stale include.
No build-system changes needed — the header was never enumerated in
any `CMakeLists.txt`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants