FailedChanges

Summary

  1. [doc] Apply buildbot worker terminology change: slave->worker (details)
  2. [compiler-rt][builtins] Add tests for atomic builtins support functions (details)
  3. [InstCombine] SimplifyDemandedUseBits - pass APInt by const reference. NFCI. (details)
  4. [NFC][SCEV] Improve/rework test coverage for ptrtoint handling (details)
  5. [format] foo.<name>.h should be the main-header for foo.<name>.cc (details)
  6. Introduce CfgTraits abstraction (details)
  7. [flang] Document and use intrinsic subroutine argument intents (details)
  8. Revert "[yaml2obj][ELF] - Simplify the code that performs sections validation." (details)
  9. [libc++] Make __shared_weak_count vtable consistent across all build configurations (details)
  10. Revert "Revert "[gn build] (manually) port d09b08919ca"" (details)
  11. [InstCombine] Add or((icmp ult/ule (A + C1), C3), (icmp ult/ule (A + C2), C3)) uniform vector support (details)
  12. [DSE] Add test to make sure memccpy does not kill stores. (details)
  13. [gn build] Port a2214757e2c (details)
  14. [gn build] Port c0cdd22c72f (details)
  15. [InstSimplify] add vector icmp tests; NFC (details)
  16. [InstSimplify] allow vector splats for icmp-of-neg folds (details)
  17. Reland "[yaml2obj][ELF] - Simplify the code that performs sections validation." (details)
  18. [DSE] Bail out from getLocForWriteEx if call is not argmemonly/inacc_mem. (details)
  19. [amdgpu] Enhance AMDGPU AA. (details)
  20. [clang] Fix warnings on the missing of explicitly copy constructor on the base class. NFC. (details)
  21. [InstCombine] Add (icmp ult (X + CA), C1) | (icmp eq X, C2) -> (icmp ule (X + CA), C1) test coverage (details)
  22. [gn build] port a2214757e2ca more (details)
  23. [gn build] belatedly port 3ddac7e56363 (details)
  24. [gn build] assert clang-format does not depend on AST, Frontend, Sema at gn time (details)
  25. Revert "[clang] Fix warnings on the missing of explicitly copy constructor on the base class. NFC." (details)
  26. Add a C++ test case for https://reviews.llvm.org/D86854 (details)
  27. [libc++] Explicitly request new/delete in libc++ for Win to ARM Linux builds (details)
  28. [clang][Basic] Make SourceLocation usable as key in hash maps, NFCI (details)
  29. Try to make GCC5 happy about the CfgTraits thing (details)
  30. Explicitly initialize StreamingDiagnostic in derived class copy ctors (details)
  31. [clang] Use SourceLocation as key in hash maps, NFCI (details)
  32. [InstCombine] foldOrOfICmps - use m_Specific instead of explicit comparisons. NFCI. (details)
  33. [AMDGPU] Remove unused declaration. NFC. (details)
  34. [InstCombine] SimplifyDemandedUseBits - replace dyn_cast<ConstantInt> with m_ConstantInt. NFCI. (details)
  35. [DSE] Do not scan users of memory terminators for further reads. (details)
  36. Release pages to OS when setting 0 label (details)
  37. [ELF] --gdb-index: support --icf={safe,all} (details)
  38. [libcxx] [test] Avoid conflicting definitions of _CRT_SECURE_NO_WARNINGS (details)
  39. [libcxx] [test] Fix path.modifiers/make_preferred for windows (details)
  40. Set Huge Page mode on shadow regions based on no_huge_pages_for_shadow (details)
  41. Wrap CfgTraitsFor in namespace llvm to please GCC 5 (details)
  42. ASAN: Support detect_invalid_pointer_pairs=1 with detect_stack_use_after_return=1 (details)
  43. [NPM] Port -mergereturn to NPM (details)
  44. clang/Frontend: Use MemoryBufferRef in FrontendInputFile (and remove SourceManager::getBuffer) (details)
  45. FileManager: Test FileManager::getFileRef (details)
  46. [AMDGPU] Remove getAllVGPR32() which cannot handle Accum VGPRs properly (details)
  47. [NPM] port -unify-loop-exits to NPM (details)
  48. lldb: Migrate to MemoryBufferRef for createFileID (after 51d1d585e5838ea0f02f1271f7543c4e43639969) (details)
  49. DomTree: Extract (mostly) read-only logic into type-erased base classes (details)
  50. [gn build] Port 848a68a032d (details)
  51. Handle value uses wrapped in metadata for the use-list order (details)
  52. [NFC][Regalloc] Type 2 statics in terms of Register (details)
Commit f0f76aea37e2fab3234c62a0927d9259ed962c16 by kkleine
[doc] Apply buildbot worker terminology change: slave->worker

Recently [1], there was an upgrade to the version of buildbot being
deployed. The new setup will still work with old buildslaves but I
thought it might be a good idea to update the documentation to reflect,
that you now can use a newer buildbot version to when setting up your
worker (formely known as slave).

The upgrade from buildbot 0.8.5 to 2.8.5 went a long with a transition
to a new "worker" terminology [2] which is also reflected by this
change.

[1]: http://lists.llvm.org/pipermail/llvm-dev/2020-October/145629.html
[2]: http://docs.buildbot.net/0.9.12/manual/worker-transition.html

Reviewed By: gkistanova

Differential Revision: https://reviews.llvm.org/D89230
The file was modifiedllvm/docs/HowToAddABuilder.rst
Commit fc3f9dfad33dae63f1f2293e3733ac5a2798699c by luismarques
[compiler-rt][builtins] Add tests for atomic builtins support functions

Adds some simple sanity checks that the support functions for the atomic
builtins do the right thing. This doesn't test concurrency and memory model
issues.

Differential Revision: https://reviews.llvm.org/D86278
The file was addedcompiler-rt/test/builtins/Unit/atomic_test.c
Commit e346ea990528d93758ed216c53b2ef86ea82ff72 by llvm-dev
[InstCombine] SimplifyDemandedUseBits - pass APInt by const reference. NFCI.
The file was modifiedllvm/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp
Commit d1946469d637f2e5245a02e908b630c3ca362717 by lebedev.ri
[NFC][SCEV] Improve/rework test coverage for ptrtoint handling
The file was modifiedllvm/test/Analysis/ScalarEvolution/ptrtoint.ll
Commit 84048e234f8f0d81871caab842dbed84b84aa86f by hokein.wu
[format] foo.<name>.h should be the main-header for foo.<name>.cc

This fixes a regression introduced in https://reviews.llvm.org/D88640.

Differential Revision: https://reviews.llvm.org/D89783
The file was modifiedclang/lib/Tooling/Inclusions/HeaderIncludes.cpp
The file was modifiedclang/include/clang/Tooling/Inclusions/HeaderIncludes.h
The file was modifiedclang/unittests/Format/SortIncludesTest.cpp
Commit c0cdd22c72fab47a3c37b5a8401763995cadaa77 by nicolai.haehnle
Introduce CfgTraits abstraction

The CfgTraits abstraction simplfies writing algorithms that are
generic over the type of CFG, and enables writing such algorithms
as regular non-template code that operates on opaque references
to CFG blocks and values.

Implementations of CfgTraits provide operations on the concrete
CFG types, e.g. `IrCfgTraits::BlockRef` is `BasicBlock *`.

CfgInterface is an abstract base class which provides operations
on opaque types CfgBlockRef and CfgValueRef. Those opaque types
encapsulate a `void *`, but the meaning depends on the concrete
CFG type. For example, MachineCfgTraits -- for use with MachineIR
in SSA form -- encodes a Register inside CfgValueRef. Converting
between concrete references and opaque/generic ones is done by
CfgTraits::{fromGeneric,toGeneric}. Convenience methods
CfgTraits::{un}wrap{Iterator,Range} are available as well.

Writing algorithms in terms of CfgInterface adds some overhead
(virtual method calls, plus in same cases it removes the
opportunity to inline iterators), but can be much more convenient
since generic algorithms can be written as non-templates.

This patch adds implementations of CfgTraits for all CFGs on
which dominator trees are calculated, so that the dominator
tree can be ported to this machinery. Only IrCfgTraits (LLVM IR)
and MachineCfgTraits (Machine IR in SSA form) are complete, the
other implementations are limited to the absolute minimum
required to make the upcoming dominator tree changes work.

v5:
- fix MachineCfgTraits::blockdef_iterator and allow it to iterate over
  the instructions in a bundle
- use MachineBasicBlock::printName

v6:
- implement predecessors/successors for all CfgTraits implementations
- fix error in unwrapRange
- rename toGeneric/fromGeneric into wrapRef/unwrapRef to have naming
  that is consistent with {wrap,unwrap}{Iterator,Range}
- use getVRegDef instead of getUniqueVRegDef

v7:
- std::forward fix in wrapping_iterator
- fix typos

v8:
- cleanup operators on CfgOpaqueType
- address other review comments

Change-Id: Ia75f4f268fded33fca11218a7d578c9aec1f3f4d

Differential Revision: https://reviews.llvm.org/D83088
The file was addedllvm/lib/CodeGen/MachineCfgTraits.cpp
The file was modifiedllvm/lib/Support/CMakeLists.txt
The file was modifiedmlir/include/mlir/IR/Dominance.h
The file was addedllvm/include/llvm/Support/CfgTraits.h
The file was modifiedllvm/lib/IR/CMakeLists.txt
The file was addedllvm/lib/Support/CfgTraits.cpp
The file was addedllvm/lib/IR/CFG.cpp
The file was modifiedllvm/lib/CodeGen/CMakeLists.txt
The file was modifiedllvm/include/llvm/IR/CFG.h
The file was modifiedllvm/lib/Transforms/Vectorize/VPlanDominatorTree.h
The file was addedllvm/include/llvm/CodeGen/MachineCfgTraits.h
The file was modifiedclang/include/clang/Analysis/Analyses/Dominators.h
Commit 29d1a494477d78f9c86564b851891702456ddffb by jperier
[flang] Document and use intrinsic subroutine argument intents

Check INTENT(OUT)/INTENT(INOUT) constraints for actual argument
of intrinsic procedure calls.
- Adding a common::Intent field to the IntrinsicDummyArgument
in the intrinsic table.
- Propagating it to the DummyDataObject intent field so that it can
later be used in CheckExplicitDataArg semantic checks.
- Add related tests.
- Fix regression (C846 false error), C846 INTENT(OUT) rule does
  not apply to intrinsic call. Propagate the information that we
  are in an intrinsic call up to CheckExplicitDataArg (that is
  doing this check). Still enforce C846 on intrinsics other than MOVE_ALLOC (for which
  allocatable coarrays are explicitly allowed) since it's not clear it is allowed in all
  intrinsics and allowing this would lead to runtime penalties in the intrinsic runtime.

Differential Revision: https://reviews.llvm.org/D89473
The file was modifiedflang/lib/Evaluate/characteristics.cpp
The file was modifiedflang/include/flang/Evaluate/intrinsics.h
The file was modifiedflang/test/Semantics/call03.f90
The file was modifiedflang/include/flang/Evaluate/characteristics.h
The file was modifiedflang/lib/Semantics/check-call.cpp
The file was modifiedflang/lib/Evaluate/intrinsics.cpp
The file was modifiedflang/lib/Semantics/expression.cpp
The file was modifiedflang/lib/Semantics/check-call.h
Commit 1b589f4d4db27e3fcd81fdc5abeb9407753ab790 by grimar
Revert "[yaml2obj][ELF] - Simplify the code that performs sections validation."

This reverts commit b9e2b59680ad1bbfd2b9110b3ebf3d2b22cad51b.
The file was modifiedllvm/include/llvm/ObjectYAML/ELFYAML.h
The file was modifiedllvm/include/llvm/ObjectYAML/MinidumpYAML.h
The file was modifiedllvm/lib/ObjectYAML/ELFYAML.cpp
The file was modifiedllvm/include/llvm/Support/YAMLTraits.h
The file was modifiedllvm/lib/ObjectYAML/MinidumpYAML.cpp
The file was modifiedllvm/unittests/Support/YAMLIOTest.cpp
The file was modifiedllvm/lib/ObjectYAML/DWARFYAML.cpp
The file was modifiedllvm/lib/ObjectYAML/MachOYAML.cpp
The file was modifiedllvm/test/tools/yaml2obj/ELF/gnu-hash-section.yaml
The file was modifiedllvm/include/llvm/ObjectYAML/MachOYAML.h
The file was modifiedlld/lib/ReaderWriter/MachO/MachONormalizedFileYAML.cpp
The file was modifiedllvm/include/llvm/ObjectYAML/DWARFYAML.h
Commit 229db3647491ed2b2706a9b9ce13a97e38be6fa0 by Louis Dionne
[libc++] Make __shared_weak_count vtable consistent across all build configurations

This patch ensures that __shared_weak_count provides a consistent vtable
regardless of if RTTI is enabled or if we are targeting a static or shared
libc++ build.

This patch is technically ABI breaking, but only for a very specific
configuration that no vendor should be shipping.

Note that _LIBCPP_BUILD_STATIC is not normally defined when building
libc++.a, but instead it must be manually provided by the user or the
__config_site.

Differential Revision: https://reviews.llvm.org/D32838
The file was modifiedlibcxx/include/memory
The file was modifiedlibcxxabi/CMakeLists.txt
The file was modifiedlibcxx/src/memory.cpp
Commit db915f296f58cb28493356118e8f033c8daecc89 by thakis
Revert "Revert "[gn build] (manually) port d09b08919ca""

This reverts commit 6ca3dd97352013375f907d92a7e1aed7ab80fbc3.
d09b08919ca relanded in 53065c543fe3f1.
The file was modifiedllvm/utils/gn/secondary/compiler-rt/lib/sanitizer_common/BUILD.gn
Commit e372a5f86f6488bb0c2593a665d51fdd3a97c6e4 by llvm-dev
[InstCombine] Add or((icmp ult/ule (A + C1), C3), (icmp ult/ule (A + C2), C3)) uniform vector support

Reapplied rGa704d8238c86 with a check for integer/integervector types to prevent matching with pointer types
The file was modifiedllvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp
The file was modifiedllvm/test/Transforms/InstCombine/or.ll
Commit f558256939c47b8b5f59c19c71e04324df8ca26a by flo
[DSE] Add test to make sure memccpy does not kill stores.

It is not known how many bytes are written by memccpy, so it cannot kill
any stores.
The file was modifiedllvm/test/Transforms/DeadStoreElimination/MSSA/libcalls.ll
Commit e572c9ce90fd8f49d08e8326b4b5dc989a19004e by llvmgnsyncbot
[gn build] Port a2214757e2c
The file was modifiedllvm/utils/gn/secondary/clang/lib/Tooling/Core/BUILD.gn
The file was modifiedllvm/utils/gn/secondary/clang/lib/Tooling/Refactoring/BUILD.gn
Commit 672652e8331f6103976549f6ea4caf535da62c26 by llvmgnsyncbot
[gn build] Port c0cdd22c72f
The file was modifiedllvm/utils/gn/secondary/llvm/lib/Support/BUILD.gn
The file was modifiedllvm/utils/gn/secondary/llvm/lib/IR/BUILD.gn
The file was modifiedllvm/utils/gn/secondary/llvm/lib/CodeGen/BUILD.gn
Commit b11588b18e8e0844e035d1bf5656b7f7b7bfb959 by spatel
[InstSimplify] add vector icmp tests; NFC
The file was modifiedllvm/test/Transforms/InstSimplify/compare.ll
Commit 7c516504a161ad2eff1837fb9b816322455ca330 by spatel
[InstSimplify] allow vector splats for icmp-of-neg folds
The file was modifiedllvm/test/Transforms/InstSimplify/compare.ll
The file was modifiedllvm/lib/Analysis/InstructionSimplify.cpp
Commit 6487ffafd1dd5ab81c440dde46163218a85d90b5 by grimar
Reland "[yaml2obj][ELF] - Simplify the code that performs sections validation."

This reverts commit 1b589f4d4db27e3fcd81fdc5abeb9407753ab790 and relands the D89463
with the fix: update `MappingTraits<FileFilter>::validate()` in ClangTidyOptions.cpp to
match the new signature (change the return type to "std::string" from "StringRef").

Original commit message:

This:

Changes the return type of MappingTraits<T>>::validate to std::string
instead of StringRef. It allows to create more complex error messages.

It introduces std::vector<std::pair<StringRef, bool>> getEntries():
a new virtual method of Section, which is the base class for all sections.
It returns names of special section specific keys (e.g. "Entries") and flags that says if them exist in a YAML.
The code in validate() uses this list of entries descriptions to generalize validation.
This approach was discussed in the D89039 thread.

Differential revision: https://reviews.llvm.org/D89463
The file was modifiedlld/lib/ReaderWriter/MachO/MachONormalizedFileYAML.cpp
The file was modifiedllvm/include/llvm/ObjectYAML/ELFYAML.h
The file was modifiedllvm/include/llvm/ObjectYAML/DWARFYAML.h
The file was modifiedllvm/lib/ObjectYAML/DWARFYAML.cpp
The file was modifiedllvm/include/llvm/ObjectYAML/MinidumpYAML.h
The file was modifiedllvm/lib/ObjectYAML/MachOYAML.cpp
The file was modifiedllvm/include/llvm/ObjectYAML/MachOYAML.h
The file was modifiedclang-tools-extra/clang-tidy/ClangTidyOptions.cpp
The file was modifiedllvm/include/llvm/Support/YAMLTraits.h
The file was modifiedllvm/test/tools/yaml2obj/ELF/gnu-hash-section.yaml
The file was modifiedllvm/unittests/Support/YAMLIOTest.cpp
The file was modifiedllvm/lib/ObjectYAML/ELFYAML.cpp
The file was modifiedllvm/lib/ObjectYAML/MinidumpYAML.cpp
Commit 6439fde6d403d3e01e265fb84b0beffe67f745c5 by flo
[DSE] Bail out from getLocForWriteEx if call is not argmemonly/inacc_mem.

This change should currently not have any impact, but guard against
further inconsistencies between MemoryLocation and function attributes.
The file was modifiedllvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
Commit 2a0e4d1c01c93bc326957c0ebf2a3203dfb145d9 by michael.hliao
[amdgpu] Enhance AMDGPU AA.

- In general, a generic point may alias to pointers in all other address
  spaces. However, for certain cases enforced by the programming model,
  we may found a generic point won't alias to pointers to local objects.
  * When a generic pointer is loaded from the constant address space, it
    could only be a pointer to the GLOBAL or CONSTANT address space.
    Thus, it won't alias to pointers to the PRIVATE or LOCAL address
    space.
  * When a generic pointer is passed as a kernel argument, it also could
    only be a pointer to the GLOBAL or CONSTANT address space. Thus, it
    also won't alias to pointers to the PRIVATE or LOCAL address space.

Differential Revision: https://reviews.llvm.org/D89525
The file was modifiedllvm/test/CodeGen/AMDGPU/amdgpu-alias-analysis.ll
The file was modifiedllvm/lib/Target/AMDGPU/AMDGPUAliasAnalysis.cpp
Commit 1ed506deaddb41870d22f5b48d52ba710e8d6c00 by michael.hliao
[clang] Fix warnings on the missing of explicitly copy constructor on the base class. NFC.
The file was modifiedclang/include/clang/Basic/Diagnostic.h
The file was modifiedclang/include/clang/Basic/PartialDiagnostic.h
Commit bf540a64f3fc81cf0f14b5a15765f1ba9909d93e by llvm-dev
[InstCombine] Add (icmp ult (X + CA), C1) | (icmp eq X, C2) -> (icmp ule (X + CA), C1) test coverage

Add both commuted variants and vector uniform/nonuniform examples
The file was modifiedllvm/test/Transforms/InstCombine/or.ll
Commit abef77c3ddac0d5745b794185d22bc014672ead7 by thakis
[gn build] port a2214757e2ca more
The file was modifiedllvm/utils/gn/secondary/clang/lib/Tooling/Core/BUILD.gn
Commit f67edf56420132285392f7e99afae3cd406e5586 by thakis
[gn build] belatedly port 3ddac7e56363
The file was modifiedllvm/utils/gn/secondary/clang/tools/clang-format/BUILD.gn
Commit 853553f81b0b5839f623fa0677f5fba8dd742bd1 by thakis
[gn build] assert clang-format does not depend on AST, Frontend, Sema at gn time

To catch things like https://reviews.llvm.org/D69854 and
https://reviews.llvm.org/D89708 earlier next time they happen.
The file was modifiedllvm/utils/gn/secondary/clang/tools/clang-format/BUILD.gn
Commit e7a69158635a30cb673e443a3b95ece359c72cc1 by michael.hliao
Revert "[clang] Fix warnings on the missing of explicitly copy constructor on the base class. NFC."

This reverts commit 1ed506deaddb41870d22f5b48d52ba710e8d6c00.
The file was modifiedclang/include/clang/Basic/Diagnostic.h
The file was modifiedclang/include/clang/Basic/PartialDiagnostic.h
Commit b78045c2ce2dba9b43c0e48340c2a69e444386ec by Akira
Add a C++ test case for https://reviews.llvm.org/D86854

The test case was part of https://reviews.llvm.org/D82999, which was
abandoned after https://reviews.llvm.org/D86854 fixed the bug.
The file was modifiedclang/test/CodeGenCXX/exceptions.cpp
Commit eaa928b71a090905cb178c22054cdf6aa8eb80cb by Louis Dionne
[libc++] Explicitly request new/delete in libc++ for Win to ARM Linux builds

Since 9b40ee8eb0c1, new/delete must be requested explicitly during the
CMake configuration if one wants these definitions to appear in libc++.

Differential Revision: https://reviews.llvm.org/D89793
The file was modifiedclang/cmake/caches/CrossWinToARMLinux.cmake
Commit 234c47ae2a8e1877de8c661d5bb862ba952eabf9 by mikhail.maltsev
[clang][Basic] Make SourceLocation usable as key in hash maps, NFCI

This change creates a `DenseMapInfo` trait specialization for the
SourceLocation class. The empty key, the tombstone key, and the hash
function are identical to `DenseMapInfo<unsigned>`, because we already
have hash maps that use raw the representation of `SourceLocation` as
a key.

The update of existing `DenseMap`s containing raw representation of
`SourceLocation`s will be done in a follow-up patch. As an example
the patch makes use of the new trait in one instance:
clang-tidy/google/UpgradeGoogletestCaseCheck.{h,cpp}

Reviewed By: dexonsmith

Differential Revision: https://reviews.llvm.org/D89719
The file was modifiedclang-tools-extra/clang-tidy/google/UpgradeGoogletestCaseCheck.h
The file was modifiedclang/include/clang/Basic/SourceLocation.h
The file was modifiedclang-tools-extra/clang-tidy/google/UpgradeGoogletestCaseCheck.cpp
The file was modifiedclang/lib/Basic/SourceLocation.cpp
Commit 03a5f7ce12e2111c8b7bc5a95cff4c51b516250f by hans
Try to make GCC5 happy about the CfgTraits thing

It was failing with:

In file included from /work/llvm.monorepo/clang/lib/Analysis/Dominators.cpp:9:0:
/work/llvm.monorepo/clang/include/clang/Analysis/Analyses/Dominators.h: At global scope:
/work/llvm.monorepo/clang/include/clang/Analysis/Analyses/Dominators.h:111:26:
error: specialization of ‘template<class CfgRelatedTypeT> struct llvm::CfgTraitsFor’ in different namespace [-fpermissive]
template <> struct llvm::CfgTraitsFor<clang::CFGBlock> {
                          ^
In file included from /work/llvm.monorepo/clang/include/clang/Analysis/Analyses/Dominators.h:21:0,
                 from /work/llvm.monorepo/clang/lib/Analysis/Dominators.cpp:9:
/work/llvm.monorepo/llvm/include/llvm/Support/CfgTraits.h:294:44:
error:   from definition of ‘template<class CfgRelatedTypeT> struct llvm::CfgTraitsFor’ [-fpermissive]
template <typename CfgRelatedTypeT> struct CfgTraitsFor;
                                            ^
The file was modifiedclang/include/clang/Analysis/Analyses/Dominators.h
Commit c76cdeac93380b434349738d96f83d3ffda9869c by hans
Explicitly initialize StreamingDiagnostic in derived class copy ctors

To pacify a GCC warning:

[1/1] Building CXX object tools/clang/lib/Analysis/CMakeFiles/obj.clangAnalysis.dir/Dominators.cpp.o
In file included from /work/llvm.monorepo/clang/include/clang/AST/NestedNameSpecifier.h:18:0,
                 from /work/llvm.monorepo/clang/include/clang/AST/Type.h:21,
                 from /work/llvm.monorepo/clang/include/clang/AST/DeclarationName.h:16,
                 from /work/llvm.monorepo/clang/include/clang/AST/DeclBase.h:18,
                 from /work/llvm.monorepo/clang/include/clang/Analysis/AnalysisDeclContext.h:20,
                 from /work/llvm.monorepo/clang/include/clang/Analysis/Analyses/Dominators.h:16,
                 from /work/llvm.monorepo/clang/lib/Analysis/Dominators.cpp:9:
/work/llvm.monorepo/clang/include/clang/Basic/Diagnostic.h:
In copy constructor ‘clang::DiagnosticBuilder::DiagnosticBuilder(const clang::DiagnosticBuilder&)’:
/work/llvm.monorepo/clang/include/clang/Basic/Diagnostic.h:1287:3:
warning: base class ‘class clang::StreamingDiagnostic’ should be explicitly initialized in the copy constructor [-Wextra]
   DiagnosticBuilder(const DiagnosticBuilder &D) {
   ^
In file included from /work/llvm.monorepo/clang/include/clang/AST/Type.h:29:0,
                 from /work/llvm.monorepo/clang/include/clang/AST/DeclarationName.h:16,
                 from /work/llvm.monorepo/clang/include/clang/AST/DeclBase.h:18,
                 from /work/llvm.monorepo/clang/include/clang/Analysis/AnalysisDeclContext.h:20,
                 from /work/llvm.monorepo/clang/include/clang/Analysis/Analyses/Dominators.h:16,
                 from /work/llvm.monorepo/clang/lib/Analysis/Dominators.cpp:9:
/work/llvm.monorepo/clang/include/clang/Basic/PartialDiagnostic.h:
In copy constructor ‘clang::PartialDiagnostic::PartialDiagnostic(const clang::PartialDiagnostic&)’:
/work/llvm.monorepo/clang/include/clang/Basic/PartialDiagnostic.h:52:3:
warning: base class ‘class clang::StreamingDiagnostic’ should be explicitly initialized in the copy constructor [-Wextra]
   PartialDiagnostic(const PartialDiagnostic &Other) : DiagID(Other.DiagID) {
   ^
The file was modifiedclang/include/clang/Basic/PartialDiagnostic.h
The file was modifiedclang/include/clang/Basic/Diagnostic.h
Commit 781941183700b52d11b27227e3341385447610fa by mikhail.maltsev
[clang] Use SourceLocation as key in hash maps, NFCI

The patch adjusts the existing `llvm::DenseMap<unsigned, T>` and
`llvm::DenseSet<unsigned>` objects that store source locations, so
that they use `SourceLocation` directly instead of `unsigned`.

This patch relies on the `DenseMapInfo` trait added in D89719.

It also replaces the construction of `SourceLocation` objects from
the constants -1 and -2 with calls to the trait's methods `getEmptyKey`
and `getTombstoneKey` where appropriate.

Reviewed By: dexonsmith

Differential Revision: https://reviews.llvm.org/D69840
The file was modifiedclang/lib/ARCMigrate/TransGCAttrs.cpp
The file was modifiedclang-tools-extra/clangd/FindTarget.cpp
The file was modifiedclang-tools-extra/clang-tidy/utils/RenamerClangTidyCheck.h
The file was modifiedclang/lib/ARCMigrate/TransProperties.cpp
The file was modifiedclang/include/clang/Sema/Sema.h
The file was modifiedclang/lib/ARCMigrate/Transforms.h
The file was modifiedclang/lib/Tooling/Syntax/Tokens.cpp
The file was modifiedclang/include/clang/Edit/EditedSource.h
The file was modifiedclang-tools-extra/clang-tidy/cppcoreguidelines/SpecialMemberFunctionsCheck.h
The file was modifiedclang/lib/Tooling/Syntax/BuildTree.cpp
The file was modifiedclang/include/clang/Tooling/Syntax/Tokens.h
The file was modifiedclang/lib/CodeGen/CGOpenMPRuntime.h
The file was modifiedclang-tools-extra/clang-tidy/utils/RenamerClangTidyCheck.cpp
The file was modifiedclang/lib/Edit/EditedSource.cpp
Commit ce13549761b6a22263e051dda09ef5122435008b by llvm-dev
[InstCombine] foldOrOfICmps - use m_Specific instead of explicit comparisons. NFCI.
The file was modifiedllvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp
Commit 4913e3627ca2c6aa61299e4d29752471fdc2ccdc by jay.foad
[AMDGPU] Remove unused declaration. NFC.

The implementation of this method was removed in D89706.
The file was modifiedllvm/lib/Target/AMDGPU/AMDGPUISelLowering.h
Commit ec228fbfc0fc56b50bc2aa62b1bac0c1097deefd by llvm-dev
[InstCombine] SimplifyDemandedUseBits - replace dyn_cast<ConstantInt> with m_ConstantInt. NFCI.
The file was modifiedllvm/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp
Commit 2e580102082293f9f80160bc86413e401c566d8f by flo
[DSE] Do not scan users of memory terminators for further reads.

isMemTerminator checks if the current def is a memory terminator that
terminates the memory pointed to by DefLoc. We do not have to add any of
their users to the worklist, because the follow-on users cannot read the
memory in question.

This leads to more stores eliminated in the presence of lifetime calls.
Previously we added the users of those intrinsics to the worklist,
limiting elimination.

In terms of removed stores, this gives a nice boost on some benchmarks
(MultiSource/SPEC2000/SPEC2006 on X86 with -flto -O3):

Same hash: 205 (filtered out)
Remaining: 32
Metric: dse.NumFastStores

Program                                          base   patch   diff
test-suite...000/197.parser/197.parser.test     4.00    8.00  100.0%
test-suite...rolangs-C++/family/family.test     4.00    7.00  75.0%
test-suite...marks/7zip/7zip-benchmark.test   1722.00 2189.00 27.1%
test-suite...CFP2000/177.mesa/177.mesa.test    30.00   38.00  26.7%
test-suite :: External/Nurbs/nurbs.test        44.00   49.00  11.4%
test-suite...lications/sqlite3/sqlite3.test   115.00  128.00  11.3%
test-suite...006/447.dealII/447.dealII.test   2715.00 3013.00 11.0%
test-suite...ProxyApps-C++/CLAMR/CLAMR.test   237.00  261.00  10.1%
test-suite...tions/lambda-0.1.3/lambda.test    40.00   44.00  10.0%
test-suite...3.xalancbmk/483.xalancbmk.test   1366.00 1475.00  8.0%
test-suite...abench/jpeg/jpeg-6a/cjpeg.test    13.00   14.00   7.7%
test-suite...oxyApps-C++/miniFE/miniFE.test    43.00   46.00   7.0%
test-suite...lications/ClamAV/clamscan.test   230.00  246.00   7.0%
test-suite...006/450.soplex/450.soplex.test   284.00  299.00   5.3%
test-suite...nsumer-jpeg/consumer-jpeg.test    21.00   22.00   4.8%
The file was modifiedllvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
The file was modifiedllvm/test/Transforms/DeadStoreElimination/MSSA/lifetime.ll
Commit cc07fbe37dc82eeb3e6261a4c54f44b22cbb531d by jianzhouzh
Release pages to OS when setting 0 label

This is a follow up patch of https://reviews.llvm.org/D88755.

When set 0 label for an address range, we can release pages within the
corresponding shadow address range to OS, and set only addresses outside
the pages to be 0.

Reviewed-by: morehouse, eugenis
Differential Revision: https://reviews.llvm.org/D89199
The file was modifiedcompiler-rt/lib/dfsan/dfsan_interceptors.cpp
The file was modifiedcompiler-rt/lib/dfsan/dfsan.cpp
Commit 38b632c16e0fdfd5f5a69bcfd4aecf6f69ea0186 by i
[ELF] --gdb-index: support --icf={safe,all}

The combination has not been tested before. In the case of ICF,
`e.section->getVA(0)` equals the start address of the output section.

This can cause incorrect overlapping with the actual function at the
start of the output section and potentially trigger a GDB internal error
in `dw2_find_pc_sect_compunit_symtab` (presumably because:
if a short address range incorrectly starts at the start address of the
output section, GDB may pick it instead of the correct longer address
range. When mapping an address within the long address range but
out of the scope of the short address range, the routine may find
nothing - while the code asserts that it can find something).

Note that in the case of ICF there may be duplicate address range entries,
but GDB appears to be fine with them.

Reviewed By: grimar

Differential Revision: https://reviews.llvm.org/D89751
The file was modifiedlld/ELF/SyntheticSections.cpp
The file was addedlld/test/ELF/gdb-index-icf.s
Commit b30e42922aeaeb70efbfcf7c2132dae21239a023 by martin
[libcxx] [test] Avoid conflicting definitions of _CRT_SECURE_NO_WARNINGS

This is defined both by libcxx/utils/libcxx/test/config.py (for
any windows target) and msvc_stdlib_force_include.h (when testing
specifically the MSVC C++ library).

The command line define (-D_CRT_SECURE_NO_WARNINGS) defines it to the
value 1; change the header define to match that.

Keeping both instances, to keep the fix for cases when not building
in cases that don't use config.py.

Also remove a comment about whether this can be removed; it can't at
least be removed altogether - doing that breaks a number of tests that
otherwise succeed.

Differential Revision: https://reviews.llvm.org/D89588
The file was modifiedlibcxx/test/support/msvc_stdlib_force_include.h
The file was modifiedlibcxx/utils/libcxx/test/config.py
Commit 87d7c0009265951f988ea551203500ccfa141b15 by martin
[libcxx] [test] Fix path.modifiers/make_preferred for windows

Use p.string() instead of p.native() for comparing with the expected
value.

Explicitly list the expected values for both posix and windos, even if
the operation is an identity operation on posix.

Differential Revision: https://reviews.llvm.org/D89532
The file was modifiedlibcxx/test/std/input.output/filesystems/class.path/path.member/path.modifiers/make_preferred.pass.cpp
Commit 91dc545bf24daa60c21c93039408061194dd0ab3 by jianzhouzh
Set Huge Page mode on shadow regions based on no_huge_pages_for_shadow

It turned out that at dynamic shared library mode, the memory access
pattern can increase memory footprint significantly on OS when transparent
hugepages (THP) are enabled. This could cause >70x memory overhead than
running a static linked binary. For example, a static binary with RSS
overhead 300M can use > 23G RSS if it is built dynamically.
/proc/../smaps shows in 6204552 kB RSS 6141952 kB relates to
AnonHugePages.

Also such a high RSS happens in some rate: around 25% runs may use > 23G RSS, the
rest uses in between 6-23G. I guess this may relate to how user memory
is allocated and distributted across huge pages.

THP is a trade-off between time and space. We have a flag
no_huge_pages_for_shadow for sanitizer. It is true by default but DFSan
did not follow this. Depending on if a target is built statically or
dynamically, maybe Clang can set no_huge_pages_for_shadow accordingly
after this change. But it still seems fine to follow the default setting of
no_huge_pages_for_shadow. If time is an issue, and users are fine with
high RSS, this flag can be set to false selectively.
The file was modifiedcompiler-rt/test/dfsan/release_shadow_space.c
The file was modifiedcompiler-rt/lib/dfsan/dfsan.cpp
Commit f2a06875b604c00cbe96e54363f4f5d28935d610 by antiagainst
Wrap CfgTraitsFor in namespace llvm to please GCC 5
The file was modifiedmlir/include/mlir/IR/Dominance.h
Commit ad2be02a833e56f7fe280797280b219eb3312621 by mliska
ASAN: Support detect_invalid_pointer_pairs=1 with detect_stack_use_after_return=1

Do not crash when AsanThread::GetStackVariableShadowStart does not find
a variable for a pointer on a shadow stack.

Differential Revision: https://reviews.llvm.org/D89552
The file was modifiedcompiler-rt/lib/asan/asan_thread.cpp
The file was modifiedcompiler-rt/test/asan/TestCases/invalid-pointer-pairs-subtract-success.cpp
Commit 59286b36dfb5da3a73401f66d1fa8d65c7817f94 by aeubanks
[NPM] Port -mergereturn to NPM

Reviewed By: aeubanks

Differential Revision: https://reviews.llvm.org/D89781
The file was modifiedllvm/include/llvm/Transforms/Utils/UnifyFunctionExitNodes.h
The file was modifiedllvm/lib/Transforms/Utils/Utils.cpp
The file was modifiedllvm/lib/Transforms/Utils/UnifyFunctionExitNodes.cpp
The file was modifiedllvm/include/llvm/InitializePasses.h
The file was modifiedllvm/lib/Passes/PassBuilder.cpp
The file was modifiedllvm/lib/Passes/PassRegistry.def
The file was modifiedllvm/test/Transforms/UnifyFunctionExitNodes/unreachable-blocks-status.ll
Commit 51d1d585e5838ea0f02f1271f7543c4e43639969 by Duncan P. N. Exon Smith
clang/Frontend: Use MemoryBufferRef in FrontendInputFile (and remove SourceManager::getBuffer)

In order to drop the final callers to `SourceManager::getBuffer`, change
`FrontendInputFile` to use `Optional<MemoryBufferRef>`. Also updated
the "unowned" version of `SourceManager::createFileID` to take a
`MemoryBufferRef` (it now calls `MemoryBuffer::getMemBuffer`, which
creates a `MemoryBuffer` that does not own the buffer data).

Differential Revision: https://reviews.llvm.org/D89427
The file was modifiedclang/lib/Format/MacroExpander.cpp
The file was modifiedclang/unittests/Format/TestLexer.h
The file was modifiedclang/lib/Frontend/CompilerInstance.cpp
The file was modifiedclang/include/clang/Basic/SourceManager.h
The file was modifiedclang/include/clang/Frontend/FrontendOptions.h
The file was modifiedclang/lib/Basic/SourceManager.cpp
The file was modifiedclang/lib/Frontend/FrontendActions.cpp
The file was modifiedclang/lib/Frontend/ASTUnit.cpp
The file was modifiedclang/lib/Frontend/FrontendAction.cpp
The file was modifiedclang/include/clang/Frontend/FrontendAction.h
Commit 729d7d23282e9b00eaa7a5f35a4224929d73d3a4 by Duncan P. N. Exon Smith
FileManager: Test FileManager::getFileRef

Add a test demonstrating `getFileRef`'s behaviour, which isn't obvious
from code inspection when it's handling a redirected file.

Differential Revision: https://reviews.llvm.org/D89469
The file was modifiedclang/unittests/Basic/FileManagerTest.cpp
Commit 89f7ccea6f6488c443655880229c54db1f180153 by VenkataRamanaiah.Nalamothu
[AMDGPU] Remove getAllVGPR32() which cannot handle Accum VGPRs properly

Remove getAllVGPR32() interface and update the SGPR spill code to use
a proper method to get the relevant VGPR registers list.

Reviewed By: arsenm

Differential Revision: https://reviews.llvm.org/D89806
The file was modifiedllvm/lib/Target/AMDGPU/SIRegisterInfo.h
The file was modifiedllvm/lib/Target/AMDGPU/SILowerSGPRSpills.cpp
The file was modifiedllvm/lib/Target/AMDGPU/SIRegisterInfo.cpp
Commit 529ecd19df1ff7bcbf81a1151c3f7006dc268611 by aeubanks
[NPM] port -unify-loop-exits to NPM

Reviewed By: aeubanks

Differential Revision: https://reviews.llvm.org/D89774
The file was modifiedllvm/lib/Transforms/Utils/Utils.cpp
The file was modifiedllvm/lib/Passes/PassBuilder.cpp
The file was modifiedllvm/lib/Transforms/Utils/UnifyLoopExits.cpp
The file was modifiedllvm/test/Transforms/UnifyLoopExits/restore-ssa.ll
The file was modifiedllvm/include/llvm/InitializePasses.h
The file was addedllvm/include/llvm/Transforms/Utils/UnifyLoopExits.h
The file was modifiedllvm/test/Transforms/UnifyLoopExits/nested.ll
The file was modifiedllvm/test/Transforms/UnifyLoopExits/switch.ll
The file was modifiedllvm/lib/Passes/PassRegistry.def
The file was modifiedllvm/test/Transforms/UnifyLoopExits/basic.ll
Commit b333d6e129f23d204cd3a44ffb9f3a69dc3e0bc9 by Duncan P. N. Exon Smith
lldb: Migrate to MemoryBufferRef for createFileID (after 51d1d585e5838ea0f02f1271f7543c4e43639969)

I missed these two lldb users before deleting the `UnownedTag` API for
`createFileID` in 51d1d585e5838ea0f02f1271f7543c4e43639969. This should
fix the build.
The file was modifiedlldb/source/Plugins/Language/ClangCommon/ClangHighlighter.cpp
The file was modifiedlldb/source/Plugins/ExpressionParser/Clang/ClangExpressionSourceCode.cpp
Commit 848a68a032d1c59274526abb3220714202d4757e by nicolai.haehnle
DomTree: Extract (mostly) read-only logic into type-erased base classes

Avoid having to instantiate and compile a subset of the dominator tree logic
separately for each node type. More importantly, this allows generic
algorithms to be built on top of dominator trees without writing them as
templates -- such algorithms can now use opaque CfgBlockRef and
CfgInterface instead.

A type-erased implementation of dominator trees could be written in
terms of CfgInterface as well, but doing so would change the current
trade-off: it would slightly reduce code size at the cost of a slight
runtime overhead.

This patch does not change the trade-off, as it only does type-erasure
where basic blocks can be treated in a fully opaque way, i.e. it only
moves methods that don't require iteration over CFG successors and
predecessors.

v5:
- rename generic_{begin,end,children} back without the generic_ prefix
  and refer explictly to base class methods in NewGVN, which wants to
  mutate the order of dominator tree node children directly

v6:
- style change: iDom -> idom; it's arguable whether this is really
  invalid, since it is actually standard camelCase, but clang-tidy
  complains about it so... *shrug*
- rename {to,from}Generic -> {wrap,unwrap}Ref

Change-Id: Ib860dc04cf8bb093d8ed00be7def40d662213672

Differential Revision: https://reviews.llvm.org/D83089
The file was modifiedllvm/lib/Support/CMakeLists.txt
The file was modifiedllvm/include/llvm/Support/GenericDomTreeConstruction.h
The file was addedllvm/lib/Support/GenericDomTree.cpp
The file was modifiedllvm/lib/Transforms/Scalar/NewGVN.cpp
The file was modifiedllvm/lib/Transforms/Scalar/ADCE.cpp
The file was modifiedllvm/include/llvm/CodeGen/MachineDominators.h
The file was modifiedllvm/include/llvm/Support/GenericDomTree.h
Commit cf9e54ef49c689772112c377ecce358ec66d0e59 by llvmgnsyncbot
[gn build] Port 848a68a032d
The file was modifiedllvm/utils/gn/secondary/llvm/lib/Support/BUILD.gn
Commit 0c0fcea557e4a7cfd51216ad20aa67c82733ab52 by david.stenberg
Handle value uses wrapped in metadata for the use-list order

When generating the use-list order, also consider value uses that are
operands which are wrapped in metadata; e.g. llvm.dbg.value operands.

This fixes PR36778. The test case is based on the reproducer from that
report.

Reviewed By: dexonsmith

Differential Revision: https://reviews.llvm.org/D53758
The file was modifiedllvm/lib/IR/AsmWriter.cpp
The file was modifiedllvm/lib/Bitcode/Writer/ValueEnumerator.cpp
The file was addedllvm/test/Assembler/metadata-use-uselistorder.ll
The file was modifiedllvm/tools/verify-uselistorder/verify-uselistorder.cpp
Commit e902269c493cafde23d031a825b4de5868194f6f by mtrofin
[NFC][Regalloc] Type 2 statics in terms of Register

Using Register instead of unsigned.

Also added isStack to mirror the other members, and eventually remove
the static testers.

Differential Revision: https://reviews.llvm.org/D89718
The file was modifiedllvm/include/llvm/CodeGen/Register.h