Changes

Summary

  1. [compiler-rt][hwasan] Move Thread::Init into hwasan_linux.cpp (details)
  2. [hwasan] Clarify report for allocation-tail-overwritten. (details)
  3. [OpenMP] Update FAQ for enabling cuda offloading (details)
  4. Delay initialization of OptBisect (details)
  5. XFAIL a testcase on Hexagon (missing-abstract-variable.ll) (details)
  6. Revert "Delay initialization of OptBisect" (details)
  7. [DFSan] Cleanup code for platforms other than Linux x86_64. (details)
  8. [CSSPGO] Fix an invalid hash table reference issue in the CS preinliner. (details)
  9. [AMDGPU] [CodeGen] Fold negate llvm.amdgcn.class into test mask (details)
  10. [CSSPGO][llvm-profgen] Ignore LBR records after interrupt transition (details)
  11. [RISCV] Teach vsetvli insertion to remember when predecessors have same AVL and SEW/LMUL ratio if their VTYPEs otherwise mismatch. (details)
  12. [clang-tidy] performance-unnecessary-copy-initialization: Directly examine the initializing var's initializer. (details)
  13. [libc++] [P1518R2] Better CTAD behavior for containers with allocators. (details)
Commit 88d93923e6653f02f5ece1faf9f49a7e309989a0 by leonardchan
[compiler-rt][hwasan] Move Thread::Init into hwasan_linux.cpp

This allows for other implementations to define their own version of `Thread::Init`.
This will be the case for Fuchsia where much of the thread initialization can be
broken up between different thread hooks (`__sanitizer_before_thread_create_hook`,
`__sanitizer_thread_create_hook`, `__sanitizer_thread_start_hook`). Namely, setting
up the heap ring buffer and stack info and can be setup before thread creation.
The stack ring buffer can also be setup before thread creation, but storing it into
`__hwasan_tls` can only be done on the thread start hook since it's only then we
can access `__hwasan_tls` for that thread correctly.

Differential Revision: https://reviews.llvm.org/D104248
The file was modifiedcompiler-rt/lib/hwasan/hwasan_thread.cpp
The file was modifiedcompiler-rt/lib/hwasan/hwasan_linux.cpp
The file was modifiedcompiler-rt/lib/hwasan/hwasan_thread.h
Commit e0b68f7149f9c66ba9e81878729225421f99a030 by fmayer
[hwasan] Clarify report for allocation-tail-overwritten.

Explain what the given stack trace means before showing it, rather than
only in the paragraph at the end.

Reviewed By: eugenis

Differential Revision: https://reviews.llvm.org/D104523
The file was modifiedcompiler-rt/test/hwasan/TestCases/tail-magic.c
The file was modifiedcompiler-rt/lib/hwasan/hwasan_report.cpp
Commit 5c189d30e60ac044b5bb473648c5505b4acdeb08 by ashermancinelli
[OpenMP] Update FAQ for enabling cuda offloading

Add an FAQ entry and add a few lines to an existing one. Document
the use of `GCC_INSTALL_PREFIX` for pointing clang to correct
GCC installation for two-stage build.

Reviewed By: jhuber6

Differential Revision: https://reviews.llvm.org/D104474
The file was modifiedopenmp/docs/SupportAndFAQ.rst
Commit ec91df8d8195b8b759a89734dba227da1eaa729f by kparzysz
Delay initialization of OptBisect

When LLVM is used in other projects, it may happen that global cons-
tructors will execute before the call to ParseCommandLineOptions.
Since OptBisect is initialized via a constructor, and has no ability
to be updated at a later time, passing "-opt-bisect-limit" to the
parse function may have no effect.

To avoid this problem use a cl::cb (callback) to set the bisection
limit when the option is actually processed.

