SuccessChanges

Summary

  1. [libc++] Allow retries in a few more flaky tests (details)
  2. fix comment typo to cycle bots (details)
  3. [LSR] Add a flag that overrides the target's preferred addressing mode (details)
  4. fix comment typo to cycle bots (details)
  5. [NFC] Refactor LoopInterchange into a loop-nest pass (details)
  6. [NPM][LTO] Update buildLTODefaultPipeline to be more in-line with the old pass manager (details)
  7. [SROA] Propagate correct TBAA/TBAA Struct offsets (details)
  8. [Pipeliner] Fixed optimization remarks and debug dumps Initiation (details)
  9. [libcxx] Implement is_absolute properly for windows (details)
  10. [lldb] Improve error message for modules with dots or dashes (details)
  11. [SampleFDO] Add missing #includes to unbreak modules build after D96455 (details)
  12. tsan: fix mmap_lots test (details)
  13. [mlir] Add fma operation to std dialect (details)
  14. [RISCV] Merge the vsetvli and vsetvlimax intrinsic selection (details)
  15. [RISCV] Merge the handlers for masked and unmasked segment loads/stores. (details)
  16. [WebAssembly] Change catch_all's opcode (details)
  17. Revert "[SampleFDO] Reapply: Refactor SampleProfile.cpp" (details)
  18. [mlir] silence unused-function warnings in table-generated code (details)
  19. [gn build] Port c28622fbf363 (details)
Commit 642048eea041ff79aa9e8a934edff2415ab16447 by Louis Dionne
[libc++] Allow retries in a few more flaky tests
The file was modifiedlibcxx/test/std/thread/thread.condition/thread.condition.condvarany/wait_until_pred.pass.cpp
The file was modifiedlibcxx/test/std/thread/thread.condition/thread.condition.condvar/wait_until_pred.pass.cpp
The file was modifiedlibcxx/test/std/thread/thread.condition/thread.condition.condvarany/wait_for.pass.cpp
The file was modifiedlibcxx/test/std/thread/thread.condition/thread.condition.condvar/wait_for.pass.cpp
The file was modifiedlibcxx/test/std/thread/thread.condition/thread.condition.condvarany/wait_for_pred.pass.cpp
The file was modifiedlibcxx/test/std/thread/thread.condition/thread.condition.condvarany/wait_pred.pass.cpp
The file was modifiedlibcxx/test/std/thread/thread.condition/thread.condition.condvar/wait_pred.pass.cpp
The file was modifiedlibcxx/test/std/thread/thread.condition/thread.condition.condvar/wait_until.pass.cpp
The file was modifiedlibcxx/test/std/thread/thread.condition/thread.condition.condvar/wait_for_pred.pass.cpp
The file was modifiedlibcxx/test/std/thread/thread.condition/thread.condition.condvarany/wait_until.pass.cpp
Commit cf59ffbfe3be29e2cec07c5b04e047a2af2ba3f0 by thakis
fix comment typo to cycle bots
The file was modifiedlld/include/lld/Common/Strings.h
Commit f78aa8b2c2ebe021b09f35a25e60a8688c757638 by sjoerd.meijer
[LSR] Add a flag that overrides the target's preferred addressing mode

This adds a new flag -lsr-preferred-addressing-mode to override the target's
preferred addressing mode. It replaces flag -lsr-backedge-indexing, which is
equivalent to preindexed addressing that is one of the options that
-lsr-preferred-addressing-mode accepts.

Differential Revision: https://reviews.llvm.org/D96855
The file was modifiedllvm/test/CodeGen/ARM/dsp-loop-indexing.ll
The file was modifiedllvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp
The file was modifiedllvm/test/CodeGen/ARM/loop-indexing.ll
Commit 872efb0b31f473d324adf74efc4e7809741f1414 by thakis
fix comment typo to cycle bots
The file was modifiedlld/ELF/LTO.cpp
Commit 0eeaec2a6d5f5758c2bbb0f47c06f769f7ae2813 by tu.da.wei
[NFC] Refactor LoopInterchange into a loop-nest pass

This is the preliminary patch of converting `LoopInterchange` pass to a loop-nest pass and has no intended functional change.
Changes that are not loop-nest related are split to D96650.

Reviewed By: Whitney

Differential Revision: https://reviews.llvm.org/D96644
The file was modifiedllvm/include/llvm/Transforms/Scalar/LoopInterchange.h
The file was modifiedllvm/include/llvm/Analysis/LoopNestAnalysis.h
The file was addedllvm/test/Transforms/LoopInterchange/interchanged-loop-nest-3.ll
The file was modifiedllvm/lib/Transforms/Scalar/LoopInterchange.cpp
Commit 908ac47ef4c21d87c90e47859f81c747228e460e by david.green
[NPM][LTO] Update buildLTODefaultPipeline to be more in-line with the old pass manager

The NPM LTO pipeline has a lot of fixme's and missing passes, causing a
lot of regressions after the switch in c70737b. Notably unrolling and
vectorization were both disabled, but many other passes are missing
compared to the old pass manager. This attempt to enable the most
obvious missing passes like the unroller, vectorization and other loop
passes, fixing the existing FIXME comments.

Differential Revision: https://reviews.llvm.org/D96780
The file was modifiedllvm/lib/Passes/PassBuilder.cpp
The file was modifiedllvm/test/Other/new-pm-lto-defaults.ll
Commit 40862b1a7486a969ff044cd240aad24f4183cc10 by gh
[SROA] Propagate correct TBAA/TBAA Struct offsets

SROA does not correctly account for offsets in TBAA/TBAA struct metadata.
This patch creates functionality for generating new MD with the corresponding
offset and updates SROA to use this functionality.

Differential Revision: https://reviews.llvm.org/D95826
The file was modifiedllvm/include/llvm/IR/Operator.h
The file was addedllvm/test/Transforms/SROA/tbaa-struct2.ll
The file was modifiedllvm/include/llvm/IR/Metadata.h
The file was modifiedllvm/lib/Analysis/TypeBasedAliasAnalysis.cpp
The file was modifiedllvm/test/Transforms/SROA/basictest.ll
The file was modifiedllvm/lib/Transforms/Scalar/SROA.cpp
The file was modifiedllvm/lib/IR/Operator.cpp
Commit f0ec9f1bb3f2236afaddc68bd6cb6f1e74c2a402 by marianne.ms.qc
[Pipeliner] Fixed optimization remarks and debug dumps Initiation
Interval value

The II value was incremented before exiting the loop, and therefor when
used in the optimization remarks and debug dumps it did not reflect the
initiation interval actually used in Schedule.

Differential Revision: https://reviews.llvm.org/D95692
The file was modifiedllvm/include/llvm/CodeGen/MachinePipeliner.h
The file was modifiedllvm/lib/CodeGen/MachinePipeliner.cpp
Commit 8a783e68452f646360d9902d2c2bc0e115d7bfa9 by martin
[libcxx] Implement is_absolute properly for windows

Differential Revision: https://reviews.llvm.org/D91177
The file was modifiedlibcxx/include/filesystem
Commit d6e80578fc5e5199d5783671bd0c8ce1050925f9 by Jonas Devlieghere
[lldb] Improve error message for modules with dots or dashes

LLDB does not like to import Python files with dashes or dots in their
name. While the former are technically allowed, it is discouraged. Dots
are allowed for subpackages but not in module names. This patch improves
the user experience by printing a useful error.

Before this patch:

  error: module importing failed: SyntaxError('invalid syntax',
  ('<string>', 1, 11, 'import foo-bar\n'))

After this patch:

  error: module importing failed: Python discourages dashes in module
  names: foo-bar

rdar://74263511

[1] https://www.python.org/dev/peps/pep-0008/#package-and-module-names

Differential revision: https://reviews.llvm.org/D96833
The file was modifiedlldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp
The file was addedlldb/test/Shell/ScriptInterpreter/Python/command_import.test
Commit c73cbf218a289029cc0b54183c3cf79454ecc76f by Vedant Kumar
[SampleFDO] Add missing #includes to unbreak modules build after D96455

Bot: http://green.lab.llvm.org/green/view/LLDB/job/lldb-cmake/28999

```
/Users/buildslave/jenkins/workspace/lldb-cmake/llvm-project/llvm/include/llvm/Transforms/Utils/SampleProfileLoaderBaseImpl.h:124:19: error: missing '#include "llvm/Analysis/PostDominators.h"'; 'PostDominatorTree' must be declared before it is used
  std::unique_ptr<PostDominatorTree> PDT;
                  ^
/Users/buildslave/jenkins/workspace/lldb-cmake/llvm-project/llvm/include/llvm/Analysis/PostDominators.h:28:7: note: declaration here is not visible
class PostDominatorTree : public PostDomTreeBase<BasicBlock> {
      ^
While building module 'LLVM_Transforms' imported from /Users/buildslave/jenkins/workspace/lldb-cmake/llvm-project/llvm/lib/Transforms/CFGuard/CFGuard.cpp:15:
In file included from <module-includes>:191:
/Users/buildslave/jenkins/workspace/lldb-cmake/llvm-project/llvm/include/llvm/Transforms/Utils/SampleProfileLoaderBaseImpl.h:125:19: error: missing '#include "llvm/Analysis/LoopInfo.h"'; 'LoopInfo' must be declared before it is used
  std::unique_ptr<LoopInfo> LI;
                  ^
/Users/buildslave/jenkins/workspace/lldb-cmake/llvm-project/llvm/include/llvm/Analysis/LoopInfo.h:1079:7: note: declaration here is not visible
class LoopInfo : public LoopInfoBase<BasicBlock, Loop> {
      ^
While building module 'LLVM_Transforms' imported from /Users/buildslave/jenkins/workspace/lldb-cmake/llvm-project/llvm/lib/Transforms/CFGuard/CFGuard.cpp:15:
In file included from <module-includes>:191:
/Users/buildslave/jenkins/workspace/lldb-cmake/llvm-project/llvm/include/llvm/Transforms/Utils/SampleProfileLoaderBaseImpl.h:149:3: error: missing '#include "llvm/Analysis/OptimizationRemarkEmitter.h"'; 'OptimizationRemarkEmitter' must be declared before it is used
  OptimizationRemarkEmitter *ORE = nullptr;
  ^
/Users/buildslave/jenkins/workspace/lldb-cmake/llvm-project/llvm/include/llvm/Analysis/OptimizationRemarkEmitter.h:33:7: note: declaration here is not visible
class OptimizationRemarkEmitter {
      ^
/Users/buildslave/jenkins/workspace/lldb-cmake/llvm-project/llvm/lib/Transforms/CFGuard/CFGuard.cpp:15:10: fatal error: could not build module 'LLVM_Transforms'
```
The file was modifiedllvm/include/llvm/Transforms/Utils/SampleProfileLoaderBaseImpl.h
Commit fb19400d4e4c421ce61907bf92a92be8d937e584 by dvyukov
tsan: fix mmap_lots test

If tsan runtime will try to allocate something during exit handling,
the allocation will fail because there is no VA whatsoever.
It's observed to fail with the following error in some cases:
failed to allocate 0x1000 (4096) bytes of DTLS_NextBlock.
So terminate the process immediately.

Reviewed-in: https://reviews.llvm.org/D96874
The file was modifiedcompiler-rt/test/tsan/mmap_lots.cpp
Commit 519f5917b458e51d4d12e034490d1a6f42d72f77 by ezhulenev
[mlir] Add fma operation to std dialect

Will remove `vector.fma` operation in the followup CLs.

Reviewed By: mehdi_amini

Differential Revision: https://reviews.llvm.org/D96801
The file was modifiedmlir/lib/Dialect/StandardOps/IR/Ops.cpp
The file was modifiedmlir/lib/Conversion/StandardToLLVM/StandardToLLVM.cpp
The file was modifiedmlir/test/Conversion/StandardToLLVM/standard-to-llvm.mlir
The file was modifiedmlir/include/mlir/Dialect/StandardOps/IR/Ops.td
Commit 6f30d0035a8e5ddbffdb940a88c4ab62525face1 by craig.topper
[RISCV] Merge the vsetvli and vsetvlimax intrinsic selection

These have very similar code just with a different number of
operands and handling for vsetivl.

Differential Revision: https://reviews.llvm.org/D96834
The file was modifiedllvm/lib/Target/RISCV/RISCVISelDAGToDAG.cpp
Commit d4353a3101542522d226419675946ca59ab7e546 by craig.topper
[RISCV] Merge the handlers for masked and unmasked segment loads/stores.

A lot of the code for the masked and unmasked is the same. This
patch adds a boolean to handle the differences so we can share
the code.

Differential Revision: https://reviews.llvm.org/D96841
The file was modifiedllvm/lib/Target/RISCV/RISCVISelDAGToDAG.cpp
The file was modifiedllvm/lib/Target/RISCV/RISCVISelDAGToDAG.h
Commit 7c594bab00ee514417c605710885b21b9635e8d7 by aheejin
[WebAssembly] Change catch_all's opcode

We decided to change `catch_all`'s opcode from 0x05, which is the same
as `else`, to 0x19, to avoid some complicated handling in the tools.

See: https://github.com/WebAssembly/exception-handling/issues/147

Reviewed By: sbc100

Differential Revision: https://reviews.llvm.org/D96863
The file was modifiedllvm/lib/Target/WebAssembly/WebAssemblyInstrControl.td
Commit c28622fbf363d8ade9598ea6ffb88cb9a8f7604f by Vedant Kumar
Revert "[SampleFDO] Reapply: Refactor SampleProfile.cpp"

Revert "[SampleFDO] Add missing #includes to unbreak modules build after D96455"

This reverts commit c73cbf218a289029cc0b54183c3cf79454ecc76f.

Revert "[SampleFDO] Fix MSVC "namespace uses itself" warning (NFC)"

This reverts commit a23e6b321ca623b83252f8b1e06a2ad4fc441f89.

Revert "[SampleFDO] Reapply: Refactor SampleProfile.cpp"

This reverts commit 6fd5ccff72eeaffcb3b3ba2696282015aab755bc.

Still seeing link failures when building llc (or other tools), due to
the new SampleProfileLoaderBaseImpl.h containing definitions that get
duplicated across multiple TU's.

```
duplicate symbol 'llvm::SampleProfileLoaderBaseImpl::findEquivalenceClasses(llvm::Function&)' in:
    tools/llc/CMakeFiles/llc.dir/llc.cpp.o
    lib/libLLVMInstCombine.a(InstCombineVectorOps.cpp.o)
duplicate symbol 'llvm::SampleProfileLoaderBaseImpl::buildEdges(llvm::Function&)' in:
    tools/llc/CMakeFiles/llc.dir/llc.cpp.o
    lib/libLLVMInstCombine.a(InstCombineVectorOps.cpp.o)
duplicate symbol 'llvm::SampleProfileLoaderBaseImpl::computeDominanceAndLoopInfo(llvm::Function&)' in:
    tools/llc/CMakeFiles/llc.dir/llc.cpp.o
    lib/libLLVMInstCombine.a(InstCombineVectorOps.cpp.o)
duplicate symbol 'llvm::SampleProfileLoaderBaseImpl::getFunctionLoc(llvm::Function&)' in:
    tools/llc/CMakeFiles/llc.dir/llc.cpp.o
    lib/libLLVMInstCombine.a(InstCombineVectorOps.cpp.o)
duplicate symbol 'llvm::SampleProfileLoaderBaseImpl::getBlockWeight(llvm::BasicBlock const*)' in:
    tools/llc/CMakeFiles/llc.dir/llc.cpp.o
    lib/libLLVMInstCombine.a(InstCombineVectorOps.cpp.o)
duplicate symbol 'llvm::SampleProfileLoaderBaseImpl::printBlockWeight(llvm::raw_ostream&, llvm::BasicBlock const*) const' in:
    tools/llc/CMakeFiles/llc.dir/llc.cpp.o
    lib/libLLVMInstCombine.a(InstCombineVectorOps.cpp.o)
duplicate symbol 'llvm::SampleProfileLoaderBaseImpl::printBlockEquivalence(llvm::raw_ostream&, llvm::BasicBlock const*)' in:
    tools/llc/CMakeFiles/llc.dir/llc.cpp.o
    lib/libLLVMInstCombine.a(InstCombineVectorOps.cpp.o)
duplicate symbol 'llvm::SampleProfileLoaderBaseImpl::printEdgeWeight(llvm::raw_ostream&, std::__1::pair<llvm::BasicBlock const*, llvm::BasicBlock const*>)' in:
    tools/llc/CMakeFiles/llc.dir/llc.cpp.o
    lib/libLLVMInstCombine.a(InstCombineVectorOps.cpp.o)
```
The file was modifiedllvm/lib/Transforms/Utils/CMakeLists.txt
The file was modifiedllvm/lib/Transforms/IPO/SampleProfile.cpp
The file was removedllvm/lib/Transforms/Utils/SampleProfileLoaderBaseUtil.cpp
The file was removedllvm/include/llvm/Transforms/Utils/SampleProfileLoaderBaseUtil.h
The file was removedllvm/include/llvm/Transforms/Utils/SampleProfileLoaderBaseImpl.h
Commit 4a3473ff3b5c92de16d9571391f417007a9f0f24 by zinenko
[mlir] silence unused-function warnings in table-generated code

Reviewed By: mehdi_amini

Differential Revision: https://reviews.llvm.org/D96695
The file was modifiedmlir/lib/Target/LLVMIR/Dialect/LLVMIR/LLVMToLLVMIRTranslation.cpp
The file was modifiedmlir/lib/Target/LLVMIR/ModuleTranslation.cpp
Commit 14bda035abd1d1c760c3e901cc053292e750e468 by llvmgnsyncbot
[gn build] Port c28622fbf363
The file was modifiedllvm/utils/gn/secondary/llvm/lib/Transforms/Utils/BUILD.gn