SuccessChanges

Summary

  1. fix up test from D102742 (details)
  2. [CSSPGO][llvm-profgen] Report samples for untrackable frames. (details)
  3. [GreedyPatternRewriter] Introduce a config object that allows controlling internal parameters. NFC. (details)
  4. [NFC][CSSPGO]llvm-profge] Fix Build warning dueo to an attrbute usage. (details)
  5. [flang][cmake] Set the default for FLANG_BUILD_NEW_DRIVER for oot builds (details)
  6. [lldb] Move ClangModulesDeclVendor ownership to ClangPersistentVariables from Target (details)
  7. Do not create LLVM IR `constant`s for objects with dynamic initialisation (details)
  8. [libc++] Assume that __wrap_iter always wraps a fancy pointer. (details)
  9. [compiler-rt][scudo] Fix sign-compare warnings (details)
  10. [mlir] Lower sm version for TensorCore intergration tests (details)
  11. [lldb][NFC] Remove unused header from Target (details)
  12. [libomptarget] [amdgpu] Fix copy-paste error setting NumThreads for a corner case. (details)
  13. [OpenMP] Fix crashing critical section with hint clause (details)
  14. [SLP] Fix "gathering" of insertelement instructions (details)
  15. [mlir-opt] Don't enable `printOpOnDiagnostic` if it was explicitly disabled. (details)
Commit 7cd07d339022ef92148e27e8fe12f65865f707d9 by ndesaulniers
fix up test from D102742

In D102742, I mistakenly put the split file designator above a bunch of
CHECK lines, which unintentionally removed the CHECKs from actually
being verified.

This can be verified by observing:
<build dir>/test/CodeGen/X86/Output/stack-protector-3.ll.tmp/main.ll
The file was modifiedllvm/test/CodeGen/X86/stack-protector-3.ll
Commit 3b51b51877ee590712e6a8c22882c8ac107bafb7 by hoy
[CSSPGO][llvm-profgen] Report samples for untrackable frames.

Fixing an issue where samples collected for an untrackable frame is not reported. An untrackable frame refers to a frame whose caller is untrackable due to missing debug info or pseudo probe. Though the frame is connected to its parent frame through the frame pointer chain at runtime, the compiler cannot build the connection without debug info or pseudo probe. In such case we just need to report the untrackable frame as the base frame and all of its child frames.

With more samples reported I'm seeing this improves the performance of an internal benchmark by 2.5%.

Reviewed By: wenlei, wlei

Differential Revision: https://reviews.llvm.org/D102961
The file was modifiedllvm/tools/llvm-profgen/PerfReader.cpp
The file was addedllvm/test/tools/llvm-profgen/Inputs/truncated-pseudoprobe.ll
The file was addedllvm/test/tools/llvm-profgen/Inputs/truncated-pseudoprobe.perfscript
The file was addedllvm/test/tools/llvm-profgen/truncated-pseudoprobe.test
The file was modifiedllvm/tools/llvm-profgen/PerfReader.h
The file was addedllvm/test/tools/llvm-profgen/Inputs/truncated-pseudoprobe.perfbin
Commit 64716b2c39c10a3ea3a893da6106d2d55a0e8deb by clattner
[GreedyPatternRewriter] Introduce a config object that allows controlling internal parameters. NFC.

This exposes the iterations and top-down processing as flags, and also
allows controlling whether region simplification is desirable for a client.
This allows deleting some duplicated entrypoints to
applyPatternsAndFoldGreedily.

This also deletes the Constant Preprocessing pass, which isn't worth it
on balance.

All defaults are all kept the same, so no one should see a behavior change.

Differential Revision: https://reviews.llvm.org/D102988
The file was modifiedmlir/lib/Transforms/Utils/FoldUtils.cpp
The file was modifiedmlir/include/mlir/Transforms/FoldUtils.h
The file was modifiedmlir/include/mlir/Transforms/GreedyPatternRewriteDriver.h
The file was modifiedmlir/lib/Transforms/Canonicalizer.cpp
The file was modifiedmlir/lib/Transforms/Utils/GreedyPatternRewriteDriver.cpp
Commit 00bfde723b643b4b79b2cf4193fb65ef0b9d47ee by hoy
[NFC][CSSPGO]llvm-profge] Fix Build warning dueo to an attrbute usage.
The file was modifiedllvm/tools/llvm-profgen/PerfReader.h
Commit 97a71ae6259191c09de644c55deb4448a259a1b1 by andrzej.warzynski
[flang][cmake] Set the default for FLANG_BUILD_NEW_DRIVER for oot builds