Differential Revision: https://reviews.llvm.org/D104551
The file was modifiedllvm/lib/IR/OptBisect.cpp
The file was modifiedllvm/include/llvm/IR/OptBisect.h
Commit c1e6d25a0285b7825ef74690c622c47fb0123245 by kparzysz
XFAIL a testcase on Hexagon (missing-abstract-variable.ll)

This seems to be a common problem among several architectures.
The file was modifiedllvm/test/DebugInfo/Generic/missing-abstract-variable.ll
Commit 4688d151572693bd9383639164b8ab84e6f59cb8 by kparzysz
Revert "Delay initialization of OptBisect"

This reverts commit ec91df8d8195b8b759a89734dba227da1eaa729f.

It was committed by accident.
The file was modifiedllvm/lib/IR/OptBisect.cpp
The file was modifiedllvm/include/llvm/IR/OptBisect.h
Commit 14407332de6185462ceda785c620bb1206e7ca40 by browneee
[DFSan] Cleanup code for platforms other than Linux x86_64.

These other platforms are unsupported and untested.
They could be re-added later based on MSan code.

Reviewed By: gbalats, stephan.yichao.zhao

Differential Revision: https://reviews.llvm.org/D104481
The file was removedllvm/test/Instrumentation/DataFlowSanitizer/external_mask.ll
The file was modifiedcompiler-rt/lib/dfsan/dfsan_platform.h
The file was modifiedcompiler-rt/lib/dfsan/dfsan.cpp
The file was modifiedllvm/test/Instrumentation/DataFlowSanitizer/basic.ll
The file was modifiedllvm/lib/Transforms/Instrumentation/DataFlowSanitizer.cpp
Commit c60f1d5d98ebf1cec20b80f5a94d733290dd6556 by hoy
[CSSPGO] Fix an invalid hash table reference issue in the CS preinliner.

We were using a `StringMap` object to store all profiles to be emitted. The object is basically an unordered hash table, therefore updating it in the process of trasvering it may cause issue since the underlying bucket array could change.

I'm also moving the `csspgo-preinliner` switch around so that no context tri will be constructed (by the constructor of `CSPreInliner`) when the switch is off.

Reviewed By: wenlei

Differential Revision: https://reviews.llvm.org/D104267
The file was modifiedllvm/tools/llvm-profgen/ProfileGenerator.cpp
The file was modifiedllvm/lib/ProfileData/SampleProf.cpp
The file was modifiedllvm/tools/llvm-profgen/CSPreInliner.cpp
Commit 2e5dc4a1efe18a411734abb05b03431b120b1fea by angandhi
[AMDGPU] [CodeGen] Fold negate llvm.amdgcn.class into test mask

Implemented the transformation of xor (llvm.amdgcn.class x, mask), -1 into
llvm.amdgcn.class(x, ~mask). Added LIT tests as well.

Differential Revision: https://reviews.llvm.org/D104049
The file was addedllvm/test/CodeGen/AMDGPU/amdgpu-codegenprepare-foldnegate.ll
The file was modifiedllvm/lib/Target/AMDGPU/AMDGPUCodeGenPrepare.cpp
Commit 8c2c97287eacda1ed9cbee893054d868e3b990c5 by hoy
[CSSPGO][llvm-profgen] Ignore LBR records after interrupt transition

If we have seen an inwards transition from external code to internal code, but not a following outwards transition, the inwards transition is likely due to interrupt which is usually unpaired. Ignore current  and subsequent entries since they are likely from an unrelated pre-interrupt context.

LBR records from different interrupt context are unrelated and they should not be mixed together. Currenlty the OS does this for task-scheduling interrupt but not for all interrupts.

Reviewed By: wenlei, wlei

Differential Revision: https://reviews.llvm.org/D104276
The file was modifiedllvm/tools/llvm-profgen/PerfReader.cpp
The file was addedllvm/test/tools/llvm-profgen/cs-interrupt.test
The file was addedllvm/test/tools/llvm-profgen/Inputs/cs-interrupt.perfscript
Commit ac87133f1de902bcc7ab4330e7ac79b2ba376d34 by craig.topper
[RISCV] Teach vsetvli insertion to remember when predecessors have same AVL and SEW/LMUL ratio if their VTYPEs otherwise mismatch.

