Files
llvm-project/mlir/lib/Conversion/ConvertToLLVM/ConvertToLLVMPass.cpp
Fabian Mora 298764a250 [mlir][ToLLVM] Fix the index bitwidth handling for the dynamic case of convert-to-llvm (#156557)
This patch changes the behavior of `convert-to-llvm{dynamic=true}` so
that the nearest `DataLayout` is used to configure LowerToLLVMOptions
and LLVMTypeConverter.

Example:

```mlir
module attributes {dlti.dl_spec = #dlti.dl_spec<#dlti.dl_entry<index, 16>>} {
  func.func private @test_16bit_index(%arg0: index) -> index
}
// mlir-opt --convert-to-llvm="dynamic=true"
module attributes {dlti.dl_spec = #dlti.dl_spec<index = 16 : i64>} {
  llvm.func @test_16bit_index(i16) -> i16 attributes {sym_visibility = "private"}
}
```
2025-09-03 08:07:18 -04:00

12 KiB