FailedChanges

Summary

  1. [AArch64][x86] add tests for FMA combines; NFC (details)
  2. TextAPIContext.h - remove unused MemoryBuffer.h include. NFC. (details)
  3. TextStubCommon.h - move StringSwitch.h include to TextStubCommon.cpp. NFC. (details)
  4. [llvm-objcopy][ELF] Fix removing SHT_GROUP sections. (details)
  5. [llvm-objcopy][ELF] Fix removing a group member. (details)
  6. [DAGCombiner] avoid unnecessary indirection from SDNode/SDValue; NFCI (details)
  7. [llvm-readobj] - Cleanup the DwarfCFIEH::PrinterContext class. NFCI. (details)
  8. [ModuloSchedule] Allow illegal phis to be moved across stages. (details)
  9. [analyzer] ApiModeling: Add buffer size arg constraint (details)
  10. [CodeGen] Fix warnings in LowerToPredicatedOp (details)
  11. [analyzer] ApiModeling: Add buffer size arg constraint with multiplier involved (details)
  12. [SVE] Remove getNumElements() calls in visitGetElementPtrInst (details)
  13. Fix build failure when source is read only (details)
  14. [analyzer] StdLibraryFunctionsChecker: Add sanity checks for constraints (details)
  15. Move unittest helpers to a shared location (details)
  16. [OpenMP][SYCL] Improve diagnosing of unsupported types usage (details)
  17. Remove SVN logic from find_first_existing_vc_file (details)
  18. [AIX][XCOFF] add symbol priority for the llvm-objdump -D -symbol-description (details)
  19. [ARM] Extra MVE VMLAV reduction patterns (details)
  20. unwind: use a more portable endianness check in EHABI (details)
  21. [lldb/test] Fix TestAppleSimulatorOSType when multiple runtimes are installed (details)
  22. [AMDGPU] Remove duplicate test cases (details)
  23. [analyzer] StdLibraryFunctionsChecker: Add support to lookup types (details)
  24. [CodeGen] Fix warning in visitShuffleVector (details)
  25. Fix errors in use of strictfp attribute. (details)
  26. Fix errors in use of strictfp attribute. (details)
  27. Fix errors in use of strictfp attribute. (details)
  28. GlobalISel: fix CombinerHelper::matchEqualDefs() (details)
  29. [X86] Fix errors in use of strictfp attribute. (details)
  30. [DAGCombiner] Add command line options to guard store width reduction (details)
  31. Let @skipUnlessThreadSanitizer imply @skipIfAsan (details)
  32. Let @skipUnlessUndefinedBehaviorSanitizer imply @skipIfAsan (details)
  33. [ConstantFolding] Constant folding for integer vector reduce intrinsics (details)
  34. Preserve DbgLoc when DeadArgumentElimination rewrites a 'ret'. (details)
  35. [LoopVectorize] auto-generate complete test checks; NFC (details)
  36. [LoopVectorize] regenerate test checks; NFC (details)
  37. [LoopVectorize] auto-generate complete checks; NFC (details)
  38. [LoopVectorize] regenerate test checks; NFC (details)
  39. [SVE] Eliminate calls to default-false VectorType::get() from polly (details)
  40. [AIX] Emit AvailableExternally Linkage on AIX (details)
  41. [LoopVectorize] auto-generate complete test checks; NFC (details)
  42. [PrintSCC] Fix printing a basic-block without a name (details)
  43. [MLIR][OpenMP] Defined master operation in OpenMP Dialect (details)
  44. [X86] Remove isel pattern for MMX_X86movdq2q+simple_load. Replace with DAG combine to to loadmmx. (details)
  45. [SVE] Replace deprecated call in changeVectorElementTypeToInteger (details)
  46. [X86] Ignore large code model in X86FastISel::X86MaterializeFP in 32-bit mode (details)
  47. [SLP] auto-generate complete test checks; NFC (details)
  48. [WebAssembly] Add placeholders for R_WASM_TABLE_INDEX_REL_SLEB relocations (details)
  49. Add support for Overloaded Binary Operators in SyntaxTree (details)
  50. [Local] Prevent `invertCondition` from creating a redundant instruction (details)
  51. [SVE] Eliminate calls to default-false VectorType::get() from Vectorize (details)
  52. [DWARF5] Added support for .debug_macro.dwo section in llvm-dwarfdump (details)
  53. [DWARF5] Replace emission of strp with stx forms in debug_macro section (details)
  54. [mlir][Linalg] Make contraction vectorization use vector transfers (details)
  55. [AMDGPU] Regenrated urem/udiv global isel tests. NFC. (details)
  56. [tests] Fix AMDGPU test (details)
  57. AMDGPU: Remove fp-exceptions feature (details)
  58. [lldb/CMake] Set both the BUILD and INSTALL RPATH on macOS (2/2) (details)
  59. [clang-format] Create a python documentation tool to generate a summary of the clang-format status for the whole of the LLVM project (details)
  60. Add NoMerge MIFlag to avoid MIR branch folding (details)
  61. [ASTMatchers] Matchers related to C++ inheritance (details)
  62. [Matrix] Implement + and - operators for MatrixType. (details)
  63. Process gep (phi ptr1, ptr2) in SROA (details)
  64. [DebugInfo][DAG] Don't reuse debug location on COPY if width changes. (details)
  65. AMDGPU/GlobalISel: Add boilerplate for inline asm lowering (details)
  66. Revert "Process gep (phi ptr1, ptr2) in SROA" (details)
  67. [lldb/Test] Don't leak forked processes on Darwin (details)
  68. [CMake] Change target 'check' from 'check-llvm' to 'check-all' (details)
  69. [ELF] Add -z rel and -z rela (details)
Commit 912502e8efa9c09fb3b4abce0840b242b731ff12 by spatel
[AArch64][x86] add tests for FMA combines; NFC
The file was modifiedllvm/test/CodeGen/AArch64/fadd-combines.ll
The file was modifiedllvm/test/CodeGen/X86/fma_patterns.ll
Commit b12fa146b55206b003b25cc5e550874ab0cc0d89 by llvm-dev
TextAPIContext.h - remove unused MemoryBuffer.h include. NFC.
The file was modifiedllvm/lib/TextAPI/MachO/TextAPIContext.h
Commit 99a3b20452b16aa92e18e4f5d2c8c6f025aafbae by llvm-dev
TextStubCommon.h - move StringSwitch.h include to TextStubCommon.cpp. NFC.

Only TextStubCommon.cpp actually uses StringSwitch
The file was modifiedllvm/lib/TextAPI/MachO/TextStubCommon.h
The file was modifiedllvm/lib/TextAPI/MachO/TextStubCommon.cpp
Commit a9313282cd5413ed498dceb763ebba12ea5bdecd by ikudrin
[llvm-objcopy][ELF] Fix removing SHT_GROUP sections.

When a SHT_GROUP section is removed, but other sections of the group are
kept, the SHF_GROUP flag of these sections should be dropped, otherwise
the resulting ELF file will be malformed.

Differential Revision: https://reviews.llvm.org/D80511
The file was modifiedllvm/tools/llvm-objcopy/ELF/Object.cpp
The file was addedllvm/test/tools/llvm-objcopy/ELF/remove-section-group.test
The file was modifiedllvm/tools/llvm-objcopy/ELF/Object.h
Commit 5b875bf59b068f3db91c750b24030a7b2bd164aa by ikudrin
[llvm-objcopy][ELF] Fix removing a group member.

When a group member is removed, the corresponding record in the
SHT_GROUP section has to be deleted.

This fixes PR46064.

Differential Revision: https://reviews.llvm.org/D80568
The file was modifiedllvm/tools/llvm-objcopy/ELF/Object.cpp
The file was addedllvm/test/tools/llvm-objcopy/ELF/remove-section-in-group.test
The file was modifiedllvm/tools/llvm-objcopy/ELF/Object.h
Commit 21dadd774f56778ef68c1ce307205dfbdacc793a by spatel
[DAGCombiner] avoid unnecessary indirection from SDNode/SDValue; NFCI
The file was modifiedllvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
Commit 9819976032c5af8d9109f2077e637c8303e4d6df by grimar
[llvm-readobj] - Cleanup the DwarfCFIEH::PrinterContext class. NFCI.

It would be nice to switch to `reportUniqueWarnings` from
`reportError` in this class, but first of all it needs a cleanup.

This patch:
1) Eliminates autos.
2) Removes code duplication.
3) Changes how the code works with `Expected<>`.
4) Introduces 2 new `using`s to make the code a bit shorter.

Differential revision: https://reviews.llvm.org/D80726
The file was modifiedllvm/tools/llvm-readobj/DwarfCFIEHPrinter.h
Commit d8f2814c913847b1d0e9167dce5973eea3600c7e by hgreving
[ModuloSchedule] Allow illegal phis to be moved across stages.

Fixes a trivial but impactful bug where we did not move illegal phis across stages. This
led to incorrect mappings in certain cases.
The file was modifiedllvm/lib/CodeGen/ModuloSchedule.cpp
Commit bd03ef19beb8a3476d5cd9f744c5fba5ca287c51 by gabor.marton
[analyzer] ApiModeling: Add buffer size arg constraint

Summary:
Introducing a new argument constraint to confine buffer sizes. It is typical in
C APIs that a parameter represents a buffer and another param holds the size of
the buffer (or the size of the data we want to handle from the buffer).

Reviewers: NoQ, Szelethus, Charusso, steakhal

Subscribers: whisperity, xazax.hun, baloghadamsoftware, szepet, rnkovacs, a.sidorin, mikhail.ramalho, donat.nagy, dkrupp, gamesh411, ASDenysPetrov, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D77066
The file was modifiedclang/include/clang/StaticAnalyzer/Core/PathSensitive/DynamicSize.h
The file was modifiedclang/lib/StaticAnalyzer/Core/DynamicSize.cpp
The file was modifiedclang/lib/StaticAnalyzer/Checkers/CheckPlacementNew.cpp
The file was modifiedclang/test/Analysis/std-c-library-functions-arg-constraints.c
The file was modifiedclang/lib/StaticAnalyzer/Checkers/StdLibraryFunctionsChecker.cpp
Commit 205085d4ccf9c367ba70de9d8f0dd74d6f567c24 by david.sherwood
[CodeGen] Fix warnings in LowerToPredicatedOp

When creating a new vector type based on another vector type we
should pass in the element count instead of the number of elements
and scalable flag separately.

I encountered this warning whilst compiling this test:

  CodeGen/AArch64/sve-intrinsics-int-compares.ll

Differential revision: https://reviews.llvm.org/D80621
The file was modifiedllvm/lib/Target/AArch64/AArch64ISelLowering.cpp
Commit 41928c97b6a17264938fc765a6a0656d8b6e86ed by gabor.marton
[analyzer] ApiModeling: Add buffer size arg constraint with multiplier involved

Summary:
Further develop the buffer size argumentum constraint so it can handle sizes
that we can get by multiplying two variables.

Reviewers: Szelethus, NoQ, steakhal

Subscribers: whisperity, xazax.hun, baloghadamsoftware, szepet, rnkovacs, a.sidorin, mikhail.ramalho, donat.nagy, dkrupp, gamesh411, Charusso, ASDenysPetrov, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D77148
The file was modifiedclang/test/Analysis/std-c-library-functions-arg-constraints.c
The file was modifiedclang/lib/StaticAnalyzer/Checkers/StdLibraryFunctionsChecker.cpp
Commit 0609704760d0a94cccdbd243d0d750d74ee6c459 by david.sherwood
[SVE] Remove getNumElements() calls in visitGetElementPtrInst

Replace calls to getNumElements() with getElementCount() in order
to avoid warnings for scalable vectors. The warnings were discovered
by this existing test:

  test/CodeGen/AArch64/sve-gep.ll

Differential revision: https://reviews.llvm.org/D80782
The file was modifiedllvm/lib/IR/Verifier.cpp
Commit 16fef6d0b46f0494c502f8fe416fe841f7b000f6 by sameer.sahasrabuddhe
Fix build failure when source is read only

cmake configure fails when it tries to setup target for llvm_vcsrevision_h
This happens only when source is checked out using repo in a read
only filesystem, because cmake tries to create `.git/logs/HEAD` file.

This patch:
  1. Recovers from failure gracefully.
  2. Ensures that VCSRevision.h is successfully created and updated
     in above scenarios.

Differential Revision: https://reviews.llvm.org/D79400
The file was modifiedllvm/cmake/modules/AddLLVM.cmake
The file was modifiedllvm/include/llvm/Support/CMakeLists.txt
Commit 16506d789084fd037fc61d442da43dd5242872b7 by gabor.marton
[analyzer] StdLibraryFunctionsChecker: Add sanity checks for constraints