Previously we went directly to unknown state on VTYPE mismatch.
If we instead remember the partial match, we can use this to
still use X0, X0 vsetvli in successors if AVL and needed SEW/LMUL
ratio match.

Reviewed By: frasercrmck

Differential Revision: https://reviews.llvm.org/D104069
The file was modifiedllvm/test/CodeGen/RISCV/rvv/vsetvli-insert-crossbb.ll
The file was modifiedllvm/lib/Target/RISCV/RISCVInsertVSETVLI.cpp
The file was modifiedllvm/test/CodeGen/RISCV/rvv/fixed-vectors-unaligned.ll
Commit bdd5da9dec61072f693726d9ed2a94c78e431ba2 by flx
[clang-tidy] performance-unnecessary-copy-initialization: Directly examine the initializing var's initializer.

This fixes false positive cases where a reference is initialized outside of a
block statement and then its initializing variable is modified. Another case is
when the looped over container is modified.

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

Reviewed-by: ymandel
The file was modifiedclang-tools-extra/test/clang-tidy/checkers/performance-unnecessary-copy-initialization.cpp
The file was modifiedclang-tools-extra/clang-tidy/performance/UnnecessaryCopyInitialization.h
The file was modifiedclang-tools-extra/clang-tidy/performance/UnnecessaryCopyInitialization.cpp
Commit dd15c2723cd29574c341ec189409a6c83fbefb04 by arthur.j.odwyer
[libc++] [P1518R2] Better CTAD behavior for containers with allocators.

P1518 does the following in C++23 but we'll just do it in C++17 as well:
- Stop requiring `Alloc` to be an allocator on some container-adaptor deduction guides
- Stop deducing from `Allocator` on some sequence container constructors
- Stop deducing from `Allocator` on some other container constructors (libc++ already did this)

The affected constructors are the "allocator-extended" versions of
constructors where the non-allocator arguments are already sufficient
to deduce the allocator type. For example,

    std::pmr::vector<int> v1;
    std::vector v2(v1, std::pmr::new_delete_resource());
    std::stack s2(v1, std::pmr::new_delete_resource());

Differential Revision: https://reviews.llvm.org/D97742
The file was modifiedlibcxx/test/std/containers/associative/map/map.cons/deduct.pass.cpp
The file was modifiedlibcxx/test/std/containers/sequences/deque/deque.cons/deduct.pass.cpp
The file was modifiedlibcxx/include/vector
The file was modifiedlibcxx/test/std/containers/container.adaptors/stack/stack.cons/deduct.pass.cpp
The file was modifiedlibcxx/include/queue
The file was modifiedlibcxx/test/std/containers/container.adaptors/priority.queue/priqueue.cons/deduct.pass.cpp
The file was modifiedlibcxx/test/std/containers/container.adaptors/queue/queue.cons/deduct.pass.cpp
The file was modifiedlibcxx/include/list
The file was modifiedlibcxx/test/std/containers/associative/multimap/multimap.cons/deduct.pass.cpp
The file was modifiedlibcxx/docs/Cxx2bStatusPaperStatus.csv
The file was modifiedlibcxx/test/std/containers/sequences/vector/vector.cons/deduct.pass.cpp
The file was modifiedlibcxx/test/std/containers/sequences/forwardlist/forwardlist.cons/deduct.pass.cpp
The file was modifiedlibcxx/include/forward_list
The file was modifiedlibcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/deduct.pass.cpp
The file was modifiedlibcxx/include/stack
The file was modifiedlibcxx/include/deque
The file was modifiedlibcxx/test/std/containers/unord/unord.map/unord.map.cnstr/deduct.pass.cpp
The file was modifiedlibcxx/test/std/containers/sequences/list/list.cons/deduct.pass.cpp