aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Analysis/LoopAccessAnalysis.cpp
diff options
context:
space:
mode:
authorOleksandr "Alex" Zinenko <zinenko@google.com>2023-11-23 22:21:39 +0100
committerGitHub <noreply@github.com>2023-11-23 22:21:39 +0100
commit43bc81d7488a8fbd43b855f7e1100cfe110f90fc (patch)
tree59c4aa5e3dd80faaf48a90acf21cca55c889ad1b /llvm/lib/Analysis/LoopAccessAnalysis.cpp
parente90845fb9ea05c1b493769f5a9504df22a1fe355 (diff)
downloadllvm-43bc81d7488a8fbd43b855f7e1100cfe110f90fc.zip
llvm-43bc81d7488a8fbd43b855f7e1100cfe110f90fc.tar.gz
llvm-43bc81d7488a8fbd43b855f7e1100cfe110f90fc.tar.bz2
[mlir] fix LLVM type converter for structs (#73231)
Existing implementation of the LLVM type converter for LLVM structs containing incompatible types was attempting to change identifiers of the struct in case of name clash post-conversion (all identified structs have different names post-conversion since one cannot change the body of the struct once initialized). Beyond a trivial error of not updating the counter in renaming, this approach was broken for recursive structs that can't be made aware of the renaming and would use the pre-existing struct with clashing name instead. For example, given `!llvm.struct<"_Converted.foo", (struct<"_Converted.foo">, f32)>` the following type `!llvm.struct<"foo", (struct<"foo", index>)>` would incorrectly convert to ``` !llvm.struct<"_Converted_1.foo", (struct<"_Converted.foo", (struct<"_Converted.foo">, f32)>)> ``` Remove this incorrect renaming and simply refuse to convert types if it would lead to identifier clashes for structs with different bodies. Document the expectation that such generated names are reserved and must not be present in the input IR of the converter. If we ever actually need to use handle such cases, this can be achieved by temporarily renaming structs with reserved identifiers to an unreserved name and back in a pre/post-processing pass that does _not_ use the type conversion infra.
Diffstat (limited to 'llvm/lib/Analysis/LoopAccessAnalysis.cpp')
0 files changed, 0 insertions, 0 deletions