SuccessChanges

Summary

  1. [IRBuilder] Always respect inserter/folder (details)
  2. [Sema][CodeComplete] Handle symlinks for include code completion (details)
  3. [InstCombine] Fix removal from deferred instructions (details)
  4. [mlir][ods] Adding attribute setters generation (details)
  5. Revert "[IRBuilder] Always respect inserter/folder" (details)
  6. [NFC][compiler-rt][test] Fully qualify string -> std::string (details)
  7. [libc++] Fix ABI break in __bit_reference. (details)
  8. [AMDGPU] Fix assumption about LaneBitmask content (details)
  9. [analyzer] CERT: POS34-C (details)
  10. [X86] Add DCI.isBeforeLegalize() check to the v64i1 constant splitting code in combineStore. (details)
  11. [gn build] Set up include_dirs for a54d81f597 (first checker in a subdir) (details)
  12. Fix Block::eraseArgument when block arg is also a successor operand. (details)
  13. [gn build] Port a54d81f5979 (details)
  14. [gn build] use \bfoo\b instead of \<foo\> in sync script (details)
  15. [ValueTracking]  Improve isKnownNonNaN() to recognize zero splats. (details)
  16. [AssumeBundle] Add documentation for the operand bundles of an llvm.assume (details)
  17. [lldb/Core] Remove locking in the PluginManager (details)
  18. [mlir][ODS] Add a new trait `TypesMatchWith` (details)
Commit f12fb2d99b8dd0dbef1c79f1d401200150f2d0bd by nikita.ppv
[IRBuilder] Always respect inserter/folder

Some IRBuilder methods that were originally defined on
IRBuilderBase do not respect custom IRBuilder inserters/folders,
because those were not accessible prior to D73835. Fix this by
making use of existing (and now accessible) IRBuilder methods,
which will handle inserters/folders correctly.

There are some changes in OpenMP tests, where bitcasts now get
constant folded. I've also highlighted one InstCombine test which
now finishes in two rather than three iterations, thanks to new
instructions being inserted into the worklist.

Differential Revision: https://reviews.llvm.org/D74787
The file was modifiedllvm/test/Transforms/InstCombine/saturating-add-sub.ll
The file was modifiedllvm/lib/IR/IRBuilder.cpp
The file was modifiedclang/test/OpenMP/parallel_codegen.cpp
The file was modifiedclang/test/OpenMP/target_firstprivate_codegen.cpp
Commit f50fe5eb6d2ec0adb5b2fd91a4023fc1573e061f by davg
[Sema][CodeComplete] Handle symlinks for include code completion

Summary:
Previously any symlinks would be ignored since the directory
traversal doesn't follow them.

With this change we now follow symlinks (via a `stat` call
in order to figure out the target type of the symlink if it
is valid).

Reviewers: sammccall

Subscribers: cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D74790
The file was modifiedclang/lib/Sema/SemaCodeComplete.cpp
The file was addedclang/test/CodeCompletion/included-symlinks.cpp
Commit 6b5ce0de7e57cbb37c7a03e216c779ed4073ad2e by nikita.ppv
[InstCombine] Fix removal from deferred instructions

Make sure we don't skip the Deferred.remove() call if the
instruction is not in the worklist. Both of those are separate.

We don't have any cases where deferred instructions get removed
right now, but may cause problems in the future.
The file was modifiedllvm/include/llvm/Transforms/InstCombine/InstCombineWorklist.h
Commit 476ca094c846a0b6d4d9f37710aba21a6b0b265a by antiagainst
[mlir][ods] Adding attribute setters generation

In some dialects, attributes may have default values that may be
determined only after shape inference. For example, attributes that
are dependent on the rank of the input cannot be assigned a default
value until the rank of the tensor is inferred.

While we can set attributes without explicit setters, referring to
the attributes via accessors instead of having to use the string
interface is better for compile time verification.

The proposed patch add one method per operation attribute that let us
set its value. The code is a very small modification of the existing
getter methods.

Differential Revision: https://reviews.llvm.org/D74143
The file was modifiedmlir/test/mlir-tblgen/op-attribute.td
The file was modifiedmlir/tools/mlir-tblgen/OpDefinitionsGen.cpp
Commit b92b1701cd30d356fa3ac4da3d0dba20fa614e0b by nikita.ppv
Revert "[IRBuilder] Always respect inserter/folder"

This reverts commit f12fb2d99b8dd0dbef1c79f1d401200150f2d0bd.

I missed some changes in instrumentation test cases.
The file was modifiedclang/test/OpenMP/target_firstprivate_codegen.cpp
The file was modifiedllvm/lib/IR/IRBuilder.cpp
The file was modifiedllvm/test/Transforms/InstCombine/saturating-add-sub.ll
The file was modifiedclang/test/OpenMP/parallel_codegen.cpp
Commit 3f7d0e7e319486fa9ca29896eb35bb2bd60733d2 by rupprecht
[NFC][compiler-rt][test] Fully qualify string -> std::string
The file was modifiedcompiler-rt/lib/asan/tests/asan_test.cpp
The file was modifiedcompiler-rt/lib/asan/tests/asan_test_utils.h
The file was modifiedcompiler-rt/lib/asan/tests/asan_str_test.cpp
Commit a829443cc7359ecf0f2de8f82519f511795675ec by eric
[libc++] Fix ABI break in __bit_reference.

The libc++ __bit_iterator type has weird ABI calling conventions as a
quirk
of the implementation. The const bit iterator is trivial, but the
non-const
bit iterator is not because it declares a user-defined copy constructor.

Changing this now is an ABI break, so this test ensures that each type
is trivial/non-trivial as expected.

The definition of 'non-trivial for the purposes of calls':
  A type is considered non-trivial for the purposes of calls if:
      * it has a non-trivial copy constructor, move constructor, or
            destructor, or
        * all of its copy and move constructors are deleted.
The file was modifiedlibcxx/include/__bit_reference
The file was addedlibcxx/test/libcxx/containers/sequences/vector.bool/trivial_for_purposes_of_call.pass.cpp
Commit ada205e91eb0ed85d225fb2ce5b0f881a1909230 by Stanislav.Mekhanoshin
[AMDGPU] Fix assumption about LaneBitmask content

Yet another assumption about an actual LaneBitmask content
is fixed.

Differential Revision: https://reviews.llvm.org/D74805
The file was modifiedllvm/lib/Target/AMDGPU/GCNRegPressure.cpp
Commit a54d81f597963b8768ce2b94a8ef570f9eaaac25 by zurab.tsinadze
[analyzer] CERT: POS34-C

Summary:
This patch introduces a new checker:
`alpha.security.cert.pos.34c`

This checker is implemented based on the following rule:
https://wiki.sei.cmu.edu/confluence/x/6NYxBQ
The check warns if  `putenv` function is
called with automatic storage variable as an argument.

Differential Revision: https://reviews.llvm.org/D71433
The file was addedclang/test/Analysis/cert/pos34-c.cpp
The file was modifiedclang/include/clang/StaticAnalyzer/Core/BugReporter/CommonBugCategories.h
The file was modifiedclang/lib/StaticAnalyzer/Core/CommonBugCategories.cpp
The file was addedclang/lib/StaticAnalyzer/Checkers/cert/PutenvWithAutoChecker.cpp
The file was modifiedclang/include/clang/StaticAnalyzer/Checkers/Checkers.td
The file was modifiedclang/lib/StaticAnalyzer/Checkers/CMakeLists.txt
The file was addedclang/test/Analysis/cert/pos34-c-fp-suppression.cpp
The file was modifiedclang/docs/analyzer/checkers.rst
Commit f559cecc3e040bcd9f9f42fa92f262a6b4cc877b by craig.topper
[X86] Add DCI.isBeforeLegalize() check to the v64i1 constant splitting code in combineStore.

We only need to split after type legalization. If we're before
we can just use a wide store and type legalization will split it.

Add a v128i1 test to exercise it post type legalization.
The file was modifiedllvm/lib/Target/X86/X86ISelLowering.cpp
The file was modifiedllvm/test/CodeGen/X86/avx512-mask-op.ll
Commit f14f9bd22ea024049ce4be65f4132306bfd5c12b by thakis
[gn build] Set up include_dirs for a54d81f597 (first checker in a subdir)
The file was modifiedllvm/utils/gn/secondary/clang/lib/StaticAnalyzer/Checkers/BUILD.gn
Commit e84aa5922b1cc8e40f60a560c3803122d820c53d by silvasean
Fix Block::eraseArgument when block arg is also a successor operand.

