SuccessChanges

Changes from Git (git http://labmaster3.local/git/llvm-project.git)

Summary

  1. [clang-tidy] Implement storeOptions for checks missing it. (details)
  2. [X86] Add cooperlake detection to _cpu_indicator_init. (details)
  3. [X86] Add 'cooperlake' and 'tigerlake' to __builtin_cpu_is. (details)
  4. [VectorCombine] create class for pass to hold analyses, etc; NFC (details)
  5. [X86] Assign a feature priority to 'tigerlake' so it won't assert when used with function multiversioning (details)
  6. [X86] Add cooperlake and tigerlake to the enum in cpu_model.c (details)
  7. [lld-macho] Refactor segment/section creation, sorting, and merging (details)
  8. [amdgpu] Fix REL32 relocations with negative offsets. (details)
  9. [X86] Add test file that was supposed to go with D81327. (details)
Commit db90d315706b5d5a06cb79607cef1a8d581d0ba8 by n.james93
[clang-tidy] Implement storeOptions for checks missing it.

Just adds the storeOptions for Checks that weren't already storing their options.

Reviewed By: aaron.ballman

Differential Revision: https://reviews.llvm.org/D82223
The file was modifiedclang-tools-extra/clang-tidy/modernize/UseEmplaceCheck.cpp
The file was modifiedclang-tools-extra/clang-tidy/misc/NonPrivateMemberVariablesInClassesCheck.h
The file was modifiedclang-tools-extra/clang-tidy/misc/ThrowByValueCatchByReferenceCheck.cpp
The file was modifiedclang-tools-extra/clang-tidy/modernize/UseUsingCheck.cpp
The file was modifiedclang-tools-extra/clang-tidy/modernize/AvoidBindCheck.h
The file was modifiedclang-tools-extra/clang-tidy/readability/RedundantDeclarationCheck.cpp
The file was modifiedclang-tools-extra/clang-tidy/readability/StaticAccessedThroughInstanceCheck.h
The file was modifiedclang-tools-extra/clang-tidy/modernize/UseBoolLiteralsCheck.cpp
The file was modifiedclang-tools-extra/clang-tidy/modernize/AvoidBindCheck.cpp
The file was modifiedclang-tools-extra/clang-tidy/cppcoreguidelines/NarrowingConversionsCheck.cpp
The file was modifiedclang-tools-extra/clang-tidy/modernize/UseBoolLiteralsCheck.h
The file was modifiedclang-tools-extra/clang-tidy/cppcoreguidelines/InitVariablesCheck.cpp
The file was modifiedclang-tools-extra/clang-tidy/cppcoreguidelines/NarrowingConversionsCheck.h
The file was modifiedclang-tools-extra/clang-tidy/modernize/UseUsingCheck.h
The file was modifiedclang-tools-extra/clang-tidy/misc/NonPrivateMemberVariablesInClassesCheck.cpp
The file was modifiedclang-tools-extra/clang-tidy/modernize/UseAutoCheck.cpp
The file was modifiedclang-tools-extra/clang-tidy/readability/RedundantDeclarationCheck.h
The file was modifiedclang-tools-extra/clang-tidy/modernize/LoopConvertCheck.cpp
The file was modifiedclang-tools-extra/clang-tidy/readability/MagicNumbersCheck.h
The file was modifiedclang-tools-extra/clang-tidy/bugprone/TooSmallLoopVariableCheck.cpp
The file was modifiedclang-tools-extra/clang-tidy/utils/HeaderGuard.h
The file was modifiedclang-tools-extra/clang-tidy/readability/MagicNumbersCheck.cpp
The file was modifiedclang-tools-extra/clang-tidy/modernize/UseTransparentFunctorsCheck.cpp
The file was modifiedclang-tools-extra/clang-tidy/modernize/RawStringLiteralCheck.cpp
The file was modifiedclang-tools-extra/clang-tidy/utils/HeaderGuard.cpp
The file was modifiedclang-tools-extra/clang-tidy/cppcoreguidelines/InitVariablesCheck.h
The file was modifiedclang-tools-extra/clang-tidy/misc/ThrowByValueCatchByReferenceCheck.h
Commit 0e6c9316d4c532ba1a024bc0ea552a0b866df4f1 by craig.topper
[X86] Add cooperlake detection to _cpu_indicator_init.

libgcc has this enum encoding defined for a while, but their
detection code is missing. I've raised a bug with them so that
should get fixed soon.
The file was modifiedcompiler-rt/lib/builtins/cpu_model.c
Commit 42c176c32851833f32863412e74235f085adc801 by craig.topper
[X86] Add 'cooperlake' and 'tigerlake' to __builtin_cpu_is.

Cooperlake can be detect by compiler-rt now, but not libgcc yet.
Tigerlake can't be detected by either. Both names are accepted by
gcc. Hopefully the detection code will be in place soon.
The file was modifiedllvm/include/llvm/Support/X86TargetParser.def
The file was modifiedclang/test/CodeGen/target-builtin-noerror.c
Commit 6bdd531af5a0fd2f33d2fbb9756c86e13b632ac7 by spatel
[VectorCombine] create class for pass to hold analyses, etc; NFC

This doesn't change anything currently, but it would make sense
to create a class-level IRBuilder instead of recreating that
everywhere. As we expand to more optimizations, we will probably
also want to hold things like the DataLayout or other constant
refs in here too.
The file was modifiedllvm/lib/Transforms/Vectorize/VectorCombine.cpp
Commit 1d4c87335d5236ea1f35937e1014980ba961ae34 by craig.topper
[X86] Assign a feature priority to 'tigerlake' so it won't assert when used with function multiversioning

Also test cooperlake since it was also just added to function
multiversioning when it was enabled for __builtin_cpu_is.
The file was modifiedllvm/include/llvm/Support/X86TargetParser.def
The file was modifiedclang/test/CodeGen/attr-target-mv.c
Commit 90406d62e51daa2e719578df65e9cec31b32a4e7 by craig.topper
[X86] Add cooperlake and tigerlake to the enum in cpu_model.c

I forgot to do this when I added then to _cpu_indicator_init.
The file was modifiedcompiler-rt/lib/builtins/cpu_model.c
Commit 3646ee503dfb8bd4e02294fc122a80b95900ca16 by jezng
[lld-macho] Refactor segment/section creation, sorting, and merging

Summary:
There were a few issues with the previous setup:

1. The section sorting comparator used a declarative map of section names to
  determine the correct order, but it turns out we need to match on more than
  just names -- in particular, an upcoming diff will sort based on whether the
  S_ZERO_FILL flag is set. This diff changes the sorter to a more imperative but
  flexible form.

2. We were sorting OutputSections stored in a MapVector, which left the
  MapVector in an inconsistent state -- the wrong keys map to the wrong values!
  In practice, we weren't doing key lookups (only container iteration) after the
  sort, so this was fine, but it was still a dubious state of affairs. This diff
  copies the OutputSections to a vector before sorting them.

3. We were adding unneeded OutputSections to OutputSegments and then filtering
  them out later, which meant that we had to remember whether an OutputSegment
  was in a pre- or post-filtered state. This diff only adds the sections to the
  segments if they are needed.

In addition to those major changes, two minor ones worth noting:

1. I renamed all OutputSection variable names to `osec`, to parallel `isec`.
  Previously we were using some inconsistent combination of `osec`, `os`, and
  `section`.

2. I added a check (and a test) for InputSections with names that clashed with
  those of our synthetic OutputSections.

Reviewers: #lld-macho

Subscribers: llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D81887
The file was modifiedlld/MachO/OutputSection.cpp
The file was modifiedlld/MachO/Writer.cpp
The file was modifiedlld/MachO/MergedOutputSection.h
The file was addedlld/test/MachO/invalid/reserved-section-name.s
The file was modifiedlld/MachO/OutputSegment.h
The file was modifiedlld/MachO/SyntheticSections.cpp
The file was modifiedlld/MachO/OutputSection.h
The file was modifiedlld/MachO/SyntheticSections.h
The file was modifiedlld/MachO/OutputSegment.cpp
Commit 20a1700293f6c4eb726c5e6abd0d282a62cbf057 by michael.hliao
[amdgpu] Fix REL32 relocations with negative offsets.

Summary: - The offset should be treated as a signed one.

Reviewers: rampitec, arsenm

Subscribers: kzhuravl, jvesely, wdng, nhaehnle, yaxunl, dstuttard, tpr, t-tye, hiraditya, kerbowa, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D82234
The file was modifiedllvm/lib/Target/AMDGPU/AMDGPULegalizerInfo.h
The file was addedllvm/test/CodeGen/AMDGPU/rel32.ll
The file was modifiedllvm/lib/Target/AMDGPU/AMDGPULegalizerInfo.cpp
The file was modifiedllvm/lib/Target/AMDGPU/SIISelLowering.cpp
Commit 59d48eadd0ae164abc9953698eb0acc8af2f1a58 by craig.topper
[X86] Add test file that was supposed to go with D81327.

Must have forgotten to git add the file.
The file was addedllvm/test/CodeGen/X86/avx512-movmsk.ll