Skip to content

Use opaque pointers in LLVM passes #12592

@ScottTodd

Description

@ScottTodd

We need to migrate, ideally before our LLVM integrate process catches up to the default change (llvm/llvm-project@946f803) and definitely before the support is fully removed from LLVM/MLIR (4 weeks from now).

Related (for LLVM, not MLIR): #9319

See

We have uses of LLVMTypeConverter that are currently relying on the default of options.useOpaquePointers = false;, and many lit tests that use the typed pointer IR syntax (e.g. !llvm.ptr<i32> instead of !llvm.ptr).

We are definitely affected, as naively switching in ConvertToLLVM.cpp results in errors like this:

[build] D:/dev/projects/iree/tests/e2e/linalg/conv2d.mlir:2:13: error: 'llvm.insertvalue' op Type mismatch: cannot insert '!llvm.ptr<f32>' into '!llvm.struct<(ptr, ptr, i64, array<4 x i64>, array<4 x i64>)>'
[build]   %inputs = util.unfoldable_constant dense<[[[
[build]             ^

Metadata

Metadata

Labels

codegen/llvmLLVM code generation compiler backend

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions