Changes

Summary

  1. PR50767: clear non-distinct debuginfo for function with nodebug definition after undecorated declaration (details)
  2. [X86] Add a test to reveal a bug in CMOV conversion. (details)
  3. [lldb/Interpreter] Add setting to set session transcript save directory (details)
  4. [lldb/Interpreter] Fix session-save-on-quit when using ^D (details)
  5. [OpenCL] Fix qualifiers check on binding references to temporaries (details)
  6. [analyzer] Implement getType for SVal (details)
  7. [gn build] Port 159024ce2315 (details)
  8. [gn build] Port 9b02a9b40150 (details)
  9. [analyzer] Fix SValTest for LocAsInt test (details)
  10. [ARM] Fold extract of ARM_BUILD_VECTOR (details)
  11. [mlir-reduce] Add doc for usage of mlir-reduce (details)
  12. [NFC][InstCombine] foldAggregateConstructionIntoAggregateReuse(): cast to Instruction eagerly (details)
  13. [mlir] Add MemoryEffects::Allocate to memref::CloneOp (details)
  14. [LoopVectorize] Add support for scalable vectorization of invariant stores (details)
  15. Revert "[hwasan] print exact mismatch offset for short granules." (details)
Commit 4d8871a898b30f11c905b27954c18d826c0953c9 by jeroen.dobbelaere
PR50767: clear non-distinct debuginfo for function with nodebug definition after undecorated declaration

Fix suggested by Yuanfang Chen:

Non-distinct debuginfo is attached to the function due to the undecorated declaration. Later, when seeing the function definition and `nodebug` attribute, the non-distinct debuginfo should be cleared.

Reviewed By: dblaikie

Differential Revision: https://reviews.llvm.org/D104777
The file was modifiedclang/lib/CodeGen/CodeGenFunction.cpp
The file was addedclang/test/CodeGen/attr-nodebug2.c
Commit 6178ddcd2b70e6a187e1960f00f5985c390a80a0 by tianqing.wang
[X86] Add a test to reveal a bug in CMOV conversion.

CMOV conversion first rewrites all CMOVs with memory load to branches.
Then runs a second pass to convert other CMOVs in loops if profitable.
But the first pass doesn't add new basic blocks to MachineLoopInfo,
CMOVs in these blocks are ignored in the subsequent pass.

Reviewed By: pengfei

Differential Revision: https://reviews.llvm.org/D104692
The file was modifiedllvm/test/CodeGen/X86/x86-cmov-converter.ll
Commit fe1874dd2dd99c9811db515a2957e2a42f9f6868 by medismail.bennani
[lldb/Interpreter] Add setting to set session transcript save directory

This patch introduces a new interpreter setting
`interpreter.save-session-directory` so the user can specify a directory
where the session transcripts will be saved.

If not set, the session transcript are saved on a temporary file.

rdar://72902842

Differential Revision: https://reviews.llvm.org/D105030

Signed-off-by: Med Ismail Bennani <medismail.bennani@gmail.com>
The file was modifiedlldb/include/lldb/Interpreter/CommandInterpreter.h
The file was modifiedlldb/source/Interpreter/CommandInterpreter.cpp
The file was modifiedlldb/source/Interpreter/InterpreterProperties.td
The file was modifiedlldb/test/API/commands/session/save/TestSessionSave.py
Commit d6b64612bd92cda8b53ef348fb578983124c600f by medismail.bennani
[lldb/Interpreter] Fix session-save-on-quit when using ^D

Previously, when `interpreter.save-session-on-quit` was enabled, lldb
would save the session transcript only when running the `quit` command.

This patch changes that so the transcripts are saved when the debugger
object is destroyed if the setting is enabled.

rdar://72902650

Differential Revision: https://reviews.llvm.org/D105038

Signed-off-by: Med Ismail Bennani <medismail.bennani@gmail.com>
The file was modifiedlldb/source/Interpreter/CommandInterpreter.cpp
The file was modifiedlldb/source/Commands/CommandObjectQuit.cpp
The file was modifiedlldb/source/Core/Debugger.cpp
The file was modifiedlldb/test/API/commands/session/save/TestSessionSave.py
Commit 78d309ce197c30593450e792b0c2dc7a575f0050 by olemarius.strohm
[OpenCL] Fix qualifiers check on binding references to temporaries

Fix the qualifiers check from PR49733.

Fixes: PR49733

Reviewed By: Anastasia

Differential Revision: https://reviews.llvm.org/D103962
The file was modifiedclang/lib/Sema/SemaInit.cpp
Commit 159024ce231502d4d68825c35c3548a14577f0fd by vsavchenko
[analyzer] Implement getType for SVal

This commit adds a function to the top-class of SVal hierarchy to
provide type information about the value.  That can be extremely
useful when this is the only piece of information that the user is
actually caring about.

Additionally, this commit introduces a testing framework for writing
unit-tests for symbolic values.

Differential Revision: https://reviews.llvm.org/D104550
The file was modifiedclang/include/clang/StaticAnalyzer/Core/PathSensitive/BasicValueFactory.h
The file was modifiedclang/include/clang/StaticAnalyzer/Core/PathSensitive/SVals.h
The file was modifiedclang/lib/StaticAnalyzer/Core/SVals.cpp
The file was addedclang/unittests/StaticAnalyzer/SValTest.cpp
The file was modifiedclang/unittests/StaticAnalyzer/CMakeLists.txt
Commit fc6a5d85ea2e18886f352f1ac5f9399ddeede336 by llvmgnsyncbot
[gn build] Port 159024ce2315
The file was modifiedllvm/utils/gn/secondary/clang/unittests/StaticAnalyzer/BUILD.gn
Commit c76fe67a7be02c7a44fb8cb64586cc4417321190 by llvmgnsyncbot
[gn build] Port 9b02a9b40150
The file was modifiedllvm/utils/gn/secondary/clang/unittests/StaticAnalyzer/BUILD.gn
Commit b2842298cebf420ecb3750bf309021a7f37870c1 by vsavchenko
[analyzer] Fix SValTest for LocAsInt test
The file was modifiedclang/unittests/StaticAnalyzer/SValTest.cpp
Commit 371ee32e01a788a6dfc62cb7b10a94b80fe28425 by david.green
[ARM] Fold extract of ARM_BUILD_VECTOR

This adds a small fold for extract (ARM_BUILD_VECTOR) to fold to the
original node. This can help simplify the resulting codegen in some
cases.

Differential Revision: https://reviews.llvm.org/D104860
The file was modifiedllvm/test/CodeGen/Thumb2/mve-vld3.ll
The file was modifiedllvm/test/CodeGen/Thumb2/mve-vst3.ll
The file was modifiedllvm/test/CodeGen/ARM/big-endian-vector-callee.ll
The file was modifiedllvm/test/CodeGen/ARM/big-endian-vector-caller.ll
The file was modifiedllvm/test/CodeGen/Thumb2/mve-shuffle.ll
The file was modifiedllvm/test/CodeGen/Thumb2/mve-vst4.ll
The file was modifiedllvm/test/CodeGen/Thumb2/mve-vld4.ll
The file was modifiedllvm/test/CodeGen/Thumb2/mve-vmull-splat.ll
The file was modifiedllvm/lib/Target/ARM/ARMISelLowering.cpp
The file was modifiedllvm/test/CodeGen/Thumb2/mve-soft-float-abi.ll
Commit 7dec20dbb6ae4a095e586c94eca59008506b5de5 by chiahungduan
[mlir-reduce] Add doc for usage of mlir-reduce

Reviewed By: jpienaar

Differential Revision: https://reviews.llvm.org/D103683
The file was addedmlir/docs/Tools/mlir-reduce.md
Commit 6cf6f6f65fde9638a2ca64cd8013d0d0ab1d473c by lebedev.ri
[NFC][InstCombine] foldAggregateConstructionIntoAggregateReuse(): cast to Instruction eagerly

In all of these, the value must be an instruction for us to succeed anyway,
so change it to maybe hopefully make further changes more straight-forward.
The file was modifiedllvm/lib/Transforms/InstCombine/InstCombineVectorOps.cpp
Commit 293064222a013055cda9240647110f5bcf8e1f31 by ivan.butygin
[mlir] Add MemoryEffects::Allocate to memref::CloneOp

Without it BufferDeallocationPass process only CloneOps created during pass itself and ignore all CloneOps that were already present in IR.

For our specific usecase:

```
func @dealloc_existing_clones(%arg0: memref<?x?xf64>, %arg1: memref<?x?xf64>) -> memref<?x?xf64> {
  return %arg0 : memref<?x?xf64>
}
```

Input arguments will be freed immediately after return from function and we want to prolong lifetime for the returned argument.
To achieve this we explicitly add clones to all input memrefs and expect that BufferDeallocationPass will add correct deallocs to them (unnessesary clone+dealloc pairs will be canonicalized away later).

Differential Revision: https://reviews.llvm.org/D104973
The file was modifiedmlir/lib/Dialect/MemRef/IR/MemRefOps.cpp
The file was modifiedmlir/test/Transforms/buffer-deallocation.mlir
Commit 303b6d5e981947cff7e12626669c1fbeef046f18 by david.sherwood
[LoopVectorize] Add support for scalable vectorization of invariant stores

Previously in setCostBasedWideningDecision if we encountered an
invariant store we just assumed that we could scalarize the store
and called getUniformMemOpCost to get the associated cost.
However, for scalable vectors this is not an option because it is
not currently possibly to scalarize the store. At the moment we
crash in VPReplicateRecipe::execute when trying to scalarize the
store.

Therefore, I have changed setCostBasedWideningDecision so that if
we are storing a scalable vector out to a uniform address and the
target supports scatter instructions, then we should use those
instead.

Tests have been added here:

  Transforms/LoopVectorize/AArch64/sve-inv-store.ll

Differential Revision: https://reviews.llvm.org/D104624
The file was modifiedllvm/lib/Transforms/Vectorize/LoopVectorize.cpp
The file was addedllvm/test/Transforms/LoopVectorize/AArch64/sve-inv-store.ll
Commit 400509238a0ff71f62fbf3a5d0cb576bc163b4b8 by fmayer
Revert "[hwasan] print exact mismatch offset for short granules."

Broke x86 LAM bot.

This reverts commit 2a60ab76a796637d49bf1c7191f5b5a0c92f81bc.
The file was modifiedcompiler-rt/lib/hwasan/hwasan_report.cpp
The file was modifiedcompiler-rt/test/hwasan/TestCases/heap-buffer-overflow.c
The file was modifiedcompiler-rt/test/hwasan/TestCases/heap-buffer-overflow-into.c
The file was modifiedcompiler-rt/test/hwasan/TestCases/mem-intrinsics.c