SuccessChanges

Summary

  1. DWARFEmitter.cpp - use auto const& iterators in for-range loops to avoid copies. NFCI. (details)
  2. [ASTImporter] Refactor IsStructurallyEquivalent's Decl overloads to be more consistent (details)
  3. [AIX][Clang][Driver] Add handling of nostartfiles option (details)
  4. [SLP] Allow reordering of vectorization trees with reused instructions. (details)
  5. [analyzer][solver] Fix issue with symbol non-equality tracking (details)
  6. Update update_analyze_test_checks.py to support API changes from D83004 (details)
  7. [CostModel][X86] Add some select shuffle costs tests for D87884 (details)
Commit 2ef2abdec20e7275ae719fa8be920482f08da1f0 by llvm-dev
DWARFEmitter.cpp - use auto const& iterators in for-range loops to avoid copies. NFCI.
The file was modifiedllvm/lib/ObjectYAML/DWARFEmitter.cpp (diff)
Commit 7c4575e15f065312ad40ebe0d1ec1e1ffa4c6628 by Raphael Isemann
[ASTImporter] Refactor IsStructurallyEquivalent's Decl overloads to be more consistent

There are several `::IsStructurallyEquivalent` overloads for Decl subclasses
that are used for comparing declarations. There is also one overload that takes
just two Decl pointers which ends up queuing the passed Decls to be later
compared in `CheckKindSpecificEquivalence`.

`CheckKindSpecificEquivalence` implements the dispatch logic for the different
Decl subclasses. It is supposed to hand over the queued Decls to the
subclass-specific `::IsStructurallyEquivalent` overload that will actually
compare the Decl instance. It also seems to implement a few pieces of actual
node comparison logic inbetween the dispatch code.

This implementation causes that the different overloads of
`::IsStructurallyEquivalent` do different (and sometimes no) comparisons
depending on which overload of `::IsStructurallyEquivalent` ends up being
called.

For example, if I want to compare two FieldDecl instances, then I could either
call the `::IsStructurallyEquivalent` with `Decl *` or with `FieldDecl *`
parameters. The overload that takes FieldDecls is doing a correct comparison.
However, the `Decl *` overload just queues the Decl pair.
`CheckKindSpecificEquivalence` has no dispatch logic for `FieldDecl`, so it
always returns true and never does any actual comparison.

On the other hand, if I try to compare two FunctionDecl instances the two
possible overloads of `::IsStructurallyEquivalent` have the opposite behaviour:
The overload that takes `FunctionDecl` pointers isn't comparing the names of the
FunctionDecls while the overload taking a plain `Decl` ends up comparing the
function names (as the comparison logic for that is implemented in
`CheckKindSpecificEquivalence`).

This patch tries to make this set of functions more consistent by making
`CheckKindSpecificEquivalence` a pure dispatch function without any
subclass-specific comparison logic. Also the dispatch logic is now autogenerated
so it can no longer miss certain subclasses.

The comparison code from `CheckKindSpecificEquivalence` is moved to the
respective `::IsStructurallyEquivalent` overload so that the comparison result
no longer depends if one calls the `Decl *` overload or the overload for the
specific subclass. The only difference is now that the `Decl *` overload is
queuing the parameter while the subclass-specific overload is directly doing the
comparison.

`::IsStructurallyEquivalent` is an implementation detail and I don't think the
behaviour causes any bugs in the current implementation (as carefully calling
the right overload for the different classes works around the issue), so the
test for this change is that I added some new code for comparing `MemberExpr`.
The new comparison code always calls the dispatching overload and it previously
failed as the dispatch didn't support FieldDecls.

Reviewed By: martong, a_sidorin

Differential Revision: https://reviews.llvm.org/D87619
The file was modifiedclang/unittests/AST/StructuralEquivalenceTest.cpp (diff)
The file was modifiedclang/lib/AST/ASTStructuralEquivalence.cpp (diff)
Commit 699089f2a9702baa987dc2dbe915a2c845c7027f by daltenty
[AIX][Clang][Driver] Add handling of nostartfiles option

Reviewed By: jasonliu

Differential Revision: https://reviews.llvm.org/D87904
The file was modifiedclang/lib/Driver/ToolChains/AIX.cpp (diff)
The file was modifiedclang/test/Driver/aix-ld.c (diff)
Commit 3ff07fcd542ebef657bb93fe8ee1750527210b94 by a.bataev
[SLP] Allow reordering of vectorization trees with reused instructions.

If some leaves have the same instructions to be vectorized, we may
incorrectly evaluate the best order for the root node (it is built for the
vector of instructions without repeated instructions and, thus, has less
elements than the root node). In this case we just can not try to reorder
the tree + we may calculate the wrong number of nodes that requre the
same reordering.
For example, if the root node is \<a+b, a+c, a+d, f+e\>, then the leaves
are \<a, a, a, f\> and \<b, c, d, e\>. When we try to vectorize the first
leaf, it will be shrink to \<a, b\>. If instructions in this leaf should
be reordered, the best order will be \<1, 0\>. We need to extend this
order for the root node. For the root node this order should look like
\<3, 0, 1, 2\>. This patch allows extension of the orders of the nodes
with the reused instructions.

Reviewed By: RKSimon

Differential Revision: https://reviews.llvm.org/D45263
The file was modifiedllvm/test/Transforms/SLPVectorizer/X86/reorder_repeated_ops.ll (diff)
The file was modifiedllvm/test/Transforms/SLPVectorizer/X86/jumbled_store_crash.ll (diff)
The file was modifiedllvm/test/Transforms/SLPVectorizer/X86/vectorize-reorder-reuse.ll (diff)
The file was modifiedllvm/lib/Transforms/Vectorize/SLPVectorizer.cpp (diff)
Commit 0c4f91f84b2efe8975848a7a13c08d7479abe752 by gabor.marton
[analyzer][solver] Fix issue with symbol non-equality tracking

We should track non-equivalency (disequality) in case of greater-then or
less-then assumptions.

Differential Revision: https://reviews.llvm.org/D88019
The file was modifiedclang/test/Analysis/equality_tracking.c (diff)
The file was modifiedclang/lib/StaticAnalyzer/Core/RangeConstraintManager.cpp (diff)
Commit 2174efb10480ac374364eb9eef1a5ae79c7b16e2 by llvm-dev
Update update_analyze_test_checks.py to support API changes from D83004
The file was modifiedllvm/utils/update_analyze_test_checks.py (diff)
Commit 18a3ebcd3016d9bd1112d6804654758afabf8a98 by llvm-dev
[CostModel][X86] Add some select shuffle costs tests for D87884
The file was addedllvm/test/Analysis/CostModel/X86/shuffle-select.ll