[all-commits] [llvm/llvm-project] adda59: [MLIR] Add index bitwidth to the DataLayout (#85927)
Tobias Gysi via All-commits
all-commits at lists.llvm.org
Thu Mar 21 01:08:18 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: adda597388dc148ac235e755b3e8bbd0a12a3e15
https://github.com/llvm/llvm-project/commit/adda597388dc148ac235e755b3e8bbd0a12a3e15
Author: Tobias Gysi <tobias.gysi at nextsilicon.com>
Date: 2024-03-21 (Thu, 21 Mar 2024)
Changed paths:
M mlir/docs/DataLayout.md
M mlir/include/mlir/Dialect/LLVMIR/LLVMTypes.td
M mlir/include/mlir/Interfaces/DataLayoutInterfaces.h
M mlir/include/mlir/Interfaces/DataLayoutInterfaces.td
M mlir/lib/Dialect/LLVMIR/IR/LLVMTypes.cpp
M mlir/lib/Interfaces/DataLayoutInterfaces.cpp
M mlir/lib/Target/LLVMIR/ModuleTranslation.cpp
M mlir/test/Dialect/LLVMIR/layout.mlir
M mlir/test/Interfaces/DataLayoutInterfaces/module.mlir
M mlir/test/Interfaces/DataLayoutInterfaces/query.mlir
M mlir/test/Interfaces/DataLayoutInterfaces/types.mlir
M mlir/test/Target/LLVMIR/data-layout.mlir
M mlir/test/lib/Dialect/DLTI/TestDataLayoutQuery.cpp
M mlir/test/lib/Dialect/Test/TestTypeDefs.td
M mlir/test/lib/Dialect/Test/TestTypes.cpp
M mlir/unittests/Interfaces/DataLayoutInterfacesTest.cpp
Log Message:
-----------
[MLIR] Add index bitwidth to the DataLayout (#85927)
When importing from LLVM IR the data layout of all pointer types
contains an index bitwidth that should be used for index computations.
This revision adds a getter to the DataLayout that provides access to
the already stored bitwidth. The function returns an optional since only
pointer-like types have an index bitwidth. Querying the bitwidth of a
non-pointer type returns std::nullopt.
The new function works for the built-in Index type and, using a type
interface, for the LLVMPointerType.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list