Summary:
Once we found a matching FunctionDecl for the given summary then we
validate the given constraints against that FunctionDecl. E.g. we
validate that a NotNull constraint is applied only on arguments that
have pointer types.

This is needed because when we matched the signature of the summary we
were working with incomplete function types, i.e. some intricate type
could have been marked as `Irrelevant` in the signature.

Reviewers: NoQ, Szelethus, balazske

Subscribers: whisperity, xazax.hun, baloghadamsoftware, szepet, rnkovacs, a.sidorin, mikhail.ramalho, donat.nagy, dkrupp, gamesh411, Charusso, steakhal, ASDenysPetrov, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D77658
The file was modifiedclang/lib/StaticAnalyzer/Checkers/StdLibraryFunctionsChecker.cpp
Commit 0e265e315784b4e47f984f8ed9fb7586130bacdc by gribozavr
Move unittest helpers to a shared location

Summary:
unittests/AST/Language.h defines some helpers that we would like to
reuse in other tests, for example, in tests for syntax trees.

Reviewers: sammccall

Reviewed By: sammccall

Subscribers: mgorny, martong, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D80792
The file was removedclang/unittests/AST/Language.cpp
The file was modifiedclang/unittests/AST/CMakeLists.txt
The file was modifiedclang/unittests/AST/MatchVerifier.h
The file was modifiedclang/unittests/AST/StructuralEquivalenceTest.cpp
The file was removedclang/unittests/AST/Language.h
The file was addedclang/lib/Testing/CMakeLists.txt
The file was modifiedclang/unittests/AST/ASTImporterFixtures.h
The file was modifiedclang/include/clang/module.modulemap
The file was addedclang/lib/Testing/CommandLineArgs.cpp
The file was addedclang/include/clang/Testing/CommandLineArgs.h
The file was modifiedclang/lib/CMakeLists.txt
Commit cf6cc662eeee2b1416430f517850be9032788e39 by alexey.bader
[OpenMP][SYCL] Improve diagnosing of unsupported types usage

Summary:
Diagnostic is emitted if some declaration of unsupported type
declaration is used inside device code.
Memcpy operations for structs containing member with unsupported type
are allowed. Fixed crash on attempt to emit diagnostic outside of the
functions.

The approach is generalized between SYCL and OpenMP.
CUDA/OMP deferred diagnostic interface is going to be used for SYCL device.

Reviewers: rsmith, rjmccall, ABataev, erichkeane, bader, jdoerfert, aaron.ballman

Reviewed By: jdoerfert

Subscribers: guansong, sstefan1, yaxunl, mgorny, bader, ebevhan, Anastasia, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D74387
The file was modifiedclang/test/Headers/nvptx_device_math_sin.cpp
The file was modifiedclang/lib/Sema/Sema.cpp
The file was modifiedclang/lib/Sema/SemaDeclCXX.cpp
The file was modifiedclang/lib/Sema/CMakeLists.txt
The file was modifiedclang/lib/Sema/SemaOpenMP.cpp
The file was modifiedclang/lib/Sema/SemaDecl.cpp
The file was modifiedclang/test/Headers/nvptx_device_math_sin.c
The file was modifiedclang/test/OpenMP/nvptx_unsupported_type_messages.cpp
The file was modifiedclang/lib/Sema/SemaExpr.cpp
The file was addedclang/lib/Sema/SemaSYCL.cpp
The file was modifiedclang/lib/Sema/SemaType.cpp
The file was modifiedclang/include/clang/Sema/Sema.h
The file was modifiedclang/include/clang/Basic/DiagnosticSemaKinds.td
The file was modifiedclang/test/OpenMP/nvptx_unsupported_type_codegen.cpp
The file was addedclang/test/SemaSYCL/float128.cpp
Commit 0384446c7c2458b12ce3ef1c2bdf438af1f78ad7 by sameer.sahasrabuddhe
Remove SVN logic from find_first_existing_vc_file

As LLVM has moved from SVN to git, there is no need to
keep SVN related code. Also, this code piece was never used.

Differential Revision: https://reviews.llvm.org/D79400
The file was modifiedllvm/cmake/modules/AddLLVM.cmake
Commit 34cfed24ebd3a2a9f286877d142a68dbf2c42c96 by diggerlin
[AIX][XCOFF] add symbol priority for the llvm-objdump -D -symbol-description

SUMMARY:
when there are two symbol has the same address. llvm-objdump -D -symbol-description will select symbol based on the following rule:

1. using Label first if there is a Label symbol.
2. If there is not Label, using a symbol which has Storage Mapping class.
3. if more than one symbol has storage mapping class, put the TC0 has the low priority, for other storage mapping class , compare based on the value.

Reviewers: James Henderson ,hubert.reinterpretcast,

Differential Revision: https://reviews.llvm.org/D78387
The file was modifiedllvm/include/llvm/MC/MCDisassembler/MCDisassembler.h
The file was addedllvm/unittests/MC/MCDisassemblerTest.cpp
The file was modifiedllvm/test/tools/llvm-objdump/XCOFF/disassemble-symbol-description.test
The file was modifiedllvm/lib/MC/MCDisassembler/MCDisassembler.cpp
The file was modifiedllvm/unittests/MC/CMakeLists.txt
Commit 747c574b94595c6209185c87e79f51bff46fd4d8 by david.green
[ARM] Extra MVE VMLAV reduction patterns

These patterns for i8 and i16 VMLA's were missing. They end up from
legalized vector.reduce.add.v8i16 and vector.reduce.add.v16i8, and
although the instruction works differently (the mul and add are
performed in a higher precision), I believe it is OK because only an
i8/i16 are demanded from them, and so the results will be the same. At
least, they pass any testing I can think to run on them.

There are some tests that end up looking worse, but are quite artificial
due to passing half vector types through a call boundary. I would not
expect the vmull to realistically come up like that, and a vmlava is
likely better a lot of the time.

Differential Revision: https://reviews.llvm.org/D80524
The file was modifiedllvm/lib/Target/ARM/ARMInstrMVE.td
The file was modifiedllvm/test/CodeGen/Thumb2/mve-vecreduce-mla.ll
Commit 68c50708d1f2b9aee3f10ec710df0b1387f701e5 by Saleem Abdulrasool
unwind: use a more portable endianness check in EHABI

The ARM specific code was trying to determine endianness using the
`__LITTLE_ENDIAN__` macro which is not guaranteed to be defined.
When not defined, it makes libunwind to build the big-endian code even
when the compiler builds for a little-endian target.

This change allows building libunwind with the `musl-gcc` toolchain
which does not define `__LITTLE_ENDIAN__`.  Use `__BYTE_ORDER__`
instead.

Patch by Idan Freiberg!
The file was modifiedlibunwind/src/Unwind-EHABI.cpp
Commit 977f00123a6d94c634d22356cae1da2a22f0e3df by Fred Riss
[lldb/test] Fix TestAppleSimulatorOSType when multiple runtimes are installed

One can have multiple simulator runtimes installed, supporting
various generations of OSs. The logic in TestAppleSimulatorOSType
might select a rnutime older than the one targeted by the current
tools, preventing the executable from running. This commit changes
the test to look for the most recent runtime available instead.
The file was modifiedlldb/test/API/tools/lldb-server/TestAppleSimulatorOSType.py
Commit 9e0b52e2e68412a9a2add18697f4246e5e5ee5e3 by jay.foad
[AMDGPU] Remove duplicate test cases

The two "2sin" test cases were identical to the "sin_2x" test cases just
above.
The file was modifiedllvm/test/CodeGen/AMDGPU/llvm.sin.ll
Commit 634258b80606c4bb8192077239a089ae5842781a by gabor.marton
[analyzer] StdLibraryFunctionsChecker: Add support to lookup types

Summary:
In this patch I am trying to get rid of the `Irrelevant` types from the
signatures of the functions from the standard C library. For that I've
introduced `lookupType()` to be able to lookup arbitrary types in the global
scope. This makes it possible to define the signatures precisely.

Note 1) `fread`'s signature is now fixed to have the proper `FILE *restrict`
type when C99 is the language.
Note 2) There are still existing `Irrelevant` types, but they are all from
POSIX. I am planning to address those together with the missing POSIX functions
(in D79433).

Reviewers: xazax.hun, NoQ, Szelethus, balazske

Subscribers: whisperity, baloghadamsoftware, szepet, rnkovacs, a.sidorin, mikhail.ramalho, donat.nagy, dkrupp, gamesh411, Charusso, steakhal, ASDenysPetrov, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D80016
The file was modifiedclang/lib/StaticAnalyzer/Checkers/StdLibraryFunctionsChecker.cpp
The file was addedclang/test/Analysis/std-c-library-functions-lookup.c
The file was modifiedclang/test/Analysis/std-c-library-functions-arg-constraints.c
The file was addedclang/test/Analysis/std-c-library-functions-lookup.cpp
The file was modifiedclang/test/Analysis/std-c-library-functions.c
Commit d8a78889f633c5a60f0a1c7cb60bf9b18817d9d7 by david.sherwood
[CodeGen] Fix warning in visitShuffleVector

Make sure we only ask for the number of elements after we've
bailed out for scalable vectors.

Differential revision: https://reviews.llvm.org/D80632
The file was modifiedllvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
Commit a38788201e44c5eb1abf3c71d0cad22d291dc9a3 by kevin.neal
Fix errors in use of strictfp attribute.

Errors spotted with use of: https://reviews.llvm.org/D68233
The file was modifiedllvm/test/CodeGen/AArch64/strict-fp-int-promote.ll
Commit 66d1899e2ffd2581f774ecf51ced4a325e7d004b by kevin.neal
Fix errors in use of strictfp attribute.

Errors spotted with use of: https://reviews.llvm.org/D68233
The file was modifiedllvm/test/CodeGen/PowerPC/fp-strict-f128.ll
The file was modifiedllvm/test/CodeGen/PowerPC/fp-strict.ll
The file was modifiedllvm/test/CodeGen/PowerPC/ppcf128-constrained-fp-intrinsics.ll
The file was modifiedllvm/test/CodeGen/PowerPC/fp-strict-minmax.ll
Commit c21a4f84b0e83aaf8f5390f6299a8857197f96c4 by kevin.neal
Fix errors in use of strictfp attribute.

Errors spotted with use of: https://reviews.llvm.org/D68233
The file was modifiedllvm/test/CodeGen/SystemZ/fp-strict-cmp-05.ll
The file was modifiedllvm/test/CodeGen/SystemZ/fp-strict-alias.ll
The file was modifiedllvm/test/CodeGen/SystemZ/fp-strict-cmp-04.ll
The file was modifiedllvm/test/CodeGen/SystemZ/fp-strict-cmps-05.ll
The file was modifiedllvm/test/CodeGen/SystemZ/fp-strict-cmps-04.ll
The file was modifiedllvm/test/CodeGen/SystemZ/vec-strict-conv-02.ll
Commit f6a6de288bfb23e45ab2558a9c163132cfe7579a by Stanislav.Mekhanoshin
GlobalISel: fix CombinerHelper::matchEqualDefs()

This matcher was always returning true for the different
results of a same instruction.

Differential Revision:
The file was modifiedllvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp
The file was addedllvm/test/CodeGen/AMDGPU/GlobalISel/postlegalizercombiner-select.mir
Commit cd74ccc965e773a3f0c31cd6bb46de318cefdca9 by kevin.neal
[X86] Fix errors in use of strictfp attribute.

Errors spotted with use of: https://reviews.llvm.org/D68233
The file was modifiedllvm/test/CodeGen/X86/fp-strict-scalar-round.ll
The file was modifiedllvm/test/CodeGen/X86/vec-strict-512.ll
The file was modifiedllvm/test/CodeGen/X86/vec-strict-fptoint-256.ll
The file was modifiedllvm/test/CodeGen/X86/vec-strict-256.ll
The file was modifiedllvm/test/CodeGen/X86/fp-intrinsics.ll
The file was modifiedllvm/test/CodeGen/X86/vec-strict-round-128.ll
The file was modifiedllvm/test/CodeGen/X86/vector-constrained-fp-intrinsics-flags.ll
The file was modifiedllvm/test/CodeGen/X86/vector-half-conversions.ll
The file was modifiedllvm/test/CodeGen/X86/vec-strict-fptoint-128.ll
The file was modifiedllvm/test/CodeGen/X86/vec-strict-fptoint-512.ll
The file was modifiedllvm/test/CodeGen/X86/fp-strict-scalar-cmp.ll
The file was modifiedllvm/test/CodeGen/X86/vec-strict-128.ll
Commit 40c08367e411a178404d4f01a82f651188f2ed01 by carrot
[DAGCombiner] Add command line options to guard store width reduction
optimizations

