[DA] Remove `DependenceInfo::unifySubscriptType` (#181607) `DependenceInfo::unifySubscriptType` is a function that takes two subscripts and casts them to the wider type. Using this function can sometimes lead to correctness issues, especially when combined with `DependenceInfo::removeMatchingExtensions`, as in #148435. These two functions are intended to broaden the scope of DA, but they can also introduce correctness issues, mainly due to mishandling of `sext`/`zext` and integer overflows. To avoid these issues, this patch removes the `unifySubscriptType` function. Currently, it has only one caller, which is part of the validation logic for delinearization. Instead of calling `unifySubscriptType`, this patch adds a type check and bails out if the types do not match. Note that I'm not entirely sure whether there are real cases where the types differ and the check is actually necessary. Also, this patch doesn't include new test cases, as I have not found concrete examples where `unifySubscriptType` itself causes actual issues. That is, this patch may be NFC. Fix #169807
Welcome to the LLVM project!
This repository contains the source code for LLVM, a toolkit for the construction of highly optimized compilers, optimizers, and run-time environments.
The LLVM project has multiple components. The core of the project is itself called “LLVM”. This contains all of the tools, libraries, and header files needed to process intermediate representations and convert them into object files. Tools include an assembler, disassembler, bitcode analyzer, and bitcode optimizer.
C-like languages use the Clang frontend. This component compiles C, C++, Objective-C, and Objective-C++ code into LLVM bitcode -- and from there into object files, using LLVM.
Other components include: the libc++ C++ standard library, the LLD linker, and more.
Consult the Getting Started with LLVM page for information on building and running LLVM.
For information on how to contribute to the LLVM project, please take a look at the Contributing to LLVM guide.
Join the LLVM Discourse forums, Discord chat, LLVM Office Hours or Regular sync-ups.
The LLVM project has adopted a code of conduct for participants to all modes of communication within the project.