1. [mlir] Add a new debug action framework. (details)
  2. [mlir] Add support for DebugCounters using the new DebugAction infrastructure (details)
  3. [X86] Support amx-int8 intrinsic. (details)
  4. [lldb][NFC] Don't inherit from UserID in ValueObject (details)
  5. [Sanitizer][NFC] Fix typo (details)
  6. Fix UBSAN in __ubsan::Value::getSIntValue (details)
  7. [lldb][NFC] Give CompilerType's IsArrayType/IsVectorType/IsBlockPointerType out-parameters default values (details)
  8. [OpenCL] Move remaining defines to opencl-c-base.h (details)
  9. Fix unused variable (details)
  10. [RISCV] Support insertion of misaligned subvectors (details)
  11. Revert "[WebAssembly] call_indirect issues table number relocs" (details)
  12. [ARM] Add pre/post inc tests of various sizes. NFC (details)
  13. [lldb][NFC] Clean up ValueObject comments (details)
  14. [Support] Add reserve() method to the raw_ostream. (details)
  15. [lldb][NFC] Remove unused ValueObject::LogValueObject functions (details)
Commit 72d5afa4acc3cb7fdeb6ead90cc8f446a48c1f9d by riddleriver
[mlir] Add a new debug action framework.

This revision adds the infrastructure for `Debug Actions`. This is a DEBUG only
API that allows for external entities to control various aspects of compiler
execution. This is conceptually similar to something like DebugCounters in LLVM, but at a lower level. This framework doesn't make any assumptions about how the higher level driver is controlling the execution, it merely provides a framework for connecting the two together. This means that on top of DebugCounter functionality, we could also provide more interesting drivers such as interactive execution. A high level overview of the workflow surrounding debug actions is
shown below:

*   Compiler developer defines an `action` that is taken by the a pass,
    transformation, utility that they are developing.
*   Depending on the needs, the developer dispatches various queries, pertaining
    to this action, to an `action manager` that will provide an answer as to
    what behavior the action should do.
*   An external entity registers an `action handler` with the action manager,
    and provides the logic to resolve queries on actions.

The exact definition of an `external entity` is left opaque, to allow for more
interesting handlers.

This framework was proposed here:

Differential Revision:
The file was addedmlir/unittests/Support/DebugActionTest.cpp
The file was modifiedmlir/unittests/Support/CMakeLists.txt
The file was modifiedmlir/lib/IR/MLIRContext.cpp
The file was modifiedmlir/include/mlir/IR/MLIRContext.h
The file was addedmlir/docs/
The file was addedmlir/include/mlir/Support/DebugAction.h
Commit dc6a84fce617ab8367a84029d4ff3c698dc57dad by riddleriver
[mlir] Add support for DebugCounters using the new DebugAction infrastructure

DebugCounters allow for selectively enabling the execution of a debug action based upon a "counter". This counter is comprised of two components that are used in the control of execution of an action, a "skip" value and a "count" value. The "skip" value is used to skip a certain number of initial executions of a debug action. The "count" value is used to prevent a debug action from executing after it has executed for a set number of times (not including any executions that have been skipped). For example, a counter for a debug action with `skip=47` and `count=2`, would skip the first 47 executions, then execute twice, and finally prevent any further executions.

This is effectively the same as the DebugCounter infrastructure in LLVM, but using the DebugAction infrastructure in MLIR. We can't simply reuse the DebugCounter support already present in LLVM due to its heavy reliance on global constructors (which are not allowed in MLIR). The DebugAction infrastructure already nicely supports the debug counter use case, and promotes the separation of policy and mechanism design philosophy.

Differential Revision:
The file was modifiedmlir/unittests/Support/CMakeLists.txt
The file was modifiedmlir/lib/Support/CMakeLists.txt
The file was addedmlir/lib/Support/DebugCounter.cpp
The file was modifiedmlir/docs/
The file was modifiedmlir/lib/Support/MlirOptMain.cpp
The file was addedmlir/unittests/Support/DebugCounterTest.cpp
The file was addedmlir/include/mlir/Support/DebugCounter.h
Commit f8b9035aae4450b4c3c6c9e2a071ac06d520413a by chen3.liu
[X86] Support amx-int8 intrinsic.

Adding support for intrinsics of TDPBSUD/TDPBUSD/TDPBUUD.

Differential Revision:
The file was modifiedclang/include/clang/Basic/BuiltinsX86_64.def
The file was modifiedllvm/include/llvm/IR/
The file was modifiedllvm/lib/Target/X86/X86ExpandPseudo.cpp
The file was modifiedllvm/lib/Target/X86/X86LowerAMXType.cpp
The file was modifiedclang/test/CodeGen/X86/amx_api.c
The file was modifiedllvm/test/CodeGen/X86/AMX/amx-tile-basic.ll
The file was modifiedllvm/lib/Target/X86/X86ISelDAGToDAG.cpp
The file was modifiedllvm/lib/Target/X86/X86RegisterInfo.cpp
The file was modifiedclang/lib/Headers/amxintrin.h
The file was modifiedllvm/lib/Target/X86/
The file was modifiedllvm/lib/Target/X86/X86PreTileConfig.cpp
Commit d77e3c6aec2916fdf7b8ab0ca08c550230244695 by Raphael Isemann
[lldb][NFC] Don't inherit from UserID in ValueObject