As discussed in the thread http://lists.llvm.org/pipermail/llvm-dev/2020-May/141838.html,
some bit field access width can be reduced by ReduceLoadOpStoreWidth, some
can't. If two accesses are very close, and the first access width is reduced,
the second is not. Then the wide load of second access will be stalled for long
time.

This patch add command line options to guard ReduceLoadOpStoreWidth and
ShrinkLoadReplaceStoreWithStore, so users can use them to disable these
store width reduction optimizations.

Differential Revision: https://reviews.llvm.org/D80745
The file was addedllvm/test/CodeGen/X86/clear-bitfield.ll
The file was modifiedllvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
The file was addedllvm/test/CodeGen/X86/disable-shrink-store.ll
Commit 31a8e27e1805e039d699afa890702e26a93e0b40 by Adrian Prantl
Let @skipUnlessThreadSanitizer imply @skipIfAsan

Don't run tests that use thread sanitizer inside an address-sanitized
LLDB. The tests don't support that configuration. Incidentally they
were skipped on green dragon for a different reason, so this hasn't
come up there before.
The file was modifiedlldb/packages/Python/lldbsuite/test/decorators.py
Commit c1a33299768f8404dd7b83a6cfef7c1155786c6a by Adrian Prantl
Let @skipUnlessUndefinedBehaviorSanitizer imply @skipIfAsan

Don't run tests that use undefined behavior sanitizer inside an
address-sanitized LLDB. The tests don't support that
configuration. Incidentally they were skipped on green dragon for a
different reason, so this hasn't come up there before.
The file was modifiedlldb/packages/Python/lldbsuite/test/decorators.py
Commit a01c0049b1a3583604259ae7bbe9761fc123adae by david.green
[ConstantFolding] Constant folding for integer vector reduce intrinsics

This add constant folding for all the integer vector reduce intrinsics,
providing that the argument is a constant vector. zeroinitializer always
produces 0 for all intrinsics, and other values can be handled with
APInt operators.

Differential Revision: https://reviews.llvm.org/D80516
The file was addedllvm/test/Analysis/ConstantFolding/vecreduce.ll
The file was modifiedllvm/lib/Analysis/ConstantFolding.cpp
Commit 8c2d2d971b2a221786e29380666d9900adeaee6a by paul.robinson
Preserve DbgLoc when DeadArgumentElimination rewrites a 'ret'.

Fixes PR46002.
The file was modifiedllvm/lib/Transforms/IPO/DeadArgumentElimination.cpp
The file was modifiedllvm/test/Transforms/DeadArgElim/dbginfo-preserve-dbgloc.ll
Commit 0b21c6706a48c013d2b3fc4a258a0f7437b0781a by spatel
[LoopVectorize] auto-generate complete test checks; NFC
The file was modifiedllvm/test/Transforms/LoopVectorize/X86/invariant-store-vectorization.ll
Commit 9d1f95bf9f55715ecc127d6f425696ff94c614fe by spatel
[LoopVectorize] regenerate test checks; NFC

Align attributes are now visible.
The file was modifiedllvm/test/Transforms/LoopVectorize/X86/load-deref-pred.ll
Commit 5e9427322721a24f23d73dd1627fc8848c9dcba1 by spatel
[LoopVectorize] auto-generate complete checks; NFC
The file was modifiedllvm/test/Transforms/LoopVectorize/X86/tail_loop_folding.ll
Commit f78eecbb93ca0e6f740a001e2325704dca920f00 by spatel
[LoopVectorize] regenerate test checks; NFC

Align attributes are now visible.
The file was modifiedllvm/test/Transforms/LoopVectorize/X86/imprecise-through-phis.ll
Commit b82a95f8bc91976a9ba663f8fa2edf15708b5c0f by ctetreau
[SVE] Eliminate calls to default-false VectorType::get() from polly

Reviewers: bollu, efriedma, david-arm, fpetrogalli, gchatelet

Reviewed By: fpetrogalli

Subscribers: tschuett, rkruppe, psnobl, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D80341
The file was modifiedpolly/lib/CodeGen/BlockGenerators.cpp
Commit 26604d06b6fe10bb047a3620cf306be8648dcc20 by Xiangling.Liao
[AIX] Emit AvailableExternally Linkage on AIX

Since on AIX, our strategy is to not use -u to suppress any undefined
symbols, we need to emit .extern for the symbols with AvailableExternally
linkage.

Differential Revision: https://reviews.llvm.org/D80642
The file was modifiedllvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
The file was modifiedllvm/lib/Target/PowerPC/PPCAsmPrinter.cpp
The file was modifiedllvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
The file was modifiedllvm/lib/Target/TargetLoweringObjectFile.cpp
The file was addedllvm/test/CodeGen/PowerPC/aix-available-externally-linkage.ll
Commit db653ff6b777f9133793c21c48a46912bc1a77df by spatel
[LoopVectorize] auto-generate complete test checks; NFC
The file was modifiedllvm/test/Transforms/LoopVectorize/X86/reduction-fastmath.ll
Commit dfc8244c24631169630399a640ab526acd678346 by ehudkatz
[PrintSCC] Fix printing a basic-block without a name

Print a basic-block as an operand to handle the case where it has no
name.

Differential Revision: https://reviews.llvm.org/D80552
The file was modifiedllvm/tools/opt/PrintSCC.cpp
The file was addedllvm/test/Other/print-cfg-sccs.ll
Commit dbb5979d158cd7c49fdb31a03a4a73dfb402cf66 by asudhaku
[MLIR][OpenMP] Defined master operation in OpenMP Dialect

Summary:
Implemented the basic changes for defining master operation in OpenMP.
It uses the generic parser and printer.

Reviewed By: kiranchandramohan, ftynse

Differential Revision: https://reviews.llvm.org/D80689
The file was modifiedmlir/include/mlir/Dialect/OpenMP/OpenMPOps.td
The file was modifiedmlir/test/Dialect/OpenMP/ops.mlir
Commit 87e4ad4d5ce1a231fae257faaada8badcfc22d43 by craig.topper
[X86] Remove isel pattern for MMX_X86movdq2q+simple_load. Replace with DAG combine to to loadmmx.

Only 64-bit bits will be loaded, not the whole 128 bits. We can
just combine it to plain mmx load. This has the side effect of
enabling isel load folding for it.

This part of my desire to get rid of isel patterns that shrink loads.
The file was modifiedllvm/lib/Target/X86/X86InstrMMX.td
The file was modifiedllvm/lib/Target/X86/X86ISelLowering.cpp
The file was modifiedllvm/test/CodeGen/X86/mmx-fold-load.ll
Commit b637519eef01d48301620b6537c52ec72978f553 by dancgr
[SVE] Replace deprecated call in changeVectorElementTypeToInteger

Summary:
Replace getVectorNumElements with getVectorElementCount;
gets rid of the warnings in several tests

Reviewers: sdesmalen, kmclaughlin, dancgr, efriedma, each, andwar, rengolin

Reviewed By: efriedma

Subscribers: tschuett, rkruppe, psnobl, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D80746
The file was modifiedllvm/include/llvm/CodeGen/ValueTypes.h
Commit 5c7aca6a4c8c93f1af3cdac676151f8d7e28a410 by craig.topper
[X86] Ignore large code model in X86FastISel::X86MaterializeFP in 32-bit mode

Large code model doesn't mean anything to 32-bit mode. But nothing
prevents it from being set. Ignore to avoid generating 64-bit mode
only instructions.

Differential Revision: https://reviews.llvm.org/D80768
The file was modifiedllvm/lib/Target/X86/X86FastISel.cpp
The file was modifiedllvm/test/CodeGen/X86/fast-isel-constpool.ll
Commit 61412b762df79328fa29dafdd1f8cc35792693ec by spatel
[SLP] auto-generate complete test checks; NFC
The file was modifiedllvm/test/Transforms/SLPVectorizer/X86/scheduling.ll
Commit 81443ac1bc710c89565ea1bce0eb566bf2cacd0d by sbc
[WebAssembly] Add placeholders for R_WASM_TABLE_INDEX_REL_SLEB relocations

Previously in the object format we punted on this and simply wrote
zeros (and didn't include the function in the elem segment).  With
this change we write a meaningful value which is the segment
relative table index of the associated function.

This matches the that wasm-ld produces in `-r` mode.  This inconsistency
between the output the MC object writer and the wasm-ld object
writer could cause warnings to be emitted when reading back in the
output of `wasm-ld -r`.  See:
https://github.com/emscripten-core/emscripten/issues/11217

This only applies to this one relocation type which is only generated
when compiling in PIC mode.

Differential Revision: https://reviews.llvm.org/D80774
The file was modifiedlld/wasm/InputFiles.h
The file was modifiedllvm/test/MC/WebAssembly/reloc-pic.s
The file was modifiedlld/wasm/InputFiles.cpp
The file was modifiedllvm/lib/MC/WasmObjectWriter.cpp
Commit 3a574a6cb35953e538e577a88f62af8dd01432c7 by gribozavr
Add support for Overloaded Binary Operators in SyntaxTree

Reviewers: gribozavr2

Subscribers: cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D80812
The file was modifiedclang/lib/Tooling/Syntax/BuildTree.cpp
The file was modifiedclang/unittests/Tooling/Syntax/TreeTest.cpp
Commit c710bb44a6b4b367b506ca2ef0f1d2af5a92feef by ehudkatz
[Local] Prevent `invertCondition` from creating a redundant instruction

Prevent `invertCondition` from creating the inversion instruction, in
case the given value is an argument which has already been inverted.
Note that this approach has already been taken in case the given value
is an instruction (and not an argument).

Differential Revision: https://reviews.llvm.org/D80399
The file was modifiedllvm/test/Transforms/StructurizeCFG/bug36015.ll
The file was modifiedllvm/test/Transforms/StructurizeCFG/loop-multiple-exits.ll
The file was modifiedllvm/lib/Transforms/Utils/Local.cpp
The file was modifiedllvm/test/Transforms/StructurizeCFG/workarounds/needs-fr-ule.ll
The file was modifiedllvm/test/Transforms/StructurizeCFG/post-order-traversal-bug.ll
The file was modifiedllvm/test/Transforms/StructurizeCFG/one-loop-multiple-backedges.ll
Commit d2befc66336d4d4c014be11d40e8ed6d3140fd36 by ctetreau
[SVE] Eliminate calls to default-false VectorType::get() from Vectorize

Reviewers: efriedma, c-rhodes, david-arm, fhahn

Reviewed By: david-arm

Subscribers: tschuett, hiraditya, rkruppe, psnobl, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D80339
The file was modifiedllvm/lib/Transforms/Vectorize/LoopVectorize.cpp
The file was modifiedllvm/lib/Transforms/Vectorize/LoadStoreVectorizer.cpp
The file was modifiedllvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
The file was modifiedllvm/lib/Transforms/Vectorize/LoopVectorizationLegality.cpp
Commit e7102eed20d969c7e75b7d3dc5192290f733797a by SourabhSingh.Tomar
[DWARF5] Added support for .debug_macro.dwo section in llvm-dwarfdump

This patch extends the parsing and dumping support of llvm-dwarfdump
for debug_macro.dwo section.

Following forms are supported:

- DW_MACRO_define
- DW_MACRO_undef
- DW_MACRO_start_file
- DW_MACRO_end_file
- DW_MACRO_define_strx
- DW_MACRO_undef_strx
- DW_MACRO_define_strp
- DW_MACRO_undef_strp

Reviewed by: ikudrin, dblaikie

Differential Revision: https://reviews.llvm.org/D78500
The file was addedllvm/test/DebugInfo/X86/debug-macro-strx-dwo.s
The file was addedllvm/test/DebugInfo/X86/debug-macro-strp-dwo.s
The file was modifiedllvm/include/llvm/DebugInfo/DWARF/DWARFContext.h
The file was modifiedllvm/include/llvm/DebugInfo/DWARF/DWARFObject.h
The file was modifiedllvm/lib/DebugInfo/DWARF/DWARFContext.cpp
Commit b47403c0a4c532554cf3d67ed1669fe00530aab3 by SourabhSingh.Tomar
[DWARF5] Replace emission of strp with stx forms in debug_macro section

DW_MACRO_define_strx forms are supported now in llvm-dwarfdump and these
forms can be used in both debug_macro[.dwo] sections. An added advantage
for using strx forms over strp forms is that it uses indices
approach instead of a relocation to debug_str section.

This patch unify the emission for debug_macro section.

Reviewed by: dblaikie, ikudrin

Differential Revision: https://reviews.llvm.org/D78865
The file was modifiedllvm/test/DebugInfo/X86/debug-macro-v5.ll
The file was modifiedllvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
Commit 9534192c3bfd861f8082843c57dfee0a7881d266 by ntv
[mlir][Linalg] Make contraction vectorization use vector transfers

This revision replaces the load + vector.type_cast by appropriate vector transfer
operations. These play more nicely with other vector abstractions and canonicalization
patterns and lower to load/store with or without masks when appropriate.

Differential Revision: https://reviews.llvm.org/D80809
The file was modifiedmlir/lib/Dialect/Linalg/Transforms/Vectorization.cpp
The file was modifiedmlir/test/Dialect/Linalg/transform-patterns.mlir
Commit a5202949134c3b8da108e04043a5c4350309ad1b by Stanislav.Mekhanoshin
[AMDGPU] Regenrated urem/udiv global isel tests. NFC.
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/urem.i64.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/udiv.i64.ll
Commit f881c7967dbeaa5a5f2d80b4216efa072afbf6cb by ehudkatz
[tests] Fix AMDGPU test

Fix naming issue in test due to change D80399.
The file was modifiedllvm/test/CodeGen/AMDGPU/multi-divergent-exit-region.ll
Commit 2d2627d47a1fc1f966d058aadc18099038be5af0 by Matthew.Arsenault
AMDGPU: Remove fp-exceptions feature

This was never used, and the only thing it changed was removed in
284472be6da3353d81dfd25b1ac4218e852d1e5f. The floating point mode is
also not a property of the subtarget.
The file was modifiedllvm/lib/Target/AMDGPU/AMDGPUSubtarget.cpp
The file was modifiedllvm/lib/Target/AMDGPU/AMDGPUSubtarget.h
The file was modifiedllvm/test/CodeGen/AMDGPU/fcanonicalize-elimination.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/clamp.ll
The file was modifiedllvm/lib/Target/AMDGPU/AMDGPU.td
Commit e6a404fbe7270d22541b45d48ca29fea5c3510aa by Jonas Devlieghere
[lldb/CMake] Set both the BUILD and INSTALL RPATH on macOS (2/2)

This is also needed for lldb-test.
The file was modifiedlldb/tools/lldb-test/CMakeLists.txt
Commit 6f56a586c505bd587106a9b94388d70efb88155b by paul_hoad
[clang-format] Create a python documentation tool to generate a summary of the clang-format status for the whole of the LLVM project

Summary:
Any change to clang-format is tested with the unit tests, However sometimes the better approach is to run it over a very large fully formatted source tree and then inspect the differences. This seems to be a source of many of the regressions found by @krasimir  and by @sylvestre.ledru and @Abpostelnicu who run it over the Mozilla sources, but often these regressions are only found after changes have been committed.

LLVM itself would be a good dog-fooding candidate for similar tests except such a large proportion of the tree is not 100% clang formatted, as such you are never aware if the change comes from a change to clang-format or  just because the tree has not been formatted first.

The following review is for a small python tool which scans the whole of the LLVM source tree and counts the number of files which have one or more clang-format violations.

This revision contains the tool and the output from the initial run of the tool and the generated documentation which looks like the following

Reviewers: krasimir, JakeMerdichAMD, sammccall, curdeius, bollu, alexshap, jdoerfert, DavidTruby, sscalpone

Reviewed By: curdeius

Subscribers: dschuff, aheejin, fedor.sergeev, ilya-biryukov, simoncook, cryptoad, arphaman, jfb, kadircet, mstorsjo, s.egerton, usaxena95, aartbik, phosek, sstefan1, cfe-commits, sylvestre.ledru, Abpostelnicu, krasimir

Tags: #clang, #clang-format

Differential Revision: https://reviews.llvm.org/D80627
The file was addedclang/docs/tools/generate_formatted_state.py
The file was modifiedclang/docs/ClangFormat.rst
The file was addedclang/docs/ClangFormattedStatus.rst
The file was modifiedclang/docs/index.rst
Commit 80e107ccd088a2705d0e776799a8815a58061cb3 by zequanwu
Add NoMerge MIFlag to avoid MIR branch folding

Let the codegen recognized the nomerge attribute and disable branch folding when the attribute is given

Differential Revision: https://reviews.llvm.org/D79537
The file was modifiedllvm/lib/Target/RISCV/RISCVISelLowering.cpp
The file was addedllvm/test/CodeGen/AArch64/nomerge.ll
The file was addedllvm/test/CodeGen/RISCV/nomerge.ll
The file was modifiedllvm/include/llvm/CodeGen/TargetLowering.h
The file was modifiedllvm/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.cpp
The file was addedllvm/test/CodeGen/ARM/nomerge.ll
The file was modifiedllvm/lib/CodeGen/MachineInstr.cpp
The file was modifiedllvm/lib/CodeGen/BranchFolding.cpp
The file was modifiedllvm/include/llvm/CodeGen/SelectionDAG.h
The file was modifiedllvm/lib/CodeGen/MIRPrinter.cpp
The file was modifiedllvm/lib/Target/ARM/ARMISelLowering.cpp
The file was modifiedllvm/include/llvm/CodeGen/MachineInstr.h
The file was modifiedllvm/lib/Target/PowerPC/PPCISelLowering.cpp
The file was addedllvm/test/CodeGen/PowerPC/nomerge.ll
The file was addedllvm/test/CodeGen/X86/nomerge.ll
The file was modifiedllvm/lib/Target/AArch64/AArch64ISelLowering.cpp
The file was modifiedllvm/lib/Target/PowerPC/PPCISelLowering.h
The file was modifiedllvm/lib/Target/X86/X86ISelLowering.cpp
Commit 1a5c97f3a4b88438b19ff34a285e559e57b1e9d4 by Jan Korous
[ASTMatchers] Matchers related to C++ inheritance

Differential Revision: https://reviews.llvm.org/D79063
The file was modifiedclang/unittests/ASTMatchers/ASTMatchersNarrowingTest.cpp
The file was modifiedclang/include/clang/ASTMatchers/ASTMatchers.h
The file was modifiedclang/docs/LibASTMatchersReference.html
The file was modifiedclang/lib/ASTMatchers/ASTMatchersInternal.cpp
The file was modifiedclang/lib/ASTMatchers/Dynamic/Registry.cpp
The file was modifiedclang/lib/AST/ASTTypeTraits.cpp
The file was modifiedclang-tools-extra/clang-tidy/misc/NonPrivateMemberVariablesInClassesCheck.cpp
The file was modifiedclang/include/clang/AST/ASTTypeTraits.h
The file was modifiedclang/include/clang/ASTMatchers/ASTMatchersInternal.h
Commit 6f6e91d19337315548f550479f94cbc0af93c8fe by flo
[Matrix] Implement + and - operators for MatrixType.

This patch implements the + and - binary operators for values of
MatrixType. It adds support for matrix +/- matrix, scalar +/- matrix and
matrix +/- scalar.

For the matrix, matrix case, the types must initially be structurally
equivalent. For the scalar,matrix variants, the element type of the
matrix must match the scalar type.

Reviewers: rjmccall, anemet, Bigcheese, rsmith, martong

Reviewed By: rjmccall

Differential Revision: https://reviews.llvm.org/D76793
The file was addedclang/test/Sema/matrix-type-operators.c
The file was modifiedclang/lib/Sema/SemaExpr.cpp
The file was modifiedclang/include/clang/Sema/Sema.h
The file was modifiedllvm/include/llvm/IR/MatrixBuilder.h
The file was modifiedclang/include/clang/AST/Type.h
The file was modifiedclang/lib/CodeGen/CGExprScalar.cpp
The file was modifiedclang/lib/Sema/SemaOverload.cpp
The file was addedclang/test/SemaCXX/matrix-type-operators.cpp
The file was addedclang/test/CodeGen/matrix-type-operators.c
The file was addedclang/test/CodeGenCXX/matrix-type-operators.cpp
Commit f66a43c11a7899d5c578b80d7f154abcea3b8d8e by Stanislav.Mekhanoshin
Process gep (phi ptr1, ptr2) in SROA

Differential Revision: https://reviews.llvm.org/D79218
The file was modifiedllvm/lib/Transforms/Scalar/SROA.cpp
The file was addedllvm/test/Transforms/SROA/phi-gep.ll
Commit 6a4714030e467293e839433a6754685ed3bdc108 by tbosch
[DebugInfo][DAG] Don't reuse debug location on COPY if width changes.

Summary:
This caused incorrect debug information for parameters:
Previously, after a COPY of a parameter that changes the width,
we would emit a DBG_VALUE that continues to be associated to that
parameter, even though it now used a different width.
This made the LiveDebugValues pass assume the parameter value
got clobbered and it stopped tracking the parameter entry
value, leading to incorrect debug information.

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

Subscribers: aprantl, hiraditya, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D80819
The file was modifiedllvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
The file was addedllvm/test/DebugInfo/X86/dbg-value-funcarg3.ll
Commit 248410937899d99f6f258d7299ec6fae0f98d900 by Matthew.Arsenault
AMDGPU/GlobalISel: Add boilerplate for inline asm lowering

Test mostly from minor adjustments to the AArch64 one.
The file was modifiedllvm/lib/Target/AMDGPU/AMDGPUSubtarget.h
The file was addedllvm/test/CodeGen/AMDGPU/GlobalISel/irtranslator-inline-asm.ll
The file was modifiedllvm/lib/Target/AMDGPU/AMDGPUSubtarget.cpp
Commit af852d6f3638fead78af9048503a67cf7b308eb6 by Stanislav.Mekhanoshin
Revert "Process gep (phi ptr1, ptr2) in SROA"

This reverts commit f66a43c11a7899d5c578b80d7f154abcea3b8d8e.
The file was removedllvm/test/Transforms/SROA/phi-gep.ll
The file was modifiedllvm/lib/Transforms/Scalar/SROA.cpp
Commit 8d8f8b353175b50dfdb1e2d5f3c0ada0a4ad25ed by Jonas Devlieghere
[lldb/Test] Don't leak forked processes on Darwin

We are leaking forked processes on macOS because the cleanup function
was checking the existence of /proc/pid which does not exist on macOS.
I've changed the code to be platform agnostic.
The file was modifiedlldb/packages/Python/lldbsuite/test/lldbtest.py
Commit 2d7fdab8e39fa3108f05cb3ff4af1a057f501c87 by maskray
[CMake] Change target 'check' from 'check-llvm' to 'check-all'

Reviewed By: echristo, mehdi_amini

Differential Revision: https://reviews.llvm.org/D80823
The file was modifiedllvm/test/CMakeLists.txt
Commit 881c5eef98a6c3fa59907ba2eefa6e8d086394a6 by maskray
[ELF] Add -z rel and -z rela

LLD supports both REL and RELA for static relocations, but emits either
of REL and RELA for dynamic relocations. The relocation entry format is
specified by each psABI.

musl ld.so supports both REL and RELA. For such ld.so implementations,
REL (.rel.dyn .rel.plt) has size benefits even if the psABI chooses RELA:
sizeof(Elf64_Rel)=16 < sizeof(Elf64_Rela)=24.

* COPY, GLOB_DAT and J[U]MP_SLOT always have 0 addend. A ld.so
  implementation does not need to read the implicit addend.
  REL is strictly better.
* A RELATIVE has a non-zero addend. Such relocations can be packed
  compactly with the RELR relocation entry format, which is out of scope
  of this patch.
* For other dynamic relocation types (e.g. symbolic relocation R_X86_64_64),
  a ld.so implementation needs to read the implicit addend. REL may have
  minor performance impact, because reading implicit addends forces
  random access reads instead of being able to blast out a bunch of
  writes while chasing the relocation array.

This patch adds -z rel and -z rela to change the relocation entry format
for dynamic relocations. I have tested that a -z rel produced x86-64
executable works with musl ld.so

-z rela may be useful for debugging purposes on processors whose psABIs
specify REL as the canonical format: addends can be easily read by a tool.

Reviewed By: grimar, mcgrathr

Differential Revision: https://reviews.llvm.org/D80496
The file was modifiedlld/ELF/Driver.cpp
The file was addedlld/test/ELF/i386-zrel-zrela.s
The file was addedlld/test/ELF/x86-64-zrel-zrela.s
The file was modifiedlld/docs/ld.lld.1