For out-of-tree builds of Flang, FLANG_BUILD_NEW_DRIVER is not inherited
from llvm-project/llvm/CMakeLists.txt. Instead, a separate definition is
required (but only for out-of-tree builds).

Differential Revision: https://reviews.llvm.org/D102323
The file was modifiedflang/CMakeLists.txt
Commit 4c0b0de904a5622c33e3ed97e86c6792fbc13feb by apl
[lldb] Move ClangModulesDeclVendor ownership to ClangPersistentVariables from Target

More decoupling of plugins and non-plugins. Target doesn't need to
manage ClangModulesDeclVendor and ClangPersistentVariables is always available
in situations where you need ClangModulesDeclVendor.

Differential Revision: https://reviews.llvm.org/D102811
The file was modifiedlldb/source/Plugins/ExpressionParser/Clang/ClangExpressionSourceCode.cpp
The file was modifiedlldb/source/Plugins/ExpressionParser/Clang/ClangPersistentVariables.cpp
The file was modifiedlldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp
The file was modifiedlldb/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp
The file was modifiedlldb/include/lldb/Target/Target.h
The file was modifiedlldb/source/Target/Target.cpp
The file was modifiedlldb/source/Plugins/ExpressionParser/Clang/ClangASTSource.h
The file was modifiedlldb/source/Target/CMakeLists.txt
The file was modifiedlldb/source/Plugins/ExpressionParser/Clang/ClangExpressionDeclMap.cpp
The file was modifiedlldb/source/Plugins/ExpressionParser/Clang/ClangPersistentVariables.h
The file was modifiedlldb/source/Plugins/ExpressionParser/Clang/ClangASTSource.cpp
The file was modifiedlldb/source/Plugins/Language/ObjC/ObjCLanguage.cpp
The file was modifiedlldb/source/Plugins/ExpressionParser/Clang/ClangUserExpression.cpp
Commit 13dd65b3a1a3ac049b5f3a9712059f7c61649bea by momchil.velikov
Do not create LLVM IR `constant`s for objects with dynamic initialisation

When a const-qualified object has a section attribute, that
section is set to read-only and clang outputs a LLVM IR constant
for that object. This is incorrect for dynamically initialised
objects.

For example:

    int init() { return 15; }

    __attribute__((section("SA")))
    const int a = init();

a is allocated to a read-only section and is left
unintialised (zero-initialised).

This patch adds checks if an initialiser is a constant expression
and allocates objects to sections as follows:

* const-qualified objects
  - no initialiser or constant initialiser: .rodata
  - dynamic initializer: .bss
* non const-qualified objects
  - no initialiser or dynamic initialiser: .bss
  - constant initialiser: .data

(".rodata", ".data", and ".bss" names used just for explanatory
purpose)

Differential Revision: https://reviews.llvm.org/D102693
The file was modifiedclang/lib/Sema/SemaDecl.cpp
The file was addedclang/test/CodeGenCXX/const-dynamic-init.cpp
The file was addedclang/test/CodeGenCXX/clang-sections-1.cpp
Commit fc9248877d07132981f2d598d3684de81d12d0b8 by arthur.j.odwyer
[libc++] Assume that __wrap_iter always wraps a fancy pointer.

Not only do we conscientiously avoid using `__wrap_iter` for non-contiguous
iterators (in vector, string, span...) but also we make the assumption
(in regex) that `__wrap_iter<_Iter>` is contiguous for all `_Iter`.

So `__wrap_iter<reverse_iterator<int*>>` should be considered IFNDR,
and every `__wrap_iter` should correctly advertise contiguity in C++20.

Drive-by simplify some type traits.

Reviewed as part of https://reviews.llvm.org/D102781
The file was modifiedlibcxx/test/libcxx/iterators/contiguous_iterators.pass.cpp
The file was modifiedlibcxx/include/iterator
The file was modifiedlibcxx/include/__iterator/iterator_traits.h
Commit bec6b0225211ac2686e329744882cb87f01d73a5 by Jinsong Ji
[compiler-rt][scudo] Fix sign-compare warnings

Fix buildbot failure
https://lab.llvm.org/buildbot/#/builders/57/builds/6542/steps/6/logs/stdio

/llvm-project/llvm/utils/unittest/googletest/include/gtest/gtest.h:1629:28:
error: comparison of integers of different signs: 'const unsigned long'
and 'const int' [-Werror,-Wsign-compare]
GTEST_IMPL_CMP_HELPER_(GT, >);
~~~~~~~~~~~~~~~~~~~~~~~~~~^~
/llvm-project/llvm/utils/unittest/googletest/include/gtest/gtest.h:1609:12:
note: expanded from macro 'GTEST_IMPL_CMP_HELPER_'
  if (val1 op val2) {\
      ~~~~ ^  ~~~~
/llvm-project/compiler-rt/lib/scudo/standalone/tests/common_test.cpp:30:3:
note: in instantiation of function template specialization
'testing::internal::CmpHelperGT<unsigned long, int>' requested here
  EXPECT_GT(OnStart, 0);
  ^

Reviewed By: vitalybuka

Differential Revision: https://reviews.llvm.org/D103029
The file was modifiedcompiler-rt/lib/scudo/standalone/tests/common_test.cpp
Commit dae90386116f86c0543ee450b5c0d50394ccdbe3 by thomasraoux
[mlir] Lower sm version for TensorCore intergration tests

Those tests only require sm70, this allows to run those integration
tests on more hardware.

Differential Revision: https://reviews.llvm.org/D103049
The file was modifiedmlir/test/Integration/GPU/CUDA/TensorCore/wmma-matmul-f32.mlir
The file was modifiedmlir/test/Integration/GPU/CUDA/TensorCore/wmma-matmul-f16.mlir
Commit 99155e913e9bad5f7f8a247f8bb3a3ff3da74af1 by apl
[lldb][NFC] Remove unused header from Target

Should have been removed with 4c0b0de904a5622c33e3ed97e86c6792fbc13feb
but I forgot to do so.
The file was modifiedlldb/source/Target/Target.cpp
Commit ca17b26d4d7a1bd95346184d3f3ccdf006c33781 by Dhruva.Chakrabarti
[libomptarget] [amdgpu] Fix copy-paste error setting NumThreads for a corner case.

Fix the case where NumTeams was set incorrectly instead of NumThreads

Reviewed By: JonChesterfield

Differential Revision: https://reviews.llvm.org/D103037
The file was modifiedopenmp/libomptarget/plugins/amdgpu/src/rtl.cpp
Commit 95cefacfe1c1fe920f22b749f17f630925bd6094 by hansang.bae
[OpenMP] Fix crashing critical section with hint clause

Runtime was using the default lock type without using the hint.

Differential Revision: https://reviews.llvm.org/D102955
The file was addedopenmp/runtime/test/critical/omp_critical_with_hint.c
The file was modifiedopenmp/runtime/src/kmp_csupport.cpp
Commit b2cd89501164ebadcddfd92304fe7b5675e59748 by anton.a.afanasyev
[SLP] Fix "gathering" of insertelement instructions

For rare exceptional case vector tree node (insertelements for now only)
is marked as `NeedToGather`, this case is processed by patch. Follow-up
of D98714 to fix bug reported here https://reviews.llvm.org/D98714#2764135.

Differential Revision: https://reviews.llvm.org/D102675
The file was modifiedllvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
The file was modifiedllvm/test/Transforms/SLPVectorizer/X86/insert-element-build-vector.ll
The file was modifiedllvm/test/Transforms/SLPVectorizer/X86/insert-element-build-vector-inseltpoison.ll
Commit 60c735d409bf8077b2611d102b9a5e5af48464d5 by riddleriver
[mlir-opt] Don't enable `printOpOnDiagnostic` if it was explicitly disabled.

We are currently explicitly setting the flag solely based on the value of `-verify`, which ends up ignoring the situation where the user explicitly disabled this option from the command line.

Differential Revision: https://reviews.llvm.org/D102952
The file was modifiedmlir/lib/Support/MlirOptMain.cpp