ValueObject inherits from UserID which is just a bad idea:

* The inheritance gives ValueObject some member functions that are at best
  misleading (such as `Clear()` which doesn't clear any value beside `id`).

* It allows passing ValueObject to the overloaded operators for UserID (such as
  `==` or `<<` which won't actually compare or print anything in the ValueObject).

* It exposes the `SetID` and `Clear` which both allow users to change the
  internal id value.

Similar to D91699 which did the same for Process

Reviewed By: #lldb, JDevlieghere

Differential Revision:
The file was modifiedlldb/source/Core/ValueObject.cpp
The file was modifiedlldb/source/DataFormatters/TypeSynthetic.cpp
The file was modifiedlldb/include/lldb/Core/ValueObject.h
Commit ebca13c665042d0aa1c1ffe064f100081045e818 by luismarques
[Sanitizer][NFC] Fix typo
The file was modifiedcompiler-rt/lib/sanitizer_common/sanitizer_allocator_size_class_map.h
Commit 16ede0956cb1f4b692dfa619ccfa6ab1de28e19b by mliska
Fix UBSAN in __ubsan::Value::getSIntValue

/home/marxin/Programming/gcc2/libsanitizer/ubsan/ubsan_value.cpp:77:25: runtime error: left shift of 0x0000000000000000fffffffffffffffb by 96 places cannot be represented in type '__int128'
    #0 0x7ffff754edfe in __ubsan::Value::getSIntValue() const /home/marxin/Programming/gcc2/libsanitizer/ubsan/ubsan_value.cpp:77
    #1 0x7ffff7548719 in __ubsan::Value::isNegative() const /home/marxin/Programming/gcc2/libsanitizer/ubsan/ubsan_value.h:190
    #2 0x7ffff7542a34 in handleShiftOutOfBoundsImpl /home/marxin/Programming/gcc2/libsanitizer/ubsan/ubsan_handlers.cpp:338
    #3 0x7ffff75431b7 in __ubsan_handle_shift_out_of_bounds /home/marxin/Programming/gcc2/libsanitizer/ubsan/ubsan_handlers.cpp:370
    #4 0x40067f in main (/home/marxin/Programming/testcases/a.out+0x40067f)
    #5 0x7ffff72c8b24 in __libc_start_main (/lib64/
    #6 0x4005bd in _start (/home/marxin/Programming/testcases/a.out+0x4005bd)

Differential Revision:
The file was modifiedcompiler-rt/lib/ubsan/ubsan_value.cpp
Commit 03310c1e952d0bf7aa84b8ed06809aa7ea1deb9b by Raphael Isemann
[lldb][NFC] Give CompilerType's IsArrayType/IsVectorType/IsBlockPointerType out-parameters default values

We already do this for most functions that have out-parameters, so let's do
the same here and avoid all the `nullptr, nullptr, nullptr` in every call.
The file was modifiedlldb/source/DataFormatters/VectorType.cpp
The file was modifiedlldb/source/Plugins/Language/CPlusPlus/LibCxxBitset.cpp
The file was modifiedlldb/source/Core/ValueObject.cpp
The file was modifiedlldb/source/Symbol/CompilerType.cpp
The file was modifiedlldb/include/lldb/Symbol/CompilerType.h
The file was modifiedlldb/source/Plugins/ABI/ARM/ABISysV_arm.cpp
The file was modifiedlldb/source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.cpp
Commit 612d0ef1732f491ceec22249dc2dbf50df4353c0 by sven.vanhaastregt
[OpenCL] Move remaining defines to opencl-c-base.h

Move any remaining preprocessor defines from `opencl-c.h` to
`opencl-c-base.h`, such that they are shared with
`-fdeclare-opencl-builtins` too.

In particular, move:
- the `as_type` and `as_typen` definitions, and
- the `kernel_exec` and `__kernel_exec` definitions.

Also clang-format the changes.

Differential Revision:
The file was modifiedclang/lib/Headers/opencl-c-base.h
The file was modifiedclang/lib/Headers/opencl-c.h
Commit 1fff7c892452b26c17844c7b651ef4959c316c1a by frgossen
Fix unused variable
The file was modifiedmlir/lib/Rewrite/ByteCode.cpp
Commit dd68f3cf2899c554cab7baf3ccdcd3f987d77736 by fraser
[RISCV] Support insertion of misaligned subvectors

This patch extends the support for RVV INSERT_SUBVECTOR to cover those
which don't align to a vector register boundary. Like the support for
EXTRACT_SUBVECTOR in D96959, it accomplishes this by extracting the
nearest register-sized subvector (a subregister operation), then sliding
the vector down with VSLIDEDOWN, inserting the subvector to the first
position, and sliding the vector back up again afterwards.

Unlike subvector extraction, for vectors that occupy less than a full
vector register we must preserve the untouched elements. We do this by
lowering to an LMUL=1 INSERT_SUBVECTOR using the above method and
lowering that to a VSLIDEUP with a zero offset. This uses a
tail-undisturbed policy and so has the effect of "sliding in" the
subvector elements while preserving the surrounding ones.

Reviewed By: craig.topper

Differential Revision:
The file was modifiedllvm/lib/Target/RISCV/RISCVISelDAGToDAG.cpp
The file was modifiedllvm/test/CodeGen/RISCV/rvv/insert-subvector.ll
The file was modifiedllvm/lib/Target/RISCV/RISCVISelLowering.cpp
The file was modifiedllvm/lib/Target/RISCV/RISCVISelLowering.h
Commit 7dc98adbb0e274934410b78f0a3c45762326325c by wingo
Revert "[WebAssembly] call_indirect issues table number relocs"

This reverts commit 861dbe1a021e6439af837b72b219fb9c449a57ae.  It broke
emscripten -- see
The file was modifiedllvm/lib/Target/WebAssembly/AsmParser/WebAssemblyAsmParser.cpp
The file was modifiedllvm/test/MC/WebAssembly/tail-call-encodings.s
The file was modifiedllvm/test/MC/WebAssembly/weak-alias.s
The file was modifiedllvm/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyInstPrinter.cpp
The file was modifiedllvm/test/CodeGen/WebAssembly/multivalue.ll
The file was modifiedlld/test/wasm/compress-relocs.ll
The file was modifiedllvm/lib/Target/WebAssembly/WebAssemblyUtilities.h
The file was modifiedllvm/lib/MC/WasmObjectWriter.cpp
The file was modifiedllvm/lib/Target/WebAssembly/WebAssemblyUtilities.cpp
The file was modifiedllvm/test/MC/WebAssembly/reloc-code.ll
The file was modifiedllvm/lib/Target/WebAssembly/WebAssemblyAsmPrinter.cpp
The file was removedllvm/test/MC/WebAssembly/call-indirect-relocs.s
The file was modifiedllvm/test/MC/WebAssembly/basic-assembly.s
The file was modifiedllvm/test/MC/WebAssembly/type-index.s
The file was modifiedllvm/lib/Target/WebAssembly/WebAssemblyFastISel.cpp
The file was modifiedllvm/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp
The file was modifiedllvm/test/MC/WebAssembly/function-alias.ll
The file was modifiedllvm/include/llvm/MC/MCSymbolWasm.h
The file was modifiedllvm/test/MC/WebAssembly/reloc-pic.s
The file was modifiedllvm/lib/Target/WebAssembly/
The file was modifiedllvm/test/CodeGen/WebAssembly/function-pointer64.ll
The file was modifiedllvm/lib/Target/WebAssembly/WebAssemblyMCInstLower.cpp
Commit ebb6583e02c46293987567b4e9835d10c9841a4d by
[ARM] Add pre/post inc tests of various sizes. NFC
The file was addedllvm/test/CodeGen/ARM/store-preinc.ll
The file was addedllvm/test/CodeGen/ARM/store-postinc.ll
Commit bda83ba0d296303dff02d262cab73dc984cda3c1 by Raphael Isemann
[lldb][NFC] Clean up ValueObject comments

* Remove commented out code.
* Doxygenify comments that serve as documentation.
* Use the LLVM comment style where possible.
The file was modifiedlldb/include/lldb/Core/ValueObjectVariable.h
The file was modifiedlldb/include/lldb/Core/ValueObjectMemory.h
The file was modifiedlldb/include/lldb/Core/ValueObjectSyntheticFilter.h
The file was modifiedlldb/include/lldb/Core/ValueObjectConstResult.h
The file was modifiedlldb/include/lldb/Core/ValueObjectCast.h
The file was modifiedlldb/include/lldb/Core/ValueObjectChild.h
The file was modifiedlldb/include/lldb/Core/ValueObjectDynamicValue.h
The file was modifiedlldb/include/lldb/Core/ValueObject.h
The file was modifiedlldb/include/lldb/Core/ValueObjectList.h
The file was modifiedlldb/include/lldb/Core/ValueObjectConstResultImpl.h
Commit 875b3b2cdda105c01af9a1330b1cb6a3f1e1b822 by a.v.lapshin
[Support] Add reserve() method to the raw_ostream.

If resulting size of the output stream is already known,
then the space for stream data could be preliminary
allocated in some cases. f.e. raw_string_ostream could
preallocate the space for the target string(it allows
to avoid reallocations during writing into the stream).

Differential Revision:
The file was modifiedllvm/unittests/Support/raw_ostream_test.cpp
The file was modifiedllvm/include/llvm/Support/raw_ostream.h
Commit bea2d5e47867687c8d2f95bd70ed9a77d19eeb6e by Raphael Isemann
[lldb][NFC] Remove unused ValueObject::LogValueObject functions

Those functions aren't called anywhere. For debugging purposes we usually
have Dump() methods (which already exist in some semi-functional form in
The file was modifiedlldb/include/lldb/Core/ValueObject.h
The file was modifiedlldb/source/Core/ValueObject.cpp