Summary:
This could trigger an assertion due to the block argument being used by
this block's own successor operands.

Reviewers: rriddle!

Subscribers: mehdi_amini, jpienaar, burmako, shauheen, antiagainst, nicolasvasilache, arpith-jacob, mgester, lucyrfox, liufengdb, Joonsoo, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D74583
The file was modifiedmlir/lib/IR/Block.cpp
Commit 069b85fed110988a178a40abbed0dae49dc2d29b by llvmgnsyncbot
[gn build] Port a54d81f5979
The file was modifiedllvm/utils/gn/secondary/clang/lib/StaticAnalyzer/Checkers/BUILD.gn
Commit 187204cd746f537405d11ee27d60d8ab59c9192d by thakis
[gn build] use \bfoo\b instead of \<foo\> in sync script

\<foo\> is more correct, but since we use shell=True on Windows,
the < and > get interpreted as redirection operators.

Rather than adding cmd escaping, just use \bfoo\b, which is Good
Enough Often Enough.
The file was modifiedllvm/utils/gn/build/sync_source_lists_from_cmake.py
Commit 0eddeeab29a1cce8f9169b270c9fdd484534d91b by paulsson
[ValueTracking]  Improve isKnownNonNaN() to recognize zero splats.

isKnownNonNaN() could not recognize a zero splat because that is a
ConstantAggregateZero which is-a ConstantData but not a ConstantDataVector.

Patch makes a ConstantAggregateZero return true.

Review: Thomas Lively

Differential Revision: https://reviews.llvm.org/D74263
The file was addedllvm/test/CodeGen/SystemZ/vec-max-min-zerosplat.ll
The file was modifiedllvm/lib/Analysis/ValueTracking.cpp
Commit 170ae68fef05941120bff138d1f2b93cd0564454 by tyker
[AssumeBundle] Add documentation for the operand bundles of an llvm.assume

Summary:
Operand bundles on an llvm.assume allows representing
assumptions that an attribute holds for a certain value at a certain position.
Operand bundles enable assumptions that are either hard or impossible to
represent as a boolean argument of an llvm.assume.

Reviewers: jdoerfert, fhahn, nlopes, reames, regehr, efriedma

Reviewed By: jdoerfert

Subscribers: lebedev.ri, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D74209
The file was modifiedllvm/docs/LangRef.rst
Commit df590f51b62d57c19f8cae8e87c1641dc0382f55 by Jonas Devlieghere
[lldb/Core] Remove locking in the PluginManager

Remove locking as all the plugin registration takes place from a single
thread. Addresses Pavel's feedback in D74816.
The file was modifiedlldb/source/Core/PluginManager.cpp
Commit 6b6c96695c0054ebad6816171ef89d5cb76a058b by riddleriver
[mlir][ODS] Add a new trait `TypesMatchWith`

Summary:
This trait takes three arguments: lhs, rhs, transformer. It verifies that the type of 'rhs' matches the type of 'lhs' when the given 'transformer' is applied to 'lhs'. This allows for adding constraints like: "the type of 'a' must match the element type of 'b'". A followup revision will add support in the declarative parser for using these equality constraints to port more c++ parsers to the declarative form.

Differential Revision: https://reviews.llvm.org/D74647
The file was modifiedmlir/test/Dialect/VectorOps/invalid.mlir
The file was modifiedmlir/include/mlir/Dialect/StandardOps/Ops.td
The file was modifiedmlir/include/mlir/Dialect/VectorOps/VectorOps.td
The file was modifiedmlir/include/mlir/IR/OpBase.td
The file was modifiedmlir/lib/Dialect/StandardOps/Ops.cpp
The file was modifiedmlir/include/mlir/Support/STLExtras.h
The file was modifiedmlir/test/IR/invalid-ops.mlir
The file was modifiedmlir/include/mlir/IR/OperationSupport.h
The file was modifiedmlir/tools/mlir-tblgen/OpDefinitionsGen.cpp