[mlir]Moves the StateStack to IR folder from Support folder. (#145598)

[MLIR] Fix circular dependency introduced in In
https://github.com/llvm/llvm-project/pull/144897. This PR is to break
the dependency. by moving StateStack to IR folder

This commit resolves a circular dependency issue between mlir/Support
and mlir/IR:

- Move StateStack.h and StateStack.cpp from Support to IR folder
- Update CMakeLists.txt files to reflect the new locations
- Update Bazel BUILD file to maintain correct dependencies
- Update includes in affected files (flang, Target/LLVMIR)

The circular dependency was caused by StateStack.h depending on
IR/Visitors.h
while other IR files depended on Support. Moving StateStack to IR
eliminates
this cycle while maintaining proper separation of concerns.
This commit is contained in:
Lance Wang
2025-06-24 21:00:13 -07:00
committed by GitHub
parent 505906bff6
commit 77af8bff97
8 changed files with 9 additions and 13 deletions

View File

@@ -4845,11 +4845,7 @@ cc_library(
]),
hdrs = glob(["include/mlir/Support/*.h"]),
includes = ["include"],
deps = [
"//llvm:Support",
"//mlir:IR",
],
)
deps = ["//llvm:Support"],)
cc_library(
name = "Debug",