Progress:
In progressChanges

Summary

  1. tsan: new MemoryAccess interface (details)
  2. tsan: add AccessVptr (details)
  3. [llvm-readobj][XCOFF] Fix the error dumping for the first (details)
  4. tsan: avoid extra call indirection in unaligned access functions (details)
  5. [clang-format] don't break between function and function name in JS (details)
  6. [mlir] Fix delayed object interfaces registration (details)
  7. [AArch64InstPrinter] Change printAddSubImm to comment imm value when shifted (details)
  8. [MLIR] Add `getI8Type` to `OpBuilder` (details)
  9. [RISCV] Support simple fractional steps in matching VID sequences (details)
  10. [MLIR][OpenMP] Add support for critical construct (details)
  11. [clang] Make member var invalid when static initializer is invalid. (details)
  12. tsan: use Tid/StackID types in MBlock (details)
Commit 831910c5c4941b7c58d4d50d9e20808c8e2c1c0b by dvyukov
tsan: new MemoryAccess interface

Currently we have MemoryAccess function that accepts
"bool kAccessIsWrite, bool kIsAtomic" and 4 wrappers:
MemoryRead/MemoryWrite/MemoryReadAtomic/MemoryWriteAtomic.

Such scheme with bool flags is not particularly scalable/extendable.
Because of that we did not have Read/Write wrappers for UnalignedMemoryAccess,
and "true, false" or "false, true" at call sites is not very readable.

Moreover, the new tsan runtime will introduce more flags
(e.g. move "freed" and "vptr access" to memory acccess flags).
We can't have 16 wrappers and each flag also takes whole
64-bit register for non-inlined calls.

Introduce AccessType enum that contains bit mask of
read/write, atomic/non-atomic, and later free/non-free,
vptr/non-vptr.
Such scheme is more scalable, more readble, more efficient
(don't consume multiple registers for these flags during calls)
and allows to cover unaligned and range variations of memory
access functions as well.

Also switch from size log to just size.
The new tsan runtime won't have the limitation of supporting
only 1/2/4/8 access sizes, so we don't need the logarithms.

Also add an inline thunk that converts the new interface to the old one.
For inlined calls it should not add any overhead because
all flags/size can be computed as compile time.

Reviewed By: vitalybuka, melver

Differential Revision: https://reviews.llvm.org/D107276
The file was modifiedcompiler-rt/lib/tsan/go/tsan_go.cpp
The file was modifiedcompiler-rt/lib/tsan/rtl/tsan_interface_inl.h
The file was modifiedcompiler-rt/lib/tsan/rtl/tsan_rtl_mutex.cpp
The file was modifiedcompiler-rt/lib/tsan/rtl/tsan_interface_atomic.cpp
The file was modifiedcompiler-rt/lib/tsan/rtl/tsan_external.cpp
The file was modifiedcompiler-rt/lib/tsan/rtl/tsan_interceptors_posix.cpp
The file was modifiedcompiler-rt/lib/tsan/rtl/tsan_rtl.cpp
The file was modifiedcompiler-rt/lib/tsan/rtl/tsan_rtl.h
The file was modifiedcompiler-rt/lib/tsan/rtl/tsan_fd.cpp
The file was modifiedcompiler-rt/lib/tsan/rtl/tsan_interface.cpp
Commit 18c6ed2f0f293582570ad3f6419e10ff808ba98e by dvyukov
tsan: add AccessVptr

Add AccessVptr access type.
For now it's converted to the same thr->is_vptr_access,
but later it will be passed directly to ReportRace
and will enable efficient tail calling in MemoryAccess function
(currently __tsan_vptr_update/__tsan_vptr_read can't use
tail calls in MemoryAccess because of the trailing assignment
to thr->is_vptr_access).

Depends on D107276.

Reviewed By: vitalybuka, melver

Differential Revision: https://reviews.llvm.org/D107282
The file was modifiedcompiler-rt/lib/tsan/rtl/tsan_rtl.h
The file was modifiedcompiler-rt/lib/tsan/rtl/tsan_interface_inl.h
Commit 69396896fb615067b04a3e0c220f93bc91a10eec by esme.yi
[llvm-readobj][XCOFF] Fix the error dumping for the first
item of StringTable.

Summary: For the string table in XCOFF, the first 4 bytes
contains the length of the string table, so we should
print the string entries from fifth bytes. This patch
also adds tests for llvm-readobj dumping the string
table.

Reviewed By: jhenderson

Differential Revision: https://reviews.llvm.org/D105522
The file was modifiedllvm/test/tools/yaml2obj/XCOFF/long-symbol-name.yaml
The file was modifiedllvm/tools/llvm-readobj/ObjDumper.cpp
The file was modifiedllvm/tools/llvm-readobj/XCOFFDumper.cpp
The file was modifiedllvm/lib/Object/XCOFFObjectFile.cpp
The file was addedllvm/test/tools/llvm-readobj/XCOFF/string-table.yaml
The file was modifiedllvm/test/tools/yaml2obj/XCOFF/basic-doc64.yaml
The file was modifiedllvm/tools/llvm-readobj/ObjDumper.h
Commit d77b476c1953bcb0a608b2d6a4f2dd9fe0b43967 by dvyukov
tsan: avoid extra call indirection in unaligned access functions

Currently unaligned access functions are defined in tsan_interface.cpp
and do a real call to MemoryAccess. This means we have a real call
and no read/write constant propagation.

Unaligned memory access can be quite hot for some programs
(observed on some compression algorithms with ~90% of unaligned accesses).

Move them to tsan_interface_inl.h to avoid the additional call
and enable constant propagation.
Also reorder the actual store and memory access handling for
__sanitizer_unaligned_store callbacks to enable tail calling
in MemoryAccess.

Depends on D107282.

Reviewed By: vitalybuka, melver

Differential Revision: https://reviews.llvm.org/D107283
The file was modifiedcompiler-rt/lib/tsan/rtl/tsan_interface_inl.h
The file was modifiedcompiler-rt/lib/tsan/rtl/tsan_interface.cpp
Commit 4f4f2783056fd01182740251b2ce8a77b12684b3 by krasimir
[clang-format] don't break between function and function name in JS

The patch https://reviews.llvm.org/D105964 (https://github.com/llvm/llvm-project/commit/58494c856a15f5b0e886c7baf5d505ac6c05dfe5)
updated detection of function declaration names. It had the unfortunate
consequence that it started breaking between `function` and the function
name in some cases in JavaScript code.

This patch addresses this.

Reviewed By: MyDeveloperDay, owenpan

Differential Revision: https://reviews.llvm.org/D107267
The file was modifiedclang/lib/Format/ContinuationIndenter.cpp
The file was modifiedclang/unittests/Format/FormatTestJS.cpp
Commit 9b50844fd798b5a81afd4aeb44b053d622747a42 by vlad.vinogradov
[mlir] Fix delayed object interfaces registration

Store both interfaceID and objectID as key for interface registration callback.
Otherwise the implementation allows to register only one external model per one object in the single dialect.

Reviewed By: ftynse

Differential Revision: https://reviews.llvm.org/D107274
The file was modifiedmlir/lib/IR/Dialect.cpp
The file was modifiedmlir/unittests/IR/InterfaceAttachmentTest.cpp
The file was modifiedmlir/include/mlir/IR/Dialect.h
Commit 0d8cd4e2d5d4abb804d40984522e0413c66a3cbd by Jason Molenda
[AArch64InstPrinter] Change printAddSubImm to comment imm value when shifted

Add a comment when there is a shifted value,
    add x9, x0, #291, lsl #12 ; =1191936
but not when the immediate value is unshifted,
    subs x9, x0, #256 ; =256
when the comment adds nothing additional to the reader.

Differential Revision: https://reviews.llvm.org/D107196
The file was modifiedllvm/test/CodeGen/AArch64/arm64-fp128.ll
The file was modifiedllvm/test/CodeGen/AArch64/addsub.ll
The file was modifiedllvm/test/CodeGen/AArch64/fptoui-sat-vector.ll
The file was modifiedllvm/test/CodeGen/AArch64/branch-relax-cbz.ll
The file was modifiedllvm/test/CodeGen/AArch64/sadd_sat_vec.ll
The file was modifiedllvm/test/CodeGen/AArch64/GlobalISel/arm64-atomic-128.ll
The file was modifiedllvm/test/CodeGen/AArch64/signed-truncation-check.ll
The file was modifiedllvm/test/CodeGen/AArch64/vecreduce-fmin-legalization.ll
The file was modifiedllvm/test/CodeGen/AArch64/sub-of-not.ll
The file was modifiedllvm/test/CodeGen/AArch64/uaddo.ll
The file was modifiedllvm/test/CodeGen/AArch64/sub1.ll
The file was modifiedllvm/test/CodeGen/AArch64/sve-extract-vector.ll
The file was modifiedllvm/test/CodeGen/AArch64/urem-seteq-illegal-types.ll
The file was modifiedllvm/test/CodeGen/AArch64/ldst-paired-aliasing.ll
The file was modifiedllvm/test/tools/UpdateTestChecks/update_llc_test_checks/Inputs/aarch64_generated_funcs.ll.nogenerated.expected
The file was modifiedllvm/test/CodeGen/AArch64/sve-split-extract-elt.ll
The file was modifiedllvm/test/CodeGen/AArch64/uadd_sat_vec.ll
The file was modifiedllvm/test/CodeGen/AArch64/ssub_sat_plus.ll
The file was modifiedllvm/test/tools/llvm-objdump/ELF/AArch64/disassemble-align.s
The file was modifiedllvm/test/CodeGen/AArch64/hoist-and-by-const-from-lshr-in-eqcmp-zero.ll
The file was modifiedllvm/test/CodeGen/AArch64/sdivpow2.ll
The file was modifiedllvm/test/CodeGen/AArch64/use-cr-result-of-dom-icmp-st.ll
The file was modifiedllvm/test/CodeGen/AArch64/ls64-inline-asm.ll
The file was modifiedllvm/test/CodeGen/AArch64/sve-ld1r.ll
The file was modifiedllvm/test/CodeGen/AArch64/vecreduce-bool.ll
The file was modifiedllvm/test/CodeGen/AArch64/aarch64-tail-dup-size.ll
The file was modifiedllvm/test/CodeGen/AArch64/srem-seteq-illegal-types.ll
The file was modifiedllvm/test/CodeGen/AArch64/srem-vector-lkk.ll
The file was modifiedllvm/test/CodeGen/AArch64/neg-abs.ll
The file was modifiedllvm/test/CodeGen/AArch64/vldn_shuffle.ll
The file was modifiedllvm/test/CodeGen/AArch64/ssub_sat.ll
The file was modifiedllvm/test/CodeGen/AArch64/sve-split-insert-elt.ll
The file was modifiedllvm/test/CodeGen/AArch64/aarch64-load-ext.ll
The file was modifiedllvm/test/CodeGen/AArch64/arm64-shrink-wrapping.ll
The file was modifiedllvm/test/CodeGen/AArch64/sadd_sat_plus.ll
The file was modifiedllvm/test/CodeGen/AArch64/GlobalISel/byval-call.ll
The file was modifiedllvm/test/CodeGen/AArch64/arm64-ccmp.ll
The file was modifiedllvm/test/CodeGen/AArch64/implicit-null-check.ll
The file was modifiedllvm/test/CodeGen/AArch64/arm64-rev.ll
The file was modifiedllvm/test/CodeGen/AArch64/i128_volatile_load_store.ll
The file was modifiedllvm/test/CodeGen/AArch64/inc-of-add.ll
The file was modifiedllvm/test/CodeGen/AArch64/insert-subvector-res-legalization.ll
The file was modifiedllvm/test/CodeGen/AArch64/check-sign-bit-before-extension.ll
The file was modifiedllvm/test/CodeGen/AArch64/split-vector-insert.ll
The file was modifiedllvm/test/CodeGen/AArch64/arm64-atomic-128.ll
The file was modifiedllvm/test/CodeGen/AArch64/ragreedy-local-interval-cost.ll
The file was modifiedllvm/test/CodeGen/AArch64/umulo-128-legalisation-lowering.ll
The file was modifiedllvm/test/CodeGen/AArch64/shift-mod.ll
The file was modifiedllvm/test/CodeGen/AArch64/addsub-constant-folding.ll
The file was modifiedllvm/test/Transforms/LoopStrengthReduce/AArch64/lsr-pre-inc-offset-check.ll
The file was modifiedllvm/test/CodeGen/AArch64/usub_sat_vec.ll
The file was modifiedllvm/test/CodeGen/AArch64/aarch64-matrix-umull-smull.ll
The file was modifiedllvm/test/CodeGen/AArch64/sve-calling-convention-mixed.ll
The file was modifiedllvm/test/CodeGen/AArch64/sat-add.ll
The file was modifiedllvm/test/CodeGen/AArch64/machine-outliner-thunk.ll
The file was modifiedllvm/test/CodeGen/AArch64/arm64-nvcast.ll
The file was modifiedllvm/test/CodeGen/AArch64/stack-guard-remat-bitcast.ll
The file was modifiedllvm/test/CodeGen/AArch64/sve-lsr-scaled-index-addressing-mode.ll
The file was modifiedllvm/test/CodeGen/AArch64/select_const.ll
The file was modifiedllvm/test/CodeGen/AArch64/funnel-shift.ll
The file was modifiedllvm/test/CodeGen/AArch64/srem-seteq.ll
The file was modifiedllvm/test/CodeGen/AArch64/extract-lowbits.ll
The file was modifiedllvm/test/CodeGen/AArch64/vecreduce-fadd-legalization-strict.ll
The file was modifiedllvm/test/CodeGen/AArch64/sve-insert-element.ll
The file was modifiedllvm/test/CodeGen/AArch64/arm64-popcnt.ll
The file was modifiedllvm/test/CodeGen/AArch64/vec_umulo.ll
The file was modifiedllvm/test/CodeGen/AArch64/ssub_sat_vec.ll
The file was modifiedllvm/test/CodeGen/AArch64/vec_uaddo.ll
The file was modifiedllvm/test/tools/UpdateTestChecks/update_llc_test_checks/Inputs/aarch64_generated_funcs.ll.generated.expected
The file was modifiedllvm/test/CodeGen/AArch64/signbit-shift.ll
The file was modifiedllvm/test/CodeGen/AArch64/urem-seteq.ll
The file was modifiedllvm/test/CodeGen/AArch64/sadd_sat.ll
The file was modifiedllvm/test/CodeGen/AArch64/logical_shifted_reg.ll
The file was modifiedllvm/test/CodeGen/AArch64/arm64-vabs.ll
The file was modifiedllvm/test/CodeGen/AArch64/align-down.ll
The file was modifiedllvm/test/CodeGen/AArch64/arm64-memset-inline.ll
The file was modifiedllvm/test/CodeGen/AArch64/combine-comparisons-by-cse.ll
The file was modifiedllvm/test/CodeGen/AArch64/vec-libcalls.ll
The file was modifiedllvm/lib/Target/AArch64/MCTargetDesc/AArch64InstPrinter.cpp
The file was modifiedllvm/test/CodeGen/AArch64/sink-addsub-of-const.ll
The file was modifiedllvm/test/CodeGen/AArch64/GlobalISel/arm64-atomic.ll
The file was modifiedllvm/test/CodeGen/AArch64/aarch64_win64cc_vararg.ll
The file was modifiedllvm/test/CodeGen/AArch64/named-vector-shuffles-sve.ll
The file was modifiedllvm/test/CodeGen/AArch64/fast-isel-branch-cond-split.ll
The file was modifiedllvm/test/CodeGen/AArch64/vecreduce-fmax-legalization.ll
The file was modifiedllvm/test/CodeGen/AArch64/branch-relax-bcc.ll
The file was modifiedllvm/test/CodeGen/AArch64/arm64-abi-varargs.ll
The file was modifiedllvm/test/CodeGen/AArch64/pr48188.ll
The file was modifiedllvm/test/CodeGen/AArch64/cgp-usubo.ll
The file was modifiedllvm/test/CodeGen/AArch64/uadd_sat_plus.ll
The file was modifiedllvm/test/CodeGen/AArch64/arm64-bitfield-extract.ll
The file was modifiedllvm/test/CodeGen/AArch64/wineh-try-catch-nobase.ll
The file was modifiedllvm/test/CodeGen/AArch64/lack-of-signed-truncation-check.ll
The file was modifiedllvm/test/CodeGen/AArch64/unwind-preserved.ll
The file was modifiedllvm/test/CodeGen/AArch64/extract-bits.ll
The file was modifiedllvm/test/CodeGen/AArch64/machine-licm-sink-instr.ll
The file was modifiedllvm/test/CodeGen/AArch64/arm64-neon-copy.ll
The file was modifiedllvm/test/CodeGen/AArch64/fast-isel-sdiv.ll
The file was modifiedllvm/test/CodeGen/AArch64/stack-guard-sysreg.ll
The file was modifiedllvm/test/CodeGen/AArch64/sve-insert-vector.ll
The file was modifiedllvm/test/CodeGen/AArch64/pow.ll
The file was modifiedllvm/test/CodeGen/AArch64/atomicrmw-xchg-fp.ll
The file was modifiedllvm/test/CodeGen/AArch64/srem-lkk.ll
The file was modifiedllvm/test/CodeGen/AArch64/urem-seteq-nonzero.ll
The file was modifiedllvm/test/CodeGen/AArch64/named-vector-shuffle-reverse-neon.ll
The file was modifiedllvm/test/CodeGen/AArch64/cmp-select-sign.ll
The file was modifiedllvm/test/CodeGen/AArch64/fptosi-sat-vector.ll
The file was modifiedllvm/test/CodeGen/AArch64/uadd_sat.ll
The file was modifiedllvm/test/CodeGen/AArch64/hoist-and-by-const-from-shl-in-eqcmp-zero.ll
The file was modifiedllvm/test/CodeGen/AArch64/GlobalISel/call-translator-variadic-musttail.ll
The file was modifiedllvm/test/CodeGen/AArch64/atomicrmw-O0.ll
The file was modifiedllvm/test/CodeGen/AArch64/GlobalISel/freeze.ll
The file was modifiedllvm/test/CodeGen/AArch64/statepoint-call-lowering.ll
The file was modifiedllvm/test/Transforms/CanonicalizeFreezeInLoops/aarch64.ll
The file was modifiedllvm/test/Transforms/LoopStrengthReduce/AArch64/small-constant.ll
The file was modifiedllvm/test/CodeGen/AArch64/aarch64-dynamic-stack-layout.ll
Commit f0008a4cf43588ff695c84dbfe3b1ae89640f85c by frgossen
[MLIR] Add `getI8Type` to `OpBuilder`

Differential Revision: https://reviews.llvm.org/D107332
The file was modifiedmlir/lib/IR/Builders.cpp
The file was modifiedmlir/include/mlir/IR/Builders.h
Commit cba6aab9715988b522c21b0e04a7d9b888a81394 by fraser
[RISCV] Support simple fractional steps in matching VID sequences

This patch extends the optimization of VID-sequence BUILD_VECTORs
introduced in D104921 to include simple fractional steps composed of a
separated integer numerator and denominator.

A notable limitation in this sequence detection is that only sequences
with steps N/1 or 1/D are found, meaning that the step between elements
and the frequency with which it changes is consistent across the whole
sequence. Fractional steps such as 2/3 won't be matched as those would
involve more complex tracking of state or some level of backtracking.

As is stands, however, this patch is sufficient to match common
interleave-type shuffle indices, for example matching `<0,0,1,1>` (or
commonly `<0,u,1,u>` or `<u,0,u,1>`) to an index sequence divided by 2.

While the optimization is relatively `undef`-tolerant, due to greedy
pattern-matching there even are some simple patterns which confuse the
sequence detection into identifying either a suboptimal sequence or no
sequence at all.

Currently only fractional-step sequences identified as having a
power-of-two denominator are actually lowered to RVV instructions. This
is to avoid introducing divisions into the generated code.

Reviewed By: craig.topper

Differential Revision: https://reviews.llvm.org/D106533
The file was modifiedllvm/test/CodeGen/RISCV/rvv/common-shuffle-patterns.ll
The file was modifiedllvm/test/CodeGen/RISCV/rvv/fixed-vectors-int-shuffles.ll
The file was modifiedllvm/test/CodeGen/RISCV/rvv/fixed-vectors-int-buildvec.ll
The file was modifiedllvm/test/CodeGen/RISCV/rvv/fixed-vectors-int.ll
The file was modifiedllvm/test/CodeGen/RISCV/rvv/interleave-crash.ll
The file was modifiedllvm/lib/Target/RISCV/RISCVISelLowering.cpp
Commit 59989d68ba065b8dc1909d525dfd135d9e3c0206 by kiran.chandramohan
[MLIR][OpenMP] Add support for critical construct

This patch adds the critical construct to the OpenMP dialect. The
implementation models the definition in 2.17.1 of the OpenMP 5 standard.
A name and hint can be specified. The name is a global entity or has
external linkage, it is modelled as a FlatSymbolRefAttr. Hint is
modelled as an integer enum attribute.
Also lowering to LLVM IR using the OpenMP IRBuilder.

Reviewed By: ftynse

Differential Revision: https://reviews.llvm.org/D107135
The file was modifiedmlir/test/Dialect/OpenMP/invalid.mlir
The file was modifiedmlir/lib/Target/LLVMIR/Dialect/OpenMP/OpenMPToLLVMIRTranslation.cpp
The file was modifiedmlir/test/Dialect/OpenMP/ops.mlir
The file was modifiedmlir/lib/Dialect/OpenMP/IR/OpenMPDialect.cpp
The file was modifiedmlir/test/Target/LLVMIR/openmp-llvm.mlir
The file was modifiedmlir/include/mlir/Dialect/OpenMP/OpenMPOps.td
Commit 08128fe7059e20b3f97ae5abbdeff2e6f6c711ed by adamcz
[clang] Make member var invalid when static initializer is invalid.

Previously we would show an error, but keep the member, and also the
CXXRrecordDecl, valid. This could lead to crashes when attempting to
access the record layout or size.

Differential Revision: https://reviews.llvm.org/D105478
The file was modifiedclang/lib/Parse/ParseDeclCXX.cpp
The file was addedclang/test/AST/ast-dump-undeduced-expr.cpp
The file was modifiedclang/test/SemaCXX/cxx11-crashes.cpp
The file was modifiedclang/test/SemaCXX/crash-auto-36064.cpp
Commit 559426ae7695321a4609ae6799455f86cbfc2257 by dvyukov
tsan: use Tid/StackID types in MBlock

Replace more raw types with Tid/StackID typedefs.

Reviewed By: melver

Differential Revision: https://reviews.llvm.org/D107335
The file was modifiedcompiler-rt/lib/tsan/rtl/tsan_defs.h