SuccessChanges

Summary

  1. [SCEV] Cleanup doesIVOverflowOnX checks [NFC] (details)
  2. Revert "[OpaquePtr] Make atomicrmw work with opaque pointers" (details)
  3. [InstCombine] avoid infinite loop from vector select transforms (details)
  4. [AMDGPU][GlobalISel] Stop foldInsertEltToCmpSelect from changing reg banks (details)
  5. [flang] Fix recent regression (proc. dummy arg on ENTRY) (details)
  6. [CSSPGO][llvm-profgen] Change default cold threshold for context merging (details)
  7. [mlir][linalg] Update Linalg.md (NFC). (details)
  8. [Hexagon] Improve argument packing in vector shuffle selection (details)
  9. [scudo] Consistent setting of SCUDO_DEBUG (details)
  10. [scudo] Fix CHECK implementation (details)
  11. [LoopIdiom] 'arithmetic right-shift until zero': don't turn potentially infinite loops into finite ones (details)
  12. [mlir] Add an optional distributionTypes attribute to TiledLoopOp. (details)
  13. [Matrix] Factor and distribute transposes across multiplies (details)
  14. [mlir][doc] Fix links and references in documentation of Tutorials (details)
  15. [InstSimplify] allow undef element match in vector select condition value (details)
  16. [AMDGPU] Lower kernel LDS into a sorted structure (details)
  17. [mlir] Use unique_function in AbstractOperation fields (details)
  18. Add pre-commit tests for [D102215](https://reviews.llvm.org/D102215). (details)
  19. [SelectionDAG] Propagate scoped AA metadata when lowering mem intrinsics. (details)
  20. [CVP] Guard against poison in common phi value transform (PR50399) (details)
  21. Revert "[NFC][scudo] Let disableMemoryTagChecksTestOnly to fail" (details)
  22. [lld-macho][nfc] Misc code cleanup (details)
  23. [lld-macho][nfc] clang-format everything (details)
  24. [lld-macho][nfc] Rename MergedOutputSection to ConcatOutputSection (details)
  25. [lld-macho][nfc] Sort OutputSections based on explicit order of command-line inputs (details)
  26. [lld-macho][nfc] Remove unnecessary parameterization of section sort (details)
  27. [gn build] Port 33706191d88d (details)
  28. [SCEV] Cache operands used in BEInfo (NFC) (details)
  29. Revert "[AIX] Avoid structor alias; die before bad alias codegen" (details)
  30. [Matrix] Use LLVM_DEBUG for a debug flag (details)
  31. [mlir] Add a copy constructor to FailureOr (details)
  32. [JITLink][MachO][arm64] Use a more descriptive test name. (details)
  33. [JITLink][MachO][arm64] Build GOT entries for defined symbols too. (details)
  34. [NFC] Fix 'unused' warning (details)
  35. [AMDGPU] Fix unused variable warning. NFC. (details)
  36. [TSAN][CMake] Add support to run lit on individual tests (details)
  37. [docs] Explain address spaces a bit more in opaque pointers doc (details)
  38. [sanitizer][test] s/A<10>/A<7>/ to fix "WARNING: Symbolizer buffer too small" which is somehow a hard error on s390x (details)
  39. [Hexagon] Remove unused function from HexagonISelDAGToDAGHVX.cpp (details)
  40. [docs] [CMake] Change recommendations for how to use LLVM_DEFINITIONS (details)
  41. [libcxx] Make the visibility attributes consistent for __narrow_to_utf8/__widen_from_utf8 (details)
  42. [libcxx] [test] Explain an XFAIL LIBCXX-WINDOWS-FIXME and convert into UNSUPPORTED (details)
  43. [libcxxabi] Use ASan interface header for declaration. NFC (details)
  44. [Canonicalize] Fully parameterize the pass based on config options. NFC. (details)
  45. [flang] Implement checks for defined input/output procedures (details)
  46. [Canonicalize] Switch the default setting to "top down". (details)
  47. [libcxx] Fix the function name in exceptions from create_directories (details)
  48. [libc++] [P0619] Hide not1 and not2 under _LIBCPP_ENABLE_CXX20_REMOVED_NEGATORS. (details)
  49. Revert "[LoopDeletion] Break backedge if we can prove that the loop is exited on 1st iteration" (details)
Commit aabca2d1da11aa3b832ce499acccca093236aac3 by listmail
[SCEV] Cleanup doesIVOverflowOnX checks [NFC]

Stylistic changes only.
1) Don't pass a parameter just to do an early exit.
2) Use a name which matches actual behavior.
The file was modifiedllvm/lib/Analysis/ScalarEvolution.cpp
The file was modifiedllvm/include/llvm/Analysis/ScalarEvolution.h
Commit 0bbb502daa9017480d5fe595556a4f4e5adfcb3f by aeubanks
Revert "[OpaquePtr] Make atomicrmw work with opaque pointers"

This reverts commit 0bebda17bea38785c90a6fec3ca01cf74eb78b7c.

Causing "Invalid record" errors.
The file was modifiedllvm/lib/IR/Instructions.cpp
The file was modifiedllvm/test/Verifier/opaque-ptr.ll
The file was modifiedllvm/lib/AsmParser/LLParser.cpp
The file was modifiedllvm/lib/Bitcode/Reader/BitcodeReader.cpp
The file was modifiedllvm/test/Assembler/opaque-ptr.ll
Commit ae1bc9ebf3a07d2b8c93624518f649805deccc3e by spatel
[InstCombine] avoid infinite loop from vector select transforms

The 2nd test is based on the fuzzer example in post-commit
comments of D101191 -
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=34661

The 1st test shows that we don't deal with this symmetrically.
We should be able to reduce both examples (possibly in
instsimplify instead of instcombine).
The file was modifiedllvm/lib/Transforms/InstCombine/InstCombineSelect.cpp
The file was modifiedllvm/test/Transforms/InstCombine/select.ll
Commit 18c5444702893fd63b0a99ec7133dd714284f9d2 by Mirko.Brkusanin
[AMDGPU][GlobalISel] Stop foldInsertEltToCmpSelect from changing reg banks

This function can change regbank for registers which already have a selected
bank. Depending on the instruction where these registers were used it can
cause instruction selection to fail.
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/insertelement.ll
The file was modifiedllvm/lib/Target/AMDGPU/AMDGPURegisterBankInfo.cpp
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/regbankselect-insert-vector-elt.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/insertelement.i8.ll
Commit d3495ffa5ebaa0956adce1574454b387769931f6 by pklausler
[flang] Fix recent regression (proc. dummy arg on ENTRY)

A recent fix for problems with ENTRY statement handling didn't
get the case of a procedure dummy argument on an ENTRY statement
in an executable part right; the code presumed that those dummy
arguments would be objects, not entities that might be objects or
procedures.  Fix.

Differential Revision: https://reviews.llvm.org/D103098
The file was modifiedflang/lib/Semantics/resolve-names.cpp
Commit fa14fd30ce6775807463c71cbbaf58d4b30c5e9a by aktoon
[CSSPGO][llvm-profgen] Change default cold threshold for context merging

llvm-profgen uses profile summary based cold threshold to merge and trim cold context profile. This is to strike a good balance between profile size and performance.

We've been using 99.9% as the cutoff to save profile size without affecting performance. This change switch to use 99.9% instead of 99.9999% as default cold threshold cutoff for llvm-profgen.

Redundant switch csprof-cold-thres is also removed and tests cleaned up.

Differential Revision: https://reviews.llvm.org/D103071
The file was modifiedllvm/test/tools/llvm-profgen/inline-cs-noprobe.test
The file was modifiedllvm/test/tools/llvm-profgen/recursion-compression-noprobe.test
The file was modifiedllvm/test/tools/llvm-profgen/cs-extbinary.test
The file was modifiedllvm/test/tools/llvm-profgen/noinline-cs-noprobe.test
The file was modifiedllvm/test/tools/llvm-profgen/inline-cs-pseudoprobe.test
The file was modifiedllvm/test/tools/llvm-profgen/recursion-compression-pseudoprobe.test
The file was modifiedllvm/test/tools/llvm-profgen/merge-cold-profile.test
The file was modifiedllvm/tools/llvm-profgen/ProfileGenerator.cpp
The file was modifiedllvm/test/tools/llvm-profgen/fname-canonicalization.test
The file was modifiedllvm/test/tools/llvm-profgen/inline-cs-dangling-pseudoprobe.test
The file was modifiedllvm/test/tools/llvm-profgen/noinline-cs-pseudoprobe.test
Commit 6779fcb26f961fe5fe7c48461dc8df940488d5d2 by gysit
[mlir][linalg] Update Linalg.md (NFC).

Update the paragraph on generic / indexed_generic to reflect the unification of these operations.

Differential Revision: https://reviews.llvm.org/D102775
The file was modifiedmlir/docs/Dialects/Linalg.md
Commit e7c839b1925f27cacc89ab9b22abfc7da8fbfb15 by kparzysz
[Hexagon] Improve argument packing in vector shuffle selection
The file was addedllvm/test/CodeGen/Hexagon/autohvx/shuffle-half-128b.ll
The file was addedllvm/test/CodeGen/Hexagon/autohvx/shuffle-half-64b.ll
The file was modifiedllvm/test/CodeGen/Hexagon/autohvx/align2-64b.ll
The file was modifiedllvm/lib/Target/Hexagon/HexagonISelDAGToDAGHVX.cpp
The file was modifiedllvm/test/CodeGen/Hexagon/autohvx/align2-128b.ll
Commit 6a84d374d7dfa44094baed36fec2d5d92b2a6afc by Vitaly Buka
[scudo] Consistent setting of SCUDO_DEBUG

Make sure that if SCUDO_DEBUG=1 in tests
then we had the same in the scudo
library itself.

Reviewed By: cryptoad, hctim

Differential Revision: https://reviews.llvm.org/D103061
The file was modifiedcompiler-rt/lib/scudo/standalone/CMakeLists.txt
The file was modifiedcompiler-rt/lib/scudo/standalone/tests/CMakeLists.txt
Commit 8e30b55c82cc245f8b59ef3b29d95c9797584b63 by Vitaly Buka
[scudo] Fix CHECK implementation

Cast of signed types to u64 breaks comparison.
Also remove double () around operands.

Reviewed By: cryptoad, hctim

Differential Revision: https://reviews.llvm.org/D103060
The file was modifiedcompiler-rt/lib/scudo/standalone/report.cpp
The file was modifiedcompiler-rt/lib/scudo/standalone/tests/report_test.cpp
The file was modifiedcompiler-rt/lib/scudo/standalone/internal_defs.h
Commit 149e018d12642cf8cda9b26f2ffc66a63cc3cc25 by lebedev.ri
[LoopIdiom] 'arithmetic right-shift until zero': don't turn potentially infinite loops into finite ones

Nowadays LLVM does not assume that all loops are finite,
so if we want to produce a finite loop from a potentially-infinite one,
we must ensure that the original loop is known to be a finite one.

For this transform, it only matters for arithmetic right-shifts.
For them, either the function or the loop must be known to
be `mustprogress`, or the original value being shifted must be known
to be non-negative (because iff the sign bit was set,
it will never become zero, but will become `-1` in the "end").

It would be really good for alive2 to actually complain about this,
but it currently does not: https://github.com/AliveToolkit/alive2/issues/726
The file was modifiedllvm/test/Transforms/LoopIdiom/X86/arithmetic-right-shift-until-zero.ll
The file was modifiedllvm/lib/Transforms/Scalar/LoopIdiomRecognize.cpp
Commit 2ea6e13bf8189efb09cec89184b21f1db3de0d1c by pifon
[mlir] Add an optional distributionTypes attribute to TiledLoopOp.

Differential Revision: https://reviews.llvm.org/D103104
The file was modifiedmlir/include/mlir/Dialect/Linalg/IR/LinalgOps.td
The file was modifiedmlir/lib/Dialect/Linalg/IR/LinalgOps.cpp
The file was modifiedmlir/include/mlir/Dialect/Utils/StructuredOpsUtils.h
The file was modifiedmlir/test/Dialect/Linalg/roundtrip.mlir
Commit dfd1bbd00ac09b84c76cc5980cee1deb68475a04 by anemet
[Matrix] Factor and distribute transposes across multiplies

Now that we can fold some transposes into multiplies (CM: A * B^t and RM:
A^t * B), we want to move them around to create the optimal expressions:

* fold away double transposes while still using them to assert the shape
* sink transposes hoping they cancel out
* lift transposes when both operands are transposed

This also modifies the matrix remarks to include the number of exposed
transposes (i.e. transposes that we couldn't fold into a multiply).

The adjustment to the test remarks-inlining is a bit subtle: I am changing the
double transpose to a single transpose so that we don't remove it completely.
More importantly this changes some of the total instruction count, most
notable stores because we can no longer use a vector store.

Differential Revision: https://reviews.llvm.org/D102733
The file was modifiedllvm/test/Transforms/LowerMatrixIntrinsics/remarks-shared-subtrees.ll
The file was modifiedllvm/lib/Transforms/Scalar/LowerMatrixIntrinsics.cpp
The file was modifiedllvm/test/Transforms/LowerMatrixIntrinsics/remarks-inlining.ll
The file was addedllvm/test/Transforms/LowerMatrixIntrinsics/transpose-opts.ll
Commit 31d1ae79752da75503a4f1deb3ef2fd0b7868682 by markus.boeck02
[mlir][doc] Fix links and references in documentation of Tutorials

This patch is the third in a series of patches fixing markdown links and references inside the mlir documentation.

This patch addresses all broken references to other markdown files and sections inside the Tutorials folder.

Differential Revision: https://reviews.llvm.org/D103017
The file was modifiedmlir/docs/Tutorials/Toy/Ch-2.md
The file was modifiedmlir/docs/Tutorials/Toy/Ch-4.md
The file was modifiedmlir/docs/Tutorials/QuickstartRewrites.md
The file was modifiedmlir/docs/Tutorials/DefiningAttributesAndTypes.md
The file was modifiedmlir/docs/Tutorials/Toy/Ch-5.md
The file was modifiedmlir/docs/Tutorials/UnderstandingTheIRStructure.md
The file was modifiedmlir/docs/Tutorials/Toy/Ch-3.md
The file was modifiedmlir/docs/Tutorials/Toy/Ch-6.md
The file was modifiedmlir/docs/Tutorials/Toy/Ch-7.md
The file was modifiedmlir/docs/Tutorials/CreatingADialect.md
The file was modifiedmlir/docs/Tutorials/Toy/_index.md
Commit ca7eaa0a54938bfe9aeed7ebc64202f0b6f2ce0d by spatel
[InstSimplify] allow undef element match in vector select condition value

The semantics of select with undefined/poison condition
are not explicitly stated in the LangRef, but this matches
comments in the code and Alive2 appears to concur:
https://alive2.llvm.org/ce/z/KXytmd

We can find this pattern after demanded elements transforms.

As noted in D101191, fuzzers are finding infinite loops because
we may not account for this pattern in other passes.
The file was modifiedllvm/lib/Analysis/InstructionSimplify.cpp
The file was modifiedllvm/test/Transforms/InstCombine/select.ll
The file was modifiedllvm/test/Transforms/InstSimplify/select.ll
The file was modifiedllvm/test/Transforms/InstSimplify/select-inseltpoison.ll
Commit 8de4db697f2841748a5489d18d9fbcd130ae09bb by Stanislav.Mekhanoshin
[AMDGPU] Lower kernel LDS into a sorted structure

Differential Revision: https://reviews.llvm.org/D102954
The file was modifiedllvm/test/CodeGen/AMDGPU/llvm.amdgcn.atomic.dec.ll
The file was addedllvm/test/CodeGen/AMDGPU/lower-kernel-and-module-lds.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/lds-global-value.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/lds-relocs.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/lower-module-lds-inactive.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/ds_write2.ll
The file was modifiedllvm/lib/Target/AMDGPU/AMDGPULowerModuleLDSPass.cpp
The file was modifiedllvm/test/CodeGen/AMDGPU/lower-module-lds-constantexpr.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/promote-alloca-padding-size-estimate.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/32-bit-local-address-space.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/local-memory.amdgcn.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/atomic_optimizations_local_pointer.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/lower-module-lds-offsets.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/lds-relocs.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/ds_read2.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/loop_break.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/local-memory.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/lds-alignment.ll
The file was modifiedllvm/lib/Target/AMDGPU/Utils/AMDGPULDSUtils.h
The file was modifiedllvm/test/CodeGen/AMDGPU/promote-alloca-globals.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/llvm.amdgcn.atomic.inc.ll
The file was modifiedllvm/test/CodeGen/MIR/AMDGPU/machine-function-info.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/shl_add_ptr.ll
The file was modifiedllvm/lib/Target/AMDGPU/Utils/AMDGPULDSUtils.cpp
The file was addedllvm/test/CodeGen/AMDGPU/lower-kernel-lds-constexpr.ll
The file was addedllvm/test/CodeGen/AMDGPU/lower-kernel-lds.ll
Commit 1bf3fd9bb55a8e9c8a2f6e446e956951d1715cf7 by riddleriver
[mlir] Use unique_function in AbstractOperation fields

Currently, AbstractOperation fields are function pointers.
Modifying them to unique_function allow them to contain
runtime information.

For instance, this allows operations to be defined at runtime.

Differential Revision: https://reviews.llvm.org/D103031
The file was modifiedmlir/include/mlir/IR/OperationSupport.h
The file was modifiedmlir/lib/Parser/Parser.cpp
The file was modifiedmlir/lib/IR/MLIRContext.cpp
The file was modifiedmlir/include/mlir/IR/OpDefinition.h
Commit 4df3b60199ef80dfbd84c8cee8c8afd511443330 by michael.hliao
Add pre-commit tests for [D102215](https://reviews.llvm.org/D102215).
The file was addedllvm/test/CodeGen/AArch64/memcpy-scoped-aa.ll
The file was addedllvm/test/CodeGen/X86/memcpy-scoped-aa.ll
The file was addedllvm/test/CodeGen/AMDGPU/memcpy-scoped-aa.ll
Commit c9dd29925f0c27cb59700b9933c41360d21350d3 by michael.hliao
[SelectionDAG] Propagate scoped AA metadata when lowering mem intrinsics.

- When memory intrinsics, such as memcpy, the attached scoped AA
  metadata is not passed down to the backend. As a result, the backend
  cannot schedule relevant memory operations around them following that
  hint. In this patch, SelectionDAG is enhanced to propagate that
  metadata (scoped AA only) when they are lowered into loads and stores.

Differential Revision: https://reviews.llvm.org/D102215
The file was modifiedllvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
The file was modifiedllvm/test/CodeGen/AMDGPU/memcpy-scoped-aa.ll
The file was modifiedllvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
The file was modifiedllvm/test/CodeGen/AArch64/memcpy-scoped-aa.ll
The file was modifiedllvm/include/llvm/CodeGen/SelectionDAG.h
The file was modifiedllvm/test/CodeGen/X86/memcpy-scoped-aa.ll
Commit 9c91614959f31d743470c1cb2f4828abd8fcb517 by nikita.ppv
[CVP] Guard against poison in common phi value transform (PR50399)

The common phi value transform replaces constants with values that
have the same value as the constant on a given edge. However, LVI
generally only provides information that is correct up to poison,
so this can end up replacing a well-defined value with poison.
D69442 addressed an instance of this problem by clearing poison
flags on the generating instruction, which was sufficient at the
time. rGa917fb89dc28 made LVI's edge value analysis slightly more
powerful, and clearing poison flags is no longer sufficient.

This patch changes the transform to instead explicitly guard against
a poison value instead. This should be satisfied for most cases due
to a prior branch on poison.

Fixes https://bugs.llvm.org/show_bug.cgi?id=50399.

Differential Revision: https://reviews.llvm.org/D102966
The file was modifiedllvm/test/Transforms/CorrelatedValuePropagation/phi-common-val.ll
The file was modifiedllvm/lib/Transforms/Scalar/CorrelatedValuePropagation.cpp
Commit d1e5f046cc9ca52301b3f5ed457272f84aa0da14 by Vitaly Buka
Revert "[NFC][scudo] Let disableMemoryTagChecksTestOnly to fail"

This reverts commit 2c212db4ea42fbbc0e83647da4f62261f775388b.

It's not needed.
The file was modifiedcompiler-rt/lib/scudo/standalone/tests/combined_test.cpp
The file was modifiedcompiler-rt/lib/scudo/standalone/memtag.h
Commit 8535834ef7891a5221e0bd1350a4f0636b6f3efb by jezng
[lld-macho][nfc] Misc code cleanup

* Move `static_asserts` into cpp instead of header file. I noticed they
  had been separated from the main class definition in the header, so I
  set about to clean that up, then figured it made more sense as part of
  the cpp file so as not to incur unnecessary compile-time overhead.

* Remove unnecessary `virtual`s

* Remove unnecessary comment / reword another comment
The file was modifiedlld/MachO/InputSection.h
The file was modifiedlld/MachO/SyntheticSections.h
The file was modifiedlld/MachO/SyntheticSections.cpp
The file was modifiedlld/MachO/InputFiles.cpp
Commit 9cc0d893f7fc4d0ed5dfb053bc38cab832f2f88f by jezng
[lld-macho][nfc] clang-format everything
The file was modifiedlld/MachO/SyntheticSections.h
The file was modifiedlld/MachO/UnwindInfoSection.cpp
Commit 33706191d88d34382e07c48ff09fe639fae5881d by jezng
[lld-macho][nfc] Rename MergedOutputSection to ConcatOutputSection

The ELF format has the concept of merge sections (marked by SHF_MERGE),
which contain data that can be safely deduplicated. The Mach-O
equivalents are called literal sections (marked by S_CSTRING_LITERALS or
S_{4,8,16}BYTE_LITERALS). While the Mach-O format doesn't use the word
'merge', to avoid confusion, I've renamed our MergedOutputSection to
ConcatOutputSection. I believe it's a more descriptive name too.

This renaming sets the stage for {D102964}.

Reviewed By: #lld-macho, alexshap

Differential Revision: https://reviews.llvm.org/D102971
The file was modifiedlld/MachO/OutputSegment.cpp
The file was modifiedlld/MachO/UnwindInfoSection.h
The file was addedlld/MachO/ConcatOutputSection.cpp
The file was removedlld/MachO/MergedOutputSection.h
The file was modifiedlld/MachO/SyntheticSections.h
The file was removedlld/MachO/MergedOutputSection.cpp
The file was modifiedlld/MachO/UnwindInfoSection.cpp
The file was modifiedlld/MachO/CMakeLists.txt
The file was modifiedlld/MachO/OutputSection.h
The file was modifiedlld/MachO/SyntheticSections.cpp
The file was modifiedlld/MachO/Writer.cpp
The file was modifiedlld/MachO/Symbols.cpp
The file was addedlld/MachO/ConcatOutputSection.h
Commit fcab06bd85d142eb715b5b96997a24247002e753 by jezng
[lld-macho][nfc] Sort OutputSections based on explicit order of command-line inputs

This diff paves the way for {D102964} which adds a new kind of
InputSection.

We previously maintained section ordering implicitly: we created
InputSections as we parsed each file in command-line order, and passed
on this ordering when we created OutputSections and OutputSegments by
iterating over these InputSections. The implicitness of the ordering
made it difficult to refactor the code to e.g. handle a new type of
InputSection. As such, I've codified the ordering explicitly via
`inputOrder` fields. This also allows us to use `sort` instead of
`stable_sort`.

Benchmarking chromium_framework on my 3.2 GHz 16-Core Intel Xeon W:

      N           Min           Max        Median           Avg        Stddev
  x  20          4.23          4.35          4.27         4.274   0.030157481
  +  20          4.24          4.38          4.27        4.2815   0.033759989
  No difference proven at 95.0% confidence

Reviewed By: #lld-macho, alexshap

Differential Revision: https://reviews.llvm.org/D102972
The file was modifiedlld/MachO/OutputSection.h
The file was modifiedlld/MachO/OutputSegment.cpp
The file was modifiedlld/test/MachO/weak-binding.s
The file was modifiedlld/MachO/OutputSegment.h
The file was addedlld/test/MachO/section-order.s
The file was modifiedlld/test/MachO/load-command-sequence.s
The file was modifiedlld/MachO/Writer.cpp
Commit 7599e98ab7904dce34ea208009f00e87d9d965fb by jezng
[lld-macho][nfc] Remove unnecessary parameterization of section sort

As @alexshap pointed out [here](https://reviews.llvm.org/D102972#inline-975208),
it's a bit confusing to have the option to sort OutputSections with any
comparator when in practice we only use one.

Reviewed By: #lld-macho, alexshap, thakis

Differential Revision: https://reviews.llvm.org/D102974
The file was modifiedlld/MachO/OutputSegment.h
The file was modifiedlld/MachO/OutputSegment.cpp
The file was modifiedlld/MachO/Writer.cpp
Commit 9ba21911db304f0536c38a7180aad89c82ee6ad1 by llvmgnsyncbot
[gn build] Port 33706191d88d
The file was modifiedllvm/utils/gn/secondary/lld/MachO/BUILD.gn
Commit 6300c37a461bf245c58bf2a6a24b618282c0a92b by nikita.ppv
[SCEV] Cache operands used in BEInfo (NFC)

When memoized values for a SCEV expressions are dropped, we also
drop all BECounts that make use of the SCEV expression. This is done
by iterating over all the ExitNotTaken counts and (recursively)
checking whether they use the SCEV expression. If there are many
exits, this will take a lot of time.

This patch improves the situation by pre-computing a set of all
used operands, so that we can determine whether a certain BEInfo
needs to be invalidated using a simple set lookup. Will still need
to loop over all BEInfos though.

This makes for a mild improvement on non-degenerate cases:
https://llvm-compile-time-tracker.com/compare.php?from=b661a55a253f4a1cf5a0fbcb86e5ba7b9fb1387b&to=be1393f450e594c53f0ad7e62339a6bc831b16f6&stat=instructions

For the degenerate case from https://bugs.llvm.org/show_bug.cgi?id=50384,
for n=128 I'm seeing run time drop from 1.6s to 1.1s.

Differential Revision: https://reviews.llvm.org/D102796
The file was modifiedllvm/include/llvm/Analysis/ScalarEvolution.h
The file was modifiedllvm/lib/Analysis/ScalarEvolution.cpp
Commit 5bc644aeca8fc6a734308d81781935de26ea4cde by wanyu9511
Revert "[AIX] Avoid structor alias; die before bad alias codegen"

Avoiding structor alias is no longer needed because AIX now has an alias implementation here: https://reviews.llvm.org/D83252.

This reverts commit b116ded57da3530e661f871f4191c59cd9e091cd.

Reviewed By: jasonliu

Differential Revision: https://reviews.llvm.org/D102724
The file was modifiedclang/test/Driver/aix-constructor-alias.c
The file was modifiedclang/lib/Driver/ToolChains/Clang.cpp
Commit d2d4f16806650bde47d99803782c023bea95c9d0 by benny.kra
[Matrix] Use LLVM_DEBUG for a debug flag

dump() doesn't exist in release builds.

ld.lld: error: undefined symbol: llvm::Value::dump() const
>>> referenced by LowerMatrixIntrinsics.cpp
>>>               LowerMatrixIntrinsics.o:((anonymous namespace)::LowerMatrixIntrinsics::Visit())
The file was modifiedllvm/lib/Transforms/Scalar/LowerMatrixIntrinsics.cpp
Commit dc2aa476760151d29142aa940029aba21a2f286d by riddleriver
[mlir] Add a copy constructor to FailureOr

The copy constructor was missing from FailureOr.

Note that I do not have commit access.

Differential Revision: https://reviews.llvm.org/D98955
The file was modifiedmlir/include/mlir/Support/LogicalResult.h
Commit 2367a7bdab36cf9c51b4d2b1d726f46ed5b1a2c6 by Lang Hames
[JITLink][MachO][arm64] Use a more descriptive test name.
The file was modifiedllvm/test/ExecutionEngine/JITLink/AArch64/MachO_arm64_relocations.s
Commit 249cd9dd6002836b6d4b89a940149d518e8aa48b by Lang Hames
[JITLink][MachO][arm64] Build GOT entries for defined symbols too.

During the generic x86-64 support refactor in ecf6466f01c52 the implementation
of MachO_arm64_GOTAndStubsBuilder::isGOTEdgeToFix was altered to only return
true for external symbols. This behavior is incorrect: GOT entries may be
required for defined symbols (e.g. in the large code model).

This patch fixes the bug and adds a test case for it (renaming an old test
case to avoid any ambiguity).
The file was modifiedllvm/lib/ExecutionEngine/JITLink/MachO_arm64.cpp
The file was modifiedllvm/test/ExecutionEngine/JITLink/AArch64/MachO_arm64_relocations.s
Commit f44f2e0afca994138fd740f8fd43b6d6b3917114 by Vitaly Buka
[NFC] Fix 'unused' warning
The file was modifiedllvm/lib/Analysis/ScalarEvolution.cpp
Commit 3975e3277f2b64307660a6ff3e94f1b3ccdbb38a by Stanislav.Mekhanoshin
[AMDGPU] Fix unused variable warning. NFC.
The file was modifiedllvm/lib/Target/AMDGPU/Utils/AMDGPULDSUtils.cpp
Commit 6c35991ca02413d94cc2c8f4a622851f261019f8 by bruno.cardoso
[TSAN][CMake] Add support to run lit on individual tests

Handy when testing specific files, already supported in other components.

Example:
cd build; ./bin/llvm-lit ../compiler-rt/test/tsan/ignore_free.cpp

Differential Revision: https://reviews.llvm.org/D103054
The file was modifiedcompiler-rt/test/tsan/CMakeLists.txt
Commit dce91f247d7513db25a87e3d32c857e6e3509b61 by aeubanks
[docs] Explain address spaces a bit more in opaque pointers doc

Reviewed By: theraven

Differential Revision: https://reviews.llvm.org/D102523
The file was modifiedllvm/docs/OpaquePointers.rst
Commit 3a678fe3e29fe48d9b4efc936edd2ac43c720bae by i
[sanitizer][test] s/A<10>/A<7>/ to fix "WARNING: Symbolizer buffer too small" which is somehow a hard error on s390x

https://reviews.llvm.org/D102046#2766553
The file was modifiedcompiler-rt/test/sanitizer_common/TestCases/Linux/symbolize_stack_fp.cpp
Commit 6a2869cf1e5b09fa18df09a622b06ce48b34ed81 by kparzysz
[Hexagon] Remove unused function from HexagonISelDAGToDAGHVX.cpp

It will be reintroduced shortly with an actual use.  This change is
simply to eliminate a compilation warning.
The file was modifiedllvm/lib/Target/Hexagon/HexagonISelDAGToDAGHVX.cpp
Commit a2a65a5bae3c503d40c219ef9ba460b1fb34d1bf by martin
[docs] [CMake] Change recommendations for how to use LLVM_DEFINITIONS

LLVM_DEFINITIONS is a string variable containing a list of arguments
to pass to the compiler. When CMake's add_definitions is passed a
string variable, this is interpreted as one argument. To make it
behave properly, the string variable needs to be split into a list.

Despite the fact that add_definitions isn't supposed to be used like
the LLVM docs recommended, it worked fine in practice in many cases.
If the first argument in LLVM_DEFINITIONS is of the form -DFOO=42
instead of plain -DFOO, the rest of the string is treated as value
to this define. I.e. if LLVM_DEFINITIONS consists of `-DFOO=42 -DBAR`,
CMake ended up passing `-DFOO="42 -DBAR"` to the compiler.

See https://gitlab.kitware.com/cmake/cmakissues/22162
for discussion on the matter.

Changing LLVM_DEFINITIONS to be a list variable would possibly be
more disruptive; instead keep the variable defined as before but
change the recommendation for how to use it. Then projects using it
can gradually be updated to follow the new recommendation.

Differential Revision: https://reviews.llvm.org/D103044
The file was modifiedllvm/docs/CMake.rst
Commit 3a6be27978aa3e83e9dc2ff2402b2569ce0686fd by martin
[libcxx] Make the visibility attributes consistent for __narrow_to_utf8/__widen_from_utf8

Use the same visiblity attributes as for all other template
specializations in the same file; declare the specialization itself
using _LIBCPP_TYPE_VIS, and don't use _LIBCPP_EXPORTED_FROM_ABI on
the destructor. Methods that are excluded from the ABI are marked
with _LIBCPP_INLINE_VISIBILITY.

This makes the vtable exported from DLL builds of libc++. Practically,
it doesn't make any difference for the CI configuration, but it
can make a difference in mingw setups.

Differential Revision: https://reviews.llvm.org/D102717
The file was modifiedlibcxx/include/__locale
Commit ec402f1d5da02dfbdc87d031ff99d7dbcada336f by martin
[libcxx] [test] Explain an XFAIL LIBCXX-WINDOWS-FIXME and convert into UNSUPPORTED

This particular test relies on internal details from the libc++
filesystem implementation header, and those details are structured
differently in the implementation for Windows.

Differential Revision: https://reviews.llvm.org/D102357
The file was modifiedlibcxx/test/libcxx/input.output/filesystems/class.directory_entry/directory_entry.mods/last_write_time.pass.cpp
Commit a051bbb53f6de8c2db8adf934ef7a9f5951ed0b8 by smeenai
[libcxxabi] Use ASan interface header for declaration. NFC

This was changed from using the header to using a forward declaration in
c4600ccf891c, since older versions of the header didn't declare the
function. At this point, it's been declared for ~3.5 years, and it
should be pretty safe to assume that we can rely on the ASan interface
header to provide a declaration instead of needing to write our own.

Reviewed By: #libc_abi, ldionne

Differential Revision: https://reviews.llvm.org/D103003
The file was modifiedlibcxxabi/src/cxa_exception.cpp
Commit 2f23f9e641e3830948cd2357a8fa52798df8ffcb by clattner
[Canonicalize] Fully parameterize the pass based on config options. NFC.

This allows C++ clients of the Canonicalize pass to specify their own
Config option struct to control how Canonicalize works, increasing reusability.

This also allows controlling these settings for the default Canonicalize pass
using command line options.  This is useful for testing and for playing with
things on the command line.

Differential Revision: https://reviews.llvm.org/D103069
The file was modifiedmlir/include/mlir/Transforms/Passes.td
The file was modifiedmlir/include/mlir/Transforms/GreedyPatternRewriteDriver.h
The file was modifiedmlir/include/mlir/Transforms/Passes.h
The file was modifiedmlir/lib/Transforms/Canonicalizer.cpp
Commit bc56620b8b765b5720dbc1849511fb783e05b8cc by psteinfeld
[flang] Implement checks for defined input/output procedures

Defined input/output procedures are specified in 12.6.4.8.  There are different
versions for read versus write and formatted versus unformatted, but they all
share the same basic set of dummy arguments.

I added several checking functions to check-declarations.cpp along with a test.

In the process of implementing this, I noticed and fixed a typo in
.../lib/Evaluate/characteristics.cpp.

Differential Revision: https://reviews.llvm.org/D103045
The file was modifiedflang/lib/Evaluate/characteristics.cpp
The file was addedflang/test/Semantics/io11.f90
The file was modifiedflang/lib/Semantics/check-declarations.cpp
Commit a004da0d77c4e0a8a17b4f84818d809b54b2079e by clattner
[Canonicalize] Switch the default setting to "top down".

This provides a sizable compile time improvement by seeding
the worklist in an order that leads to less iterations of the
worklist.

This patch only changes the behavior of the Canonicalize pass
itself, it does not affect other passes that use the
GreedyPatternRewrite driver

Differential Revision: https://reviews.llvm.org/D103053
The file was modifiedmlir/test/Dialect/SPIRV/Transforms/canonicalize.mlir
The file was modifiedmlir/test/Transforms/canonicalize.mlir
The file was modifiedmlir/test/Dialect/Linalg/bufferize.mlir
The file was modifiedmlir/test/Dialect/Linalg/canonicalize.mlir
The file was modifiedmlir/test/Dialect/Affine/canonicalize.mlir
The file was modifiedmlir/test/Dialect/Linalg/fusion-tensor-pattern.mlir
The file was modifiedmlir/test/Transforms/scf-loop-unroll.mlir
The file was modifiedmlir/test/Dialect/SCF/canonicalize.mlir
The file was modifiedmlir/include/mlir/Transforms/Passes.td
The file was modifiedmlir/test/Dialect/Vector/canonicalize.mlir
The file was modifiedmlir/test/Conversion/MathToLLVM/convert-to-libm.mlir
The file was modifiedmlir/test/Transforms/test-canonicalize.mlir
Commit 68e45962531a25a0fab63eab163a6c9f84c81f1e by martin
[libcxx] Fix the function name in exceptions from create_directories

If the nested create_directory call fails, we'd still want to
re-report the errors with the create_directories function name,
which is what the caller called.

This fixes one aspect from MS STL's tests for std::filesystem.

Differential Revision: https://reviews.llvm.org/D102365
The file was modifiedlibcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.create_directories/create_directories.pass.cpp
The file was modifiedlibcxx/src/filesystem/operations.cpp
Commit d42d9e10b606287f827dcc2d135ff8c932aa3d72 by arthur.j.odwyer
[libc++] [P0619] Hide not1 and not2 under _LIBCPP_ENABLE_CXX20_REMOVED_NEGATORS.

This also provides some of the scaffolding needed by D102992 and D101729, and mops up after D101730 etc.

Differential Revision: https://reviews.llvm.org/D103055
The file was modifiedlibcxx/include/__memory/raw_storage_iterator.h
The file was modifiedlibcxx/test/std/utilities/function.objects/negators/unary_negate.depr_in_cxx17.verify.cpp
The file was modifiedlibcxx/docs/UsingLibcxx.rst
The file was modifiedlibcxx/test/std/utilities/function.objects/negators/not1.pass.cpp
The file was modifiedlibcxx/test/std/utilities/function.objects/negators/binary_negate.depr_in_cxx17.verify.cpp
The file was modifiedlibcxx/docs/Cxx2aStatus.rst
The file was modifiedlibcxx/test/std/utilities/function.objects/negators/binary_negate.pass.cpp
The file was modifiedlibcxx/test/std/utilities/function.objects/negators/unary_negate.pass.cpp
The file was modifiedlibcxx/test/std/utilities/memory/storage.iterator/deprecated.verify.cpp
The file was modifiedlibcxx/test/std/utilities/function.objects/negators/not2.depr_in_cxx17.verify.cpp
The file was modifiedlibcxx/test/std/utilities/function.objects/negators/not2.pass.cpp
The file was modifiedlibcxx/include/functional
The file was modifiedlibcxx/test/std/utilities/memory/storage.iterator/raw_storage_iterator.base.pass.cpp
The file was modifiedlibcxx/include/__config
The file was modifiedlibcxx/test/std/utilities/function.objects/negators/not1.depr_in_cxx17.verify.cpp
The file was modifiedlibcxx/test/std/utilities/memory/storage.iterator/raw_storage_iterator.pass.cpp
Commit 832c99f727723bab2baf5a477bda3d91fed56f5d by mascasa
Revert "[LoopDeletion] Break backedge if we can prove that the loop is exited on 1st iteration"

This reverts commit 2531fd70d19aa5d61feb533bbdeee7717a4129eb due to
performance regression on the PPC buildbot.
The file was modifiedllvm/test/Transforms/LoopDeletion/eval_first_iteration.ll
The file was modifiedllvm/lib/Transforms/Scalar/LoopDeletion.cpp
The file was modifiedllvm/test/Transforms/LoopDeletion/zero-btc.ll
The file was modifiedllvm/test/Transforms/LoopDeletion/noop-loops-with-subloops.ll