diff options
author | Vyacheslav Levytskyy <vyacheslav.levytskyy@intel.com> | 2024-07-11 07:16:29 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-07-11 07:16:29 +0200 |
commit | dbd00a5968d6c823d686714c91f2b4fcfd03797a (patch) | |
tree | 4580cc18a94806f0e6e32e5104029a09c8497548 /llvm/lib/CodeGen | |
parent | 4710e0f498cb661ca17c99cb174616102fcad923 (diff) | |
download | llvm-dbd00a5968d6c823d686714c91f2b4fcfd03797a.zip llvm-dbd00a5968d6c823d686714c91f2b4fcfd03797a.tar.gz llvm-dbd00a5968d6c823d686714c91f2b4fcfd03797a.tar.bz2 |
[SPIRV] Improve type inference of operand presented by opaque pointers and aggregate types (#98035)
This PR improves type inference of operand presented by opaque pointers
and aggregate types:
* tries to restore original function return type for aggregate types so
that it's possible to deduce a correct type during emit-intrinsics step
(see llvm/test/CodeGen/SPIRV/SpecConstants/restore-spec-type.ll for the
reproducer of the previously existed issue when spirv-val found a
mismatch between object and ptr types in OpStore due to the incorrect
aggregate types tracing),
* explores untyped pointer operands of store to deduce correct pointee
types,
* creates an extension type to track pointee types from emit-intrinsics
step and further instead of direct and naive usage of TypePointerType
that led previously to crashes due to ban of creation of Value of
TypePointerType type,
* tracks instructions with uncomplete type information and tries to
improve their type info after pass calculated types for all machine
functions (it doesn't traverse a code but rather checks only those
instructions which were tracked as uncompleted),
* address more cases of removing unnecessary bitcasts (see, for example,
changes in test/CodeGen/SPIRV/transcoding/OpGenericCastToPtr.ll where
`CHECK-SPIRV-NEXT` in LIT checks show absence of unneeded bitcasts and
unmangled/mangled versions have proper typing now with equivalent type
info),
* address more cases of well known types or relations between types
within instructions (see, for example, atomic*.ll test cases and
Event-related test cases for improved SPIR-V code generated by the
Backend),
* fix the issue of removing unneeded ptrcast instructions in
pre-legalizer pass that led to creation of new assign-type instructions
with the same argument as source in ptrcast and caused errors in type
inference (the reproducer `complex.ll` test case is added to the PR).
Diffstat (limited to 'llvm/lib/CodeGen')
0 files changed, 0 insertions, 0 deletions