Changes

Summary

  1. [SelectionDAG] Remove default for 'unsigned' Alignment for getLoad/getStore/getExtLoad/getTruncStore. Add default for MaybeAlign version. NFCI (details)
  2. GCOVProfiling: Avoid use-after-move (details)
  3. Correct end-of-namespace comment to be clang-tidy/LLVM style appropriate (details)
  4. PPCInstrInfo: Fix readability-inconsistent-declaration-parameter-name clang-tidy warning (details)
  5. [ARM] Add some fmin/fmax tests with commuted operands (NFC) (details)
  6. [llvm-cov gcov] Add -r (--relative-only) && -s (--source-prefix) (details)
  7. [llvm-cov gcov][test] Unsupport Windows (details)
  8. [JITLink] Improve formatting for Edge, Block and Symbol debugging output. (details)
  9. [SelectionDAG] Move ISD:PARITY formation from DAGCombine to SimplifyDemandedBits. (details)
  10. [docs] Document LLVM_EXTERNALIZE_DEBUGINFO CMake option (details)
  11. [CodeGenPrepare] Fix zapping dead operands of assume (details)
  12. [AST][FPEnv] Keep FP options in trailing storage of CastExpr (details)
  13. [llvm-cov gcov] Refactor counting and reporting (details)
  14. [analyzer] Evaluate PredefinedExpressions (details)
  15. [analyzer][docs][NFC] Document the ento namespace in the llvm/Lexicon (details)
  16. [analyzer][z3] Use more elaborate Z3 variable names (details)
  17. [CodeGen] Fix bug in IncrementPointer (details)
  18. [ARM] Fix so immediates and pc relative checks (details)
  19. [UnifyLoopExits] Fix non-deterministic iteration order (details)
  20. [compiler-rt] [netbsd] Use internal_ptrace() instead of ptrace() (details)
  21. [JumpThreading] Fix an incorrect Modified status (details)
  22. AMDGPU/GlobalISel/Emitter Support for predicate code that uses operands (details)
  23. [clangd] Add error() function for creating formatv-style llvm::Errors. NFC (details)
  24. [gn build] Port 30667c967d3 (details)
  25. [DebugInstrRef][1/9] Add fields for instr-ref variable locations (details)
  26. [clangd] Track tweaks that fail the apply stage (details)
  27. [CodeGen][X86] Regenerate minmax reduction sequence tests to match arithmetic tests. (details)
  28. [clangd] makeStringError,make_error<StringError> -> error() (details)
  29. [LegalizeDAG] Fix MSVC "result of 32-bit shift implicitly converted to 64 bits" warning. NFCI. (details)
  30. AMDGPU/GlobalISel Add test for non-leaf complex patterns (details)
  31. AMDGPU/GlobalISel/Emitter Recognize additional 'same operand checks' (details)
  32. AMDGPU/GlobalISel Check for NoNaNsFPMath in isKnownNeverSNaN (details)
  33. [SVE] In LoopIdiomRecognize::isLegalStore bail out for scalable vectors (details)
  34. [ARM][MVE] Tail-predication: check get.active.lane.mask's TC value (details)
  35. [SyntaxTree][List] Fix: `ParameterDeclarationList` is the `List` inside `ParametersAndQualifiers` (details)
  36. [SyntaxTree] Provide `List::classof` (details)
  37. [SyntaxTree][List] `assertInvariants` for `List`s (details)
  38. [ARM] Selects SSAT/USAT from correct LLVM IR (details)
  39. [DSE] Precommit test case for invalid elimination of store in loop. (details)
  40. [DSE] Only eliminate candidates that always store the same loc. (details)
  41. [CGP] Limit converting phi types to simple loads and stores (details)
  42. [mlir] Check for type conversion success in std->llvm function conversion (details)
  43. [pstl] Support Threading Building Blocks 2020 (oneTBB) for "tbb" parallel backend. (details)
  44. [llvm-readobj/elf][test] - Test all core note types properly. (details)
  45. [llvm-readelf/obj] - Refine and generalize the code that is used to dump notes. (details)
  46. [NFC] Add missing `const` statements in SCEV (details)
  47. [llvm-readobj] - Cleanup implementation LLVMStyle<ELFT>::printAddrsig(). (details)
  48. [llvm-readobj/elf] - Don't use unwrapOrError when reporting errors about SHT_DYNAMIC sections. (details)
  49. Don't dereference from a dyn_cast<>. NFCI. (details)
  50. Assert we've found both vector types. NFCI. (details)
  51. [AMDGPU] Don't cluster stores (details)
  52. [InstSimplify] fix miscompiles with maximum/minimum intrinsics (details)
  53. [ARM] Enable tail predication for reduction tests. NFC (details)
  54. [XCOFF][AIX] Handle TOC entries that could not be reached by positive range in small code model (details)
  55. [InstSimplify] fix test comments; NFC (details)
  56. [InstSimplify] add/move tests for fmin/fmax; NFC (details)
  57. [InstSimplify] reduce code duplication for fmin/fmax folds; NFC (details)
  58. Add support for casting elements in vectors for certain Std dialect type conversion operations. (details)
  59. [libcxx] ostream{,buf}_iterator::difference_type changes in C++20 (details)
  60. Assert we've found the size of each (non-overlapping) structure. NFCI. (details)
  61. [MemorySSA] Precommit test case for PR47498. (details)
  62. [MemorySSA] Make sure PerformedPhiTrans is updated for each visited def. (details)
  63. [InstSimplify] allow folds for fmin/fmax with 'ninf' (details)
  64. Sema: add support for `__attribute__((__swift_objc_members__))` (details)
  65. [InstSimplify] add folds for fmin/fmax with 'nnan' (details)
  66. [flang] Correctly detect overlapping integer cases (details)
  67. [libc] Decouple string functions. (details)
  68. [ELF] Define a reportRangeError() overload for thunks and tidy up recent PPC64 thunk range errors (details)
  69. [flang] Fix analyzed form of type-bound assignment (details)
  70. Let -basic-block-sections=labels emit basicblock metadata in a new .bb_addr_map section, instead of emitting special unary-encoded symbols. (details)
  71. collectBitParts - use const references. NFCI. (details)
  72. Retry of D84974 (details)
  73. [libc++] Upgrade the Clang on build bots (details)
  74. Fix 132e57bc597bd3f50174b7d286c43f76b47f11c1 (details)
  75. [DAGCombiner] Fold fmin/fmax with INF / FLT_MAX (details)
  76. [InstCombine] Simplify select operand based on equality condition (details)
  77. [ms] [llvm-ml] Add missing built-in type aliases (details)
  78. [ms] [llvm-ml] Fix struct padding logic (details)
  79. [ms] [llvm-ml] Add support for size queries in MASM (details)
  80. [ms] [llvm-ml] Add basic support for SEH, including PROC FRAME (details)
  81. [ARM] Add more tests for vecreduce soft float legalization (NFC) (details)
  82. [Legalize][ARM][X86] Add float legalization for VECREDUCE (details)
  83. [libc] Extend MPFRMatcher to handle 2-input-1-output and support hypot function. (details)
  84. [libc++] Use LLVM 11 instead of trunk on build bots (details)
  85. [AArch64] Add additional vecreduce fmax/fmin legalization tests (NFC) (details)
  86. [PowerPC] Implement Thread Local Storage Support for Local Exec (details)
  87. [ELF] Add documentation for --warn-backrefs: a GNU ld compatibility checking tool (and lesser of layering detection) (details)
Commit 8889faaed0b7c8545b67b040c380b983264ebc67 by craig.topper
[SelectionDAG] Remove default for 'unsigned' Alignment for getLoad/getStore/getExtLoad/getTruncStore. Add default for MaybeAlign version. NFCI

We want to remove the unsigned signatures eventually. This change
migrates any that don't explicitly pass an alignment.
The file was modifiedllvm/include/llvm/CodeGen/SelectionDAG.h
Commit 6e06f1cd0816b03d9336083667a0c71760d6b99f by dblaikie
GCOVProfiling: Avoid use-after-move

Turns out this was use-after-move of function_ref, which is trivially
copyable and movable, so the move did nothing and use after move was
safe.

But since this function_ref is being copied into a std::function, change
the function_ref to be std::function to avoid extra layers of type
erasure indirection - and then it's a real use after move, and fix that
by referring to the moved-to member variable rather than the moved-from
parameter.
The file was modifiedllvm/lib/Transforms/Instrumentation/GCOVProfiling.cpp
Commit 7940af02baa27e23ebbd9cd09b24ef1b24ea8cec by dblaikie
Correct end-of-namespace comment to be clang-tidy/LLVM style appropriate
The file was modifiedllvm/include/llvm/Transforms/Instrumentation/GCOVProfiler.h
Commit ce89eeee16dd1e7ca6eead3b9d7f256ca583f6e1 by dblaikie
PPCInstrInfo: Fix readability-inconsistent-declaration-parameter-name clang-tidy warning

Reduces the chance of confusion when calling the function with
autocomplete (will show the more accurate/informative variable name),
etc.
The file was modifiedllvm/lib/Target/PowerPC/PPCInstrInfo.h
Commit cb3e1dd6c31ef0e0c83dcd1b4ef0b65a8b75a673 by nikita.ppv
[ARM] Add some fmin/fmax tests with commuted operands (NFC)

As well as vector commuted operands.
The file was modifiedllvm/test/CodeGen/ARM/fminmax-folds.ll
Commit b2c32c90bab09a6e2c1f370429db26017a182143 by i
[llvm-cov gcov] Add -r (--relative-only) && -s (--source-prefix)

gcov 4.7 introduced the two options.
https://sourceware.org/pipermail/gcc-patches/2011-November/328782.html

-r only dumps files with relative paths or absolute paths with the prefix
specified by -s. The two options are useful filtering out system header files.
The file was addedllvm/test/tools/llvm-cov/gcov/relative-only.test
The file was addedllvm/test/tools/llvm-cov/gcov/Inputs/abs-path.gcda
The file was modifiedllvm/include/llvm/ProfileData/GCOV.h
The file was modifiedllvm/tools/llvm-cov/gcov.cpp
The file was modifiedllvm/lib/ProfileData/GCOV.cpp
The file was addedllvm/test/tools/llvm-cov/gcov/Inputs/abs-path.gcno
Commit 44664a54483def1692ea75925bfce0053e76bef0 by i
[llvm-cov gcov][test] Unsupport Windows
The file was modifiedllvm/test/tools/llvm-cov/gcov/relative-only.test
Commit 783ba64a8950768d412555abd52bbc65156d4fb5 by Lang Hames
[JITLink] Improve formatting for Edge, Block and Symbol debugging output.
The file was modifiedllvm/lib/ExecutionEngine/JITLink/JITLink.cpp
Commit 56b33391d3a42ef8e6fd1bcdcbcbb72bfb562092 by craig.topper
[SelectionDAG] Move ISD:PARITY formation from DAGCombine to SimplifyDemandedBits.

Previously, we formed ISD::PARITY by looking for (and (ctpop X), 1)
but the AND might be separated from the ctpop. For example if the
parity result is multiplied by 2, we'll pull the AND through the
shift.

So to handle more cases, move to SimplifyDemandedBits where we
can handle more cases that result in only the LSB of the CTPOP
being used.
The file was modifiedllvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
The file was modifiedllvm/test/CodeGen/X86/parity.ll
The file was modifiedllvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
The file was modifiedllvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
Commit 6e42cadf106ccdc7759dd8af113ecf797220de47 by davelee.com
[docs] Document LLVM_EXTERNALIZE_DEBUGINFO CMake option

Add `LLVM_EXTERNALIZE_DEBUGINFO` to CMake.rst. This should help make dSYM
generation more discoverable.

Differential Revision: https://reviews.llvm.org/D87591
The file was modifiedllvm/docs/CMake.rst
Commit 88690a965892e82cac05a162a9d10e2ce4e2355f by yrouban
[CodeGenPrepare] Fix zapping dead operands of assume

This patch fixes a problem of the commit 52cc97a0.
A test case is created to demonstrate the crash caused by
the instruction iterator invalidated by the recursive
removal of dead operands of assume. The solution restarts
from the blocks's first instruction in case CurInstIterator
is invalidated by RecursivelyDeleteTriviallyDeadInstructions().

Reviewed By: bkramer

Differential Revision: https://reviews.llvm.org/D87434
The file was modifiedllvm/lib/CodeGen/CodeGenPrepare.cpp
The file was addedllvm/test/Transforms/CodeGenPrepare/X86/recursively-delete-dead-instructions.ll
Commit f1cd6593da3ad763eb3f7aaf7761d06fb303493a by sepavloff
[AST][FPEnv] Keep FP options in trailing storage of CastExpr

This is recommit of 6c8041aa0f, reverted in de044f7562 because of some
fails. Original commit message is below.

This change allow a CastExpr to have optional FPOptionsOverride object,
stored in trailing storage. Of all cast nodes only ImplicitCastExpr,
CStyleCastExpr, CXXFunctionalCastExpr and CXXStaticCastExpr are allowed
to have FPOptions.

Differential Revision: https://reviews.llvm.org/D85960
The file was modifiedclang/lib/Serialization/ASTWriterDecl.cpp
The file was modifiedclang/include/clang/AST/Expr.h
The file was modifiedclang/lib/Sema/SemaOpenMP.cpp
The file was modifiedclang/lib/Analysis/BodyFarm.cpp
The file was modifiedclang/lib/Serialization/ASTReaderStmt.cpp
The file was modifiedclang/include/clang/Basic/LangOptions.h
The file was modifiedclang/test/AST/ast-dump-fpfeatures.cpp
The file was modifiedclang/lib/CodeGen/CGObjC.cpp
The file was modifiedclang/lib/Sema/SemaInit.cpp
The file was modifiedclang/lib/Sema/SemaStmt.cpp
The file was modifiedclang/include/clang/AST/ExprCXX.h
The file was modifiedclang/lib/Sema/Sema.cpp
The file was modifiedclang/lib/Serialization/ASTWriterStmt.cpp
The file was modifiedclang/lib/Sema/SemaDecl.cpp
The file was modifiedclang/lib/AST/ExprCXX.cpp
The file was modifiedclang/lib/Sema/SemaExprCXX.cpp
The file was modifiedclang/include/clang/AST/TextNodeDumper.h
The file was modifiedclang/lib/Sema/SemaLambda.cpp
The file was modifiedclang/lib/Sema/SemaTemplate.cpp
The file was modifiedclang/lib/Sema/SemaOverload.cpp
The file was modifiedclang/lib/Sema/SemaObjCProperty.cpp
The file was modifiedclang/lib/AST/TextNodeDumper.cpp
The file was modifiedclang/include/clang/AST/ExprObjC.h
The file was modifiedclang/lib/Frontend/Rewrite/RewriteModernObjC.cpp
The file was modifiedclang/lib/Frontend/Rewrite/RewriteObjC.cpp
The file was modifiedclang/lib/Sema/SemaExprObjC.cpp
The file was modifiedclang/lib/CodeGen/CGBlocks.cpp
The file was modifiedclang/lib/Sema/SemaCast.cpp
The file was modifiedclang/lib/CodeGen/CGStmtOpenMP.cpp
The file was modifiedclang/include/clang/AST/Stmt.h
The file was modifiedclang/lib/AST/ASTImporter.cpp
The file was modifiedclang/lib/Sema/SemaDeclCXX.cpp
The file was modifiedclang/lib/Sema/SemaExpr.cpp
The file was modifiedclang/lib/AST/Expr.cpp
Commit 4d7b19454397103620394dcceaf29592ef195231 by i
[llvm-cov gcov] Refactor counting and reporting

The current organization of FileInfo and its referenced utility functions of
(GCOVFile, GCOVFunction, GCOVBlock) is messy. Some members of FileInfo are just
copied from GCOVFile. FileInfo::print (.gcov output and --intermediate output)
is interleaved with branch statistics and computation of line execution counts.
--intermediate has to do redundant .gcov output to gather branch statistics.

This patch deletes lots of code and introduces a clearer work flow:

```
fn collectFunction
  for each block b
    for each line lineNum
      let line be LineInfo of the file on lineNum
      line.exists = 1
      increment function's lines & linesExec if necessary
      increment line.count
      line.blocks.push_back(&b)

fn collectSourceLine
  compute cycle counts
  count = incoming_counts + cycle_counts
  if line.exists
    ++summary->lines
    if line.count
      ++summary->linesExec

fn collectSource
  for each line
    call collectSourceLine

fn main
  for each function
    call collectFunction
    print function summary
  for each source file
    call collectSource
    print file summary
    annotate the source file with line execution counts
  if -i
    print intermediate file
```

The output order of functions and files now follows the original order in
.gcno files.
The file was modifiedllvm/include/llvm/ProfileData/GCOV.h
The file was modifiedllvm/tools/llvm-cov/gcov.cpp
The file was modifiedllvm/lib/ProfileData/GCOV.cpp
The file was modifiedllvm/test/tools/llvm-cov/llvm-cov.test
The file was modifiedllvm/test/tools/llvm-cov/gcov-fake-4.2.c
Commit 163863604f9c1ad3add238f9e8fb32cfd136f894 by benicsbalazs
[analyzer] Evaluate PredefinedExpressions

We did not evaluate such expressions, just returned `Unknown` for such cases.
After this patch, we will be able to access a unique value identifying a template instantiation via the value of the `PRETTY_FUNCTION` predefined expression.

Reviewed By: vsavchenko

Differential Revision: https://reviews.llvm.org/D87004
The file was addedclang/test/Analysis/eval-predefined-exprs.cpp
The file was modifiedclang/lib/StaticAnalyzer/Core/Environment.cpp
The file was modifiedclang/lib/StaticAnalyzer/Core/SValBuilder.cpp
Commit d7ae9696e31f6484de4ff4c10bca144d7e61320c by benicsbalazs
[analyzer][docs][NFC] Document the ento namespace in the llvm/Lexicon

Document the `ento` namespace in the Lexicon according to @nicolas17 on the
mailing list (http://lists.llvm.org/pipermail/cfe-dev/2020-August/066577.html).

The analyzer lived at different namespaces at different times.
Originally lived at the `GR` aka. (Graph Reachability)  namespace [7], later it
moved under the `ento` namespace [9].

The Static Analyzer's code lived at many other places as well:
`Analysis` -[2]-> `Checker` -[5]-> `GR` -[10]> `entoSA` -[11]-> `StaticAnalyzer`

The relevant code motion, refactor commits, cfe-dev mailing in chronological
order:
1) 2008-03-15 Make a major restructuring of the clang tree: introduce a ...
    7a51313d8a0a358bb92eb5dbf8fd846b7c48e7fe
2) 2010-01-25 Split libAnalysis into two libraries: libAnalysis and libChecker
    d6b8708643219776b1f0f41df32c5eccf065ed5b
3) 2010-12-21 Reorganization of Checker files
    http://lists.llvm.org/pipermail/cfe-dev/2010-December/012694.html
4) 2010-12-22 Refactoring: include/clang/Checker -> include/clang/GR
    8d602a8aa8e6697509465d8a5473fc41cb1a382e
5) 2010-12-22 Refactoring: lib/Checker -> lib/GR
    2ff5ab1516e48c2fff0138f953d887b5e695214b
6) 2010-12-22 Refactoring: Move checkers into lib/GR/Checkers and their own
    a700e976b658860418bc145ec0bdacd4f1db3264
7) 2010-12-22 Refactoring: Move stuff into namespace 'GR'
    ca08fba4141f1d3ae6193b3c81fb6ba8fb10d7dc
8) 2010-12-22 Refactoring: Drop the 'GR' prefix.
    1696f508e2fe95793ca8bb70d78b88023b6b8625
9) 2010-12-23 Rename static analyzer namespace 'GR' to 'ento'
    98857c986078c6e6a10910628dbabf75ae735b76
10) 2010-12-23 Rename headers: 'clang/GR' 'clang/EntoSA' and update Makefile
    ef33f0996c6a625767690395f3cfb41afb84db5a
11) 2010-12-23 Chris Lattner has strong opinions about directory
    d99bd55a5e092774214ba31fc5a871bfc31e711c
12) 2010-12-24 Remove the EntoSA directories.
    9d6af5328e3a61641a125b17125952fa1a6bf11d

Reviewed By: Szelethus,martong,ASDenysPetrov,xazax.hun

Differential Revision: https://reviews.llvm.org/D86446
The file was modifiedllvm/docs/Lexicon.rst
Commit cdacffe4acc083dfb1cccb6458420eed09f9d093 by benicsbalazs
[analyzer][z3] Use more elaborate Z3 variable names

Previously, it was a tedious task to comprehend Z3 dumps.
We will use the same name prefix just as we use in the corresponding dump method

For all `SymbolData` values:
    `$###` -> `conj_$###`
    `$###` -> `derived_$###`
    `$###` -> `extent_$###`
    `$###` -> `meta_$###`
    `$###` -> `reg_$###`

Reviewed By: xazax.hun,mikhail.ramalho

Differential Revision: https://reviews.llvm.org/D86223
The file was modifiedclang/lib/StaticAnalyzer/Core/SymbolManager.cpp
The file was addedclang/test/Analysis/z3/pretty-dump.c
The file was modifiedclang/include/clang/StaticAnalyzer/Core/PathSensitive/SMTConstraintManager.h
The file was modifiedclang/include/clang/StaticAnalyzer/Core/PathSensitive/SymbolManager.h
The file was modifiedclang/include/clang/StaticAnalyzer/Core/PathSensitive/SymExpr.h
The file was modifiedclang/include/clang/StaticAnalyzer/Core/PathSensitive/SMTConv.h
Commit 15bff4dec4360985a6a058a7e42a4ffd590dc665 by david.sherwood
[CodeGen] Fix bug in IncrementPointer

In an earlier patch I meant to add the correct flags to the ADD
node when incrementing the pointer, but forgot to pass them to
SelectionDAG::getNode.

Differential Revision: https://reviews.llvm.org/D87496
The file was modifiedllvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp
Commit 4946802c5f406b050cbb1524d0fd03cf3fd7b0dc by simon.wallis2
[ARM] Fix so immediates and pc relative checks

Treating an SoImm offset as a multiple of 4 between -1020 and 1020
mis-handles the second of a pair of 16-bit constants where the offset is a multiple of 2 but not a multiple of 4,
leading to an LLVM ERROR: out of range pc-relative fixup value

For 32-bit and larger (64-bit) constants, continue to treat an SoImm offset as a multiple of 4 between -1020 and 1020.
For smaller (16-bit) constants, treat an SoImm offset as a multiple of 1 between -255 and 255.

Reviewed By: efriedma

Differential Revision: https://reviews.llvm.org/D86949
The file was addedllvm/test/CodeGen/ARM/constant-island-SOImm-limit16.mir
The file was modifiedllvm/lib/Target/ARM/ARMConstantIslandPass.cpp
Commit 9a4476072e152881e00179bef2c6da9fea9b274e by jay.foad
[UnifyLoopExits] Fix non-deterministic iteration order

This was causing random minor codegen differences in shaders compiled
with the AMDGPU backend.

Differential Revision: https://reviews.llvm.org/D87548
The file was modifiedllvm/lib/Transforms/Utils/UnifyLoopExits.cpp
Commit 0008fb343704bafc3469703be930b8a65d7c47fa by n54
[compiler-rt] [netbsd] Use internal_ptrace() instead of ptrace()
The file was modifiedcompiler-rt/lib/sanitizer_common/sanitizer_stoptheworld_netbsd_libcdep.cpp
Commit bfcb824ba5287f96c5b9f1009d10af37b7eb9519 by david.stenberg
[JumpThreading] Fix an incorrect Modified status

This fixes PR47297.

When ProcessBlock() was able to constant fold the terminator's
condition, but not do any more transformations, the function would
return false, which would lead to the JumpThreading pass returning an
incorrect modified status. This patch makes so that ProcessBlock()
returns true in such cases. This will trigger an unnecessary invocation
of ProcessBlock() in such cases, but this should be rare to occur.

This was caught using the check introduced by D80916.

Reviewed By: efriedma

Differential Revision: https://reviews.llvm.org/D87392
The file was modifiedllvm/lib/Transforms/Scalar/JumpThreading.cpp
The file was addedllvm/test/Transforms/JumpThreading/constant-fold-status.ll
Commit 09b8871f8d81ce2777afe836604f392a2af9e620 by petar.avramovic
AMDGPU/GlobalISel/Emitter Support for predicate code that uses operands

Predicates with 'let PredicateCodeUsesOperands = 1' want to examine
matched operands. When we encounter predicate code that uses operands,
analyze its named operand arguments and create a map between argument
index and name. Later, when leaf node with name is encountered, emit
GIM_RecordNamedOperand that will store that operand at its argument
index in operand list. This operand list will be an argument to c++
code of the predicate.

Differential Revision: https://reviews.llvm.org/D87285
The file was modifiedllvm/lib/Target/AMDGPU/AMDGPUInstructionSelector.cpp
The file was modifiedllvm/test/TableGen/GlobalISelEmitterCustomPredicate.td
The file was modifiedllvm/test/TableGen/GlobalISelEmitter.td
The file was addedllvm/test/CodeGen/AMDGPU/GlobalISel/add_shl.ll
The file was modifiedllvm/lib/Target/AMDGPU/AMDGPUInstructionSelector.h
The file was modifiedllvm/include/llvm/CodeGen/GlobalISel/InstructionSelector.h
The file was modifiedllvm/lib/Target/AMDGPU/VOP3Instructions.td
The file was modifiedllvm/utils/TableGen/GlobalISelEmitter.cpp
The file was modifiedllvm/include/llvm/CodeGen/GlobalISel/InstructionSelectorImpl.h
Commit 30667c967d3f420d3f53fb1c9c2465550a1112df by sam.mccall
[clangd] Add error() function for creating formatv-style llvm::Errors. NFC

Summary:
This is considerably terser than the makeStringError and friends, and
avoids verbosity cliffs that discourage adding log information.

It follows the syntax used in log/elog/vlog/dlog that have been successful.

The main caveats are:
- it's strictly out-of-place in logger.h, though kind of fits thematically and
   in implementation
- it claims the "error" identifier, which seems a bit too opinionated
   to put higher up in llvm

I've updated some users of StringError mostly at random - there are lots
more mechanical changes but I'd like to get this reviewed before making
them all.

Reviewers: kbobyrev, hokein

Subscribers: mgorny, ilya-biryukov, javed.absar, MaskRay, jkorous, arphaman, kadircet, usaxena95, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D83419
The file was addedclang-tools-extra/clangd/unittests/LoggerTests.cpp
The file was modifiedclang-tools-extra/clangd/DraftStore.cpp
The file was modifiedclang-tools-extra/clangd/ClangdLSPServer.cpp
The file was modifiedclang-tools-extra/clangd/RIFF.cpp
The file was modifiedclang-tools-extra/clangd/support/Logger.cpp
The file was modifiedclang-tools-extra/clangd/PathMapping.cpp
The file was modifiedclang-tools-extra/clangd/unittests/CMakeLists.txt
The file was modifiedclang-tools-extra/clangd/ClangdServer.cpp
The file was modifiedclang-tools-extra/clangd/CodeComplete.cpp
The file was modifiedclang-tools-extra/clangd/TUScheduler.cpp
The file was modifiedclang-tools-extra/clangd/index/Serialization.cpp
The file was modifiedclang-tools-extra/clangd/support/Logger.h
The file was modifiedclang-tools-extra/clangd/JSONTransport.cpp
Commit 119e57be76266bf524a4e3b45e01dd8c2c1e9d35 by llvmgnsyncbot
[gn build] Port 30667c967d3
The file was modifiedllvm/utils/gn/secondary/clang-tools-extra/clangd/unittests/BUILD.gn
Commit d3af441dfeb69d4c2a91b427e3d7a57e04c59201 by jeremy.morse
[DebugInstrRef][1/9] Add fields for instr-ref variable locations

Add a DBG_INSTR_REF instruction and a "debug instruction number" field to
MachineInstr. The two allow variable values to be specified by
identifying where the value is computed, rather than the register it lies
in, like so:

  %0 = fooinst, debug-instr-number 1
  [...]
  DBG_INSTR_REF 1, 0

See the original RFC for motivation:
http://lists.llvm.org/pipermail/llvm-dev/2020-February/139440.html

This patch is NFCI; it only adds fields and other boiler plate.

Differential Revision: https://reviews.llvm.org/D85741
The file was modifiedllvm/include/llvm/CodeGen/MachineFunction.h
The file was modifiedllvm/include/llvm/Support/TargetOpcodes.def
The file was modifiedllvm/include/llvm/CodeGen/MachineInstr.h
The file was modifiedllvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
The file was modifiedllvm/include/llvm/Target/Target.td
The file was modifiedllvm/lib/CodeGen/MachineInstr.cpp
Commit 574dd60547179a2c143ac14cdd6f5f5a40156d54 by kadircet
[clangd] Track tweaks that fail the apply stage

Differential Revision: https://reviews.llvm.org/D87501
The file was modifiedclang-tools-extra/clangd/ClangdServer.cpp
Commit 4232bccfb461fb9bc1ca83f0cbbda2b11f92bda8 by llvm-dev
[CodeGen][X86] Regenerate minmax reduction sequence tests to match arithmetic tests.

avx512-reduceIntrin.c wasn't bothering with the exhaustive alloca/store/load/bitcast checks and avx512-reduceMinMaxIntrin.c shouldn't need to either.

This makes it a lot easier to maintain as the update script still doesn't work properly on x86 targets
The file was modifiedclang/test/CodeGen/X86/avx512-reduceMinMaxIntrin.c
Commit 687e1d7121645d23aa5e919ed4d3c0e57af975cd by sam.mccall
[clangd] makeStringError,make_error<StringError> -> error()
The file was modifiedclang-tools-extra/clangd/FindSymbols.cpp
The file was modifiedclang-tools-extra/clangd/URI.cpp
The file was modifiedclang-tools-extra/clangd/refactor/tweaks/ExtractFunction.cpp
The file was modifiedclang-tools-extra/clangd/index/YAMLSerialization.cpp
The file was modifiedclang-tools-extra/clangd/refactor/Rename.cpp
The file was modifiedclang-tools-extra/clangd/refactor/tweaks/ObjCLocalizeStringLiteral.cpp
The file was modifiedclang-tools-extra/clangd/refactor/tweaks/AddUsing.cpp
The file was modifiedclang-tools-extra/clangd/unittests/TestFS.cpp
The file was modifiedclang-tools-extra/clangd/xpc/XPCTransport.cpp
The file was modifiedclang-tools-extra/clangd/index/remote/marshalling/Marshalling.cpp
The file was modifiedclang-tools-extra/clangd/refactor/Tweak.cpp
The file was modifiedclang-tools-extra/clangd/tool/ClangdMain.cpp
The file was modifiedclang-tools-extra/clangd/refactor/tweaks/ExpandAutoType.cpp
The file was modifiedclang-tools-extra/clangd/refactor/tweaks/SwapIfBranches.cpp
The file was modifiedclang-tools-extra/clangd/refactor/tweaks/DefineOutline.cpp
The file was modifiedclang-tools-extra/clangd/refactor/tweaks/DefineInline.cpp
The file was modifiedclang-tools-extra/clangd/refactor/tweaks/RemoveUsingNamespace.cpp
The file was modifiedclang-tools-extra/clangd/IncludeFixer.cpp
The file was modifiedclang-tools-extra/clangd/Preamble.cpp
The file was modifiedclang-tools-extra/clangd/index/SymbolID.cpp
The file was modifiedclang-tools-extra/clangd/JSONTransport.cpp
The file was modifiedclang-tools-extra/clangd/index/Background.cpp
The file was modifiedclang-tools-extra/clangd/SourceCode.cpp
Commit 00e5676cf64740daf99b694d1ac968be141b655f by llvm-dev
[LegalizeDAG] Fix MSVC "result of 32-bit shift implicitly converted to 64 bits" warning. NFCI.
The file was modifiedllvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
Commit 0c8f4cd657346fcb25e99a3d2c93a7a12080d667 by petar.avramovic
AMDGPU/GlobalISel Add test for non-leaf complex patterns

GlobalIsel emitter does not import patterns where complex sub-operand
of a non-leaf complex pattern is referenced more then once. Multiple
references of complex patterns with same name and same sub-operands
represent the same operand. Document this with a test.
The file was addedllvm/test/CodeGen/AMDGPU/GlobalISel/inst-select-fract.f64.mir
Commit 416346d1ca503262983c954ddc861ff4f91347a3 by petar.avramovic
AMDGPU/GlobalISel/Emitter Recognize additional 'same operand checks'

The "name" of a non-leaf complex pattern (MY_PAT $op1, $op2) is
"MY_PAT:op1:op2" and the ones with same "name" represent same operand.
Add 'same operand check' for this case.

Differential Revision: https://reviews.llvm.org/D87351
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/inst-select-fract.f64.mir
The file was modifiedllvm/test/TableGen/GlobalISelEmitter.td
The file was modifiedllvm/utils/TableGen/GlobalISelEmitter.cpp
The file was modifiedllvm/test/TableGen/GlobalISelEmitterSkippedPatterns.td
Commit 6e2a86ed5abfdb75ba9c08ea94ed8dbd41e75c9e by petar.avramovic
AMDGPU/GlobalISel Check for NoNaNsFPMath in isKnownNeverSNaN

Check for NoNaNsFPMath function attribute in isKnownNeverSNaN.
Function attributes are in held in 'TargetMachine.Options'.
Among other things, this allows selection of some patterns imported
in D87351 since G_FCANONICALIZE is not generated when isKnownNeverSNaN
returns true in lowerFMinNumMaxNum.

However we notice some incorrect results since function attributes are
not correctly written in TargetMachine.Options when next function is
processed. Take a look at @v_test_no_global_nnans_med3_f32_pat0_srcmod0,
it has "no-nans-fp-math"="false" but TargetMachine.Options still has it
set to true since first function in test file had this attribute set to
true. This will be fixed in D87511.

Differential Revision: https://reviews.llvm.org/D87456
The file was modifiedllvm/lib/CodeGen/GlobalISel/Utils.cpp
The file was modifiedllvm/lib/Target/AMDGPU/AMDGPUInstructionSelector.cpp
The file was addedllvm/test/CodeGen/AMDGPU/GlobalISel/fmed3.ll
Commit 816663adb5f1362597c9b2947586e0847c5cdf9b by david.sherwood
[SVE] In LoopIdiomRecognize::isLegalStore bail out for scalable vectors

The function LoopIdiomRecognize::isLegalStore looks for stores in loops
that could be transformed into memset or memcpy. However, the algorithm
currently requires that we know how big the store is at runtime, i.e.
that the store size will not overflow an unsigned integer. For scalable
vectors we cannot guarantee this so I have changed the code to bail out
for now. In addition, even if we add a way to query the maximum value of
vscale in future we will still need to update the algorithm to cope with
non-constant strides. The additional cost associated with calculating
the memset and memcpy arguments will need to be taken into account as
well.

This patch also fixes up an implicit TypeSize -> uint64_t cast,
thereby removing a warning. I've added tests here showing a fixed
width vector loop being transformed into memcpy, and a scalable
vector loop remaining unchanged:

  Transforms/LoopIdiom/memcpy-vectors.ll

Differential Revision: https://reviews.llvm.org/D87439
The file was modifiedllvm/lib/Transforms/Scalar/LoopIdiomRecognize.cpp
The file was addedllvm/test/Transforms/LoopIdiom/memcpy-vectors.ll
Commit 676febc044ecbb27f8a227d351ced282cfe908cf by sjoerd.meijer
[ARM][MVE] Tail-predication: check get.active.lane.mask's TC value

This adds additional checks for the original scalar loop tripcount value, i.e.
get.active.lane.mask second argument, and perform several sanity checks to see
if it is of the form that we expect similarly like we already do for the IV
which is the first argument of get.active.lane.

Differential Revision: https://reviews.llvm.org/D86074
The file was modifiedllvm/lib/Target/ARM/MVETailPredication.cpp
The file was modifiedllvm/test/CodeGen/Thumb2/LowOverheadLoops/basic-tail-pred.ll
The file was modifiedllvm/test/CodeGen/Thumb2/LowOverheadLoops/tail-pred-const.ll
Commit 12232dc181cbe78fbd40a6ed1a89795a2c9a1154 by ecaldas
[SyntaxTree][List] Fix: `ParameterDeclarationList` is the `List` inside `ParametersAndQualifiers`

Differential Revision: https://reviews.llvm.org/D87598
The file was modifiedclang/lib/Tooling/Syntax/Tree.cpp
Commit 0f4cc64fd747fbb33aeccfaccb8873762d2511f2 by ecaldas
[SyntaxTree] Provide `List::classof`

Differential Revision: https://reviews.llvm.org/D87599
The file was modifiedclang/lib/Tooling/Syntax/Tree.cpp
The file was modifiedclang/include/clang/Tooling/Syntax/Tree.h
Commit ceb0128509c51100afbf804bda84d82b7ebe06b1 by ecaldas
[SyntaxTree][List] `assertInvariants` for `List`s

Differential Revision: https://reviews.llvm.org/D87600
The file was modifiedclang/include/clang/Tooling/Syntax/Tree.h
The file was modifiedclang/lib/Tooling/Syntax/Tree.cpp
Commit dd519bf0b074cfee2879036ec9b55452e53c9d99 by meera.nakrani
[ARM] Selects SSAT/USAT from correct LLVM IR

LLVM will canonicalize conditional selectors to a different pattern than the old code that was used.
This is updating the function to match the new expected patterns and select SSAT or USAT when successful.
Tests have also been updated to use the new patterns.

Differential Review: https://reviews.llvm.org/D87379
The file was modifiedllvm/test/CodeGen/ARM/usat.ll
The file was modifiedllvm/test/CodeGen/Thumb2/mve-satmul-loops.ll
The file was modifiedllvm/lib/Target/ARM/ARMISelLowering.cpp
The file was modifiedllvm/test/CodeGen/ARM/ssat.ll
Commit eef30334d1daaddf8b4e465be7c0f4aa4f98e208 by flo
[DSE] Precommit test case for invalid elimination of store in loop.
The file was modifiedllvm/test/Transforms/DeadStoreElimination/MSSA/multiblock-loops.ll
Commit f715d81c9df3fb3e047a54899fc749f57c84aeb5 by flo
[DSE] Only eliminate candidates that always store the same loc.

AliasAnalysis/MemoryLocation does not account for loops. Two
MemoryLocation can be must-overwrite, even if the first one writes
multiple locations in a loop.

This patch prevents removing such stores, by only considering candidates
that are known to be loop invariant, or executed in the same BB.

Currently the invariant check is quite conservative and only considers
Alloca and Alloca-like instructions and arguments as invariant base pointers.
It also considers GEPs with all constant indices and invariant bases as
invariant.

This can be improved in the future, but the current implementation has
only minor impact on the total number of stores eliminated (25903 vs
26047 for the baseline). There are some 2-10% swings for some individual
benchmarks. In roughly half of the cases, the number of stores removed
increases actually, because we skip candidates that are unlikely to be
valid candidates early.
The file was modifiedllvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
The file was modifiedllvm/test/Transforms/DeadStoreElimination/MSSA/multiblock-loops.ll
Commit 06fb4e90649f264a129d3ad2a08fd3492ee78651 by david.green
[CGP] Limit converting phi types to simple loads and stores

Instcombine limits converting phi types to simple loads and stores. This
does the same in codegenprepare, not processing phis that are not
simple.

Note that volatile loads/store ISel will happily convert between float
and int. Atomics are more likely to always be integer. This just keeps
things simple and doesn't process either.

Differential Revision: https://reviews.llvm.org/D83770
The file was modifiedllvm/test/CodeGen/AArch64/convertphitype.ll
The file was modifiedllvm/lib/CodeGen/CodeGenPrepare.cpp
Commit 5cac85c931d95f3c94f79837a3bf406eb68edaeb by zinenko
[mlir] Check for type conversion success in std->llvm function conversion

Type converter may fail and return nullptr on unconvertible types. The function
conversion did not include a check and was attempting to use a nullptr type to
construct an LLVM function, leading to a crash. Add a check and return early.
The rest of the call stack propagates errors properly.

Fixes PR47403.

Reviewed By: mehdi_amini

Differential Revision: https://reviews.llvm.org/D87075
The file was modifiedmlir/lib/Conversion/StandardToLLVM/StandardToLLVM.cpp
The file was modifiedmlir/test/Conversion/StandardToLLVM/invalid.mlir
Commit 0b2e0e80d963f3498705a38e8d02eafe541ca9d6 by mikhail.dvorskiy
[pstl] Support Threading Building Blocks 2020 (oneTBB) for "tbb" parallel backend.

After the changes the "tbb" parallel backend will work with old TBB versions(TBB_INTERFACE_VERSION <= 12000) and new ones (TBB 2020 and greater)

More about oneTBB:
https://github.com/oneapi-src/oneTBB

Phabricator Review:
https://reviews.llvm.org/D87380
The file was modifiedpstl/include/pstl/internal/parallel_backend_tbb.h
Commit f4eb94e1db88cd5ea2ffac502c9d788eedb1e547 by grimar
[llvm-readobj/elf][test] - Test all core note types properly.

Currently we don't test all core note types that are defined in
`getCoreNoteTypeName` in ELFDumper.cpp.

Also we don't have a test for an unknown core note type.

This patch fixes it.

Differential revision: https://reviews.llvm.org/D87453
The file was modifiedllvm/test/tools/llvm-readobj/ELF/note-core.test
Commit e9c314611bc97dc0d5d4ba384b8d5321f3728b16 by grimar
[llvm-readelf/obj] - Refine and generalize the code that is used to dump notes.

There is some code that can be shared between GNU/LLVM styles.
Also, this fixes 2 inconsistencies related to dumping unknown note types:
1) For GNU style we printed "Unknown note type: (0x00000003)" in some cases, and
   "Unknown note type (0x00000003)" (no colon) in other cases.
   GNU readelf always prints `:`. This patch removes the related code
   duplication and does the same.
2) For LLVM style in some cases we printed "Unknown note type (0x00000003)",
   but sometimes just "Unknown (0x00000003)". The latter is the right form, which
   is consistent with other unknowns that are printed in LLVM style.

Rebased on top of D87453.

Differential revision: https://reviews.llvm.org/D87454
The file was modifiedllvm/tools/llvm-readobj/ELFDumper.cpp
The file was modifiedllvm/test/CodeGen/AMDGPU/elf-notes.ll
The file was modifiedllvm/test/tools/llvm-readobj/ELF/note-freebsd.s
Commit 412b417bfa79d54ebea1ae8bd0fd359044a133f4 by mkazantsev
[NFC] Add missing `const` statements in SCEV
The file was modifiedllvm/include/llvm/Analysis/ScalarEvolution.h
The file was modifiedllvm/lib/Analysis/ScalarEvolution.cpp
Commit 14e191a0e7c54d40327c2367b00261ac4856f4b5 by grimar
[llvm-readobj] - Cleanup implementation LLVMStyle<ELFT>::printAddrsig().

It has following issues:
1) `getStaticSymbolName` returns `std::string`, but the code
   assigns a result to `Expected<std::string>`.
2) The code uses `unwrapOrError` and never tests the error reported.

This patch fixes these issues.

Differential revision: https://reviews.llvm.org/D87507
The file was modifiedllvm/test/tools/llvm-readobj/ELF/addrsig.test
The file was modifiedllvm/tools/llvm-readobj/ELFDumper.cpp
Commit 7448e64a790bfed10a04a550c14b91429cda07e0 by grimar
[llvm-readobj/elf] - Don't use unwrapOrError when reporting errors about SHT_DYNAMIC sections.

This changes messages reported to stop using dynamic section names (use `describe()` instead).
This allows to avoid `unwrapOrError` and improves diagnostics.

Differential revision: https://reviews.llvm.org/D87503
The file was modifiedllvm/test/tools/llvm-readobj/ELF/non-dynamic-in-pt-dynamic.test
The file was modifiedllvm/tools/llvm-readobj/ELFDumper.cpp
The file was modifiedllvm/test/tools/llvm-readobj/ELF/dynamic-not-in-pt-dynamic.test
Commit 7109fc9e42e6b9a56497dcc6a25228d818af4f38 by llvm-dev
Don't dereference from a dyn_cast<>. NFCI.

Use cast<> instead which will assert if it fails and not just return null.

Fixes clang static analyzer warning.
The file was modifiedllvm/lib/Target/AVR/AsmParser/AVRAsmParser.cpp
Commit 98eaacd73d40eb28d5fa86bc3cfc9371581ee0cb by llvm-dev
Assert we've found both vector types. NFCI.

Fixes clang static analyzer warning about potential null dereferences.
The file was modifiedllvm/lib/Target/ARM/MVEGatherScatterLowering.cpp
Commit c799f873cb9feaea265aa3df8f3372949f8263d0 by jay.foad
[AMDGPU] Don't cluster stores

Clustering loads has caching benefits, but as far as I know there is no
advantage to clustering stores on any AMDGPU subtargets.

The disadvantage is that it tends to increase register pressure and
restricts scheduling freedom.

Differential Revision: https://reviews.llvm.org/D85530
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/store-local.96.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/store-local.128.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/token-factor-inline-limit-test.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/half.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/insertelement.large.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/cluster_stores.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/fast-unaligned-load-store.private.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/merge-stores.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/load-unaligned.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/insertelement-stack-lower.ll
The file was modifiedllvm/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/extractelement-stack-lower.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/widen-smrd-loads.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/call-argument-types.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/fast-unaligned-load-store.global.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/amdgpu-codegenprepare-idiv.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/insert_vector_elt.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/insertelement.i16.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/store-local.128.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/fshr.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/memory_clause.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/store-weird-sizes.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/store-local.96.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/local-memory.amdgcn.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/non-entry-alloca.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/si-triv-disjoint-mem-access.ll
Commit 7bb9a2f996a33fde689fc0b7603fce0115fb92b4 by spatel
[InstSimplify] fix miscompiles with maximum/minimum intrinsics

As discussed in the sibling codegen functionality patch D87571,
this transform was created with D52766, but it is not correct.

The incorrect test diffs were missed during review, but the
'TODO' comment about this functionality was still in the code -
we need 'nnan' to enable this fold.
The file was modifiedllvm/lib/Analysis/InstructionSimplify.cpp
The file was modifiedllvm/test/Transforms/InstSimplify/floating-point-arithmetic.ll
Commit 08baa979235ab98cf13497dde813ab8ae58b11cb by david.green
[ARM] Enable tail predication for reduction tests. NFC
The file was modifiedllvm/test/Transforms/LoopVectorize/ARM/mve-reductions.ll
Commit 9868ea764f31b0fd4ec250867807aa0ad7958abf by jasonliu
[XCOFF][AIX] Handle TOC entries that could not be reached by positive range in small code model

Summary:
In small code model, AIX assembler could not deal with labels that
could not be reached within the [-0x8000, 0x8000) range from TOC base.
So when generating the assembly, we would need to help the assembler
by subtracting an offset from the label to keep the actual value
within [-0x8000, 0x8000).

Reviewed By: hubert.reinterpretcast, Xiangling_L

Differential Revision: https://reviews.llvm.org/D86879
The file was modifiedllvm/lib/Target/PowerPC/PPCAsmPrinter.cpp
The file was addedllvm/test/CodeGen/PowerPC/aix-overflow-toc.py
The file was modifiedllvm/test/CodeGen/PowerPC/lit.local.cfg
The file was modifiedllvm/lib/MC/XCOFFObjectWriter.cpp
Commit 5df9cb5bc71fc880a05ff7a1a2af727c7ce3cab3 by spatel
[InstSimplify] fix test comments; NFC
The file was modifiedllvm/test/Transforms/InstSimplify/floating-point-arithmetic.ll
Commit dae68fdf9ece930ad158e15966cb99a15636e8c7 by spatel
[InstSimplify] add/move tests for fmin/fmax; NFC

The new tests are duplicated from the sibling patch for codegen:
D87571
The file was modifiedllvm/test/Transforms/InstSimplify/floating-point-arithmetic.ll
The file was addedllvm/test/Transforms/InstSimplify/fminmax-folds.ll
Commit 22c583c3d03a6750d6474ad46e5d52eb9974e2b0 by spatel
[InstSimplify] reduce code duplication for fmin/fmax folds; NFC

We use the same code structure for folding integer min/max.
The file was modifiedllvm/lib/Analysis/InstructionSimplify.cpp
Commit ef7a255c037ca462f71ddd3d2b5a46310b08f6eb by Lubomir.Litchev
Add support for casting elements in vectors for certain Std dialect type conversion operations.

Added support to the Std dialect cast operations to do casts in vector types when feasible.

Reviewed By: ftynse

Differential Revision: https://reviews.llvm.org/D87410
The file was modifiedmlir/test/Conversion/StandardToLLVM/convert-to-llvmir.mlir
The file was modifiedmlir/include/mlir/Dialect/StandardOps/IR/Ops.td
The file was modifiedmlir/lib/Dialect/StandardOps/IR/Ops.cpp
Commit 71a16e40f78adee12663816edf6635b96dca09dc by Louis Dionne
[libcxx] ostream{,buf}_iterator::difference_type changes in C++20

In C++20, since P0896R4, std::ostream_iterator and std::ostreambuf_iterator
must have std::ptrdiff_t instead of void as a difference_type.

Tests by Casey Carter (thanks!).

Differential Revision: https://reviews.llvm.org/D87459
The file was modifiedlibcxx/test/std/iterators/stream.iterators/ostreambuf.iterator/types.pass.cpp
The file was modifiedlibcxx/test/std/iterators/stream.iterators/ostream.iterator/types.pass.cpp
The file was modifiedlibcxx/include/iterator
Commit 3b7708e2deb48befcef764fb69f9217f55ac1155 by llvm-dev
Assert we've found the size of each (non-overlapping) structure. NFCI.

Fixes clang static analyzer warning.
The file was modifiedclang/lib/CodeGen/CGOpenMPRuntime.cpp
Commit f07f3c72375b872bfb988f7531d4e0485233ade1 by flo
[MemorySSA] Precommit test case for PR47498.
The file was modifiedllvm/test/Analysis/MemorySSA/phi-translation.ll
Commit c4f1b3144184e4c276a7e7c801cbcd4ac3c573ba by flo
[MemorySSA] Make sure PerformedPhiTrans is updated for each visited def.

1ce82015f6d0 added a fix to restrict phi optimizations after phi
translations. But the current use of performedPhiTranslation only
checked whether phi translation happened for the first iterator and
missed cases where phi translations happens at subsequent
iterators/upwards defs.

This patch changes upward_defs_iteartor to take a pointer to a bool, so
we can easily ensure the final value includes all visited defs, while
still being able to conveniently use it with make_range & co.
The file was modifiedllvm/include/llvm/Analysis/MemorySSA.h
The file was modifiedllvm/lib/Analysis/MemorySSA.cpp
The file was modifiedllvm/test/Analysis/MemorySSA/phi-translation.ll
Commit 7526376164801cc758c94217931ab025bc226b0e by spatel
[InstSimplify] allow folds for fmin/fmax with 'ninf'

maxnum(ninf X, +FLT_MAX) --> +FLT_MAX
minnum(ninf X, -FLT_MAX) --> -FLT_MAX

This is based on the similar codegen transform proposed in:
D87571
The file was modifiedllvm/lib/Analysis/InstructionSimplify.cpp
The file was modifiedllvm/test/Transforms/InstSimplify/fminmax-folds.ll
Commit 916b43403588a85425bbc82712427cf53ed877cc by Saleem Abdulrasool
Sema: add support for `__attribute__((__swift_objc_members__))`

This adds the `__swift_objc_members__` attribute to the semantic
analysis.  It allows for annotating ObjC interfaces to provide Swift
semantics indicating that the types derived from this interface will be
back-bridged to Objective-C to allow interoperability with Objective-C
and Swift.

This is based on the work of the original changes in
https://github.com/llvm/llvm-project-staging/commit/8afaf3aad2af43cfedca7a24cd817848c4e95c0c

Differential Revision: https://reviews.llvm.org/D87395
Reviewed By: Aaron Ballman, Dmitri Gribenko
The file was addedclang/test/SemaObjC/attr-swift_objc_members.m
The file was modifiedclang/test/Misc/pragma-attribute-supported-attributes-list.test
The file was modifiedclang/include/clang/Basic/AttrDocs.td
The file was modifiedclang/include/clang/Basic/Attr.td
The file was modifiedclang/lib/Sema/SemaDeclAttr.cpp
Commit 55d371abd7f470496f45d960c29bb66da0e81aee by spatel
[InstSimplify] add folds for fmin/fmax with 'nnan'

maximum(nnan X, +INF) --> +INF
minimum(nnan X, -INF) --> -INF

This is based on the similar codegen transform proposed in:
D87571
The file was modifiedllvm/test/Transforms/InstSimplify/fminmax-folds.ll
The file was modifiedllvm/lib/Analysis/InstructionSimplify.cpp
Commit ed0abc8ad3f3be99f40c25238ec42065a8ba077f by tkeith
[flang] Correctly detect overlapping integer cases

Integer case values were being compared as unsigned by operator<
on evaluate::value::Integer. Change that to signed so that overlap
can be detected correctly.

Explicit CompareUnsigned and BLT are still available if unsigned
comparison is needed.

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

Differential Revision: https://reviews.llvm.org/D87595
The file was modifiedflang/test/Semantics/case01.f90
The file was modifiedflang/include/flang/Evaluate/integer.h
Commit c92d1aa44b132597d57523a90342b3e620dbdb1e by gyurgyikcp
[libc] Decouple string functions.

This revision removes dependencies that exist between different string functions. This allows for the libc user to use a specific function X of this library without also depending on Y and Z.

Reviewed By: sivachandra

Differential Revision: https://reviews.llvm.org/D87421
The file was modifiedlibc/src/string/strcat.cpp
The file was modifiedlibc/src/string/strcpy.cpp
The file was modifiedlibc/src/string/strlen.cpp
The file was modifiedlibc/src/string/memchr.cpp
The file was modifiedlibc/src/string/string_utils.h
The file was modifiedlibc/src/string/CMakeLists.txt
The file was modifiedlibc/src/string/strnlen.cpp
Commit 94921e9f8ad04793638e02a6104f63e06ae62b9e by i
[ELF] Define a reportRangeError() overload for thunks and tidy up recent PPC64 thunk range errors

Prefer `errorOrWarn` to `fatal` for recoverable errors and graceful degradation
when --noinhibit-exec is specified.

Mention the destination symbol, otherwise the diagnostic is not really actionable.
Two errors are not tested but the patch does not intend to add the coverage.

Reviewed By: grimar

Differential Revision: https://reviews.llvm.org/D87486
The file was modifiedlld/test/ELF/ppc64-toc-call-to-pcrel-long-jump.s
The file was modifiedlld/ELF/Thunks.cpp
The file was modifiedlld/ELF/Relocations.cpp
The file was modifiedlld/ELF/Target.h
Commit ce6dd973ac556a326c38bd7667b4fb448f215d09 by tkeith
[flang] Fix analyzed form of type-bound assignment

Change the analyzed form of type-bound assignment to match that of call
statements. Resolve the binding name to a specific subprogram when
possible by using `GetBindingResolution`. Otherwise leave it as a
type-bound procedure call.

Differential Revision: https://reviews.llvm.org/D87541
The file was modifiedflang/lib/Semantics/expression.cpp
The file was addedflang/test/Semantics/defined-ops.f90
Commit 7841e21c98495ba5e33e0d2507d985bd5b938445 by rahmanl
Let -basic-block-sections=labels emit basicblock metadata in a new .bb_addr_map section, instead of emitting special unary-encoded symbols.

This patch introduces the new .bb_addr_map section feature which allows us to emit the bits needed for mapping binary profiles to basic blocks into a separate section.
The format of the emitted data is represented as follows. It includes a header for every function:

|  Address of the function                      |  -> 8 bytes (pointer size)
|  Number of basic blocks in this function (>0) |  -> ULEB128

The header is followed by a BB record for every basic block. These records are ordered in the same order as MachineBasicBlocks are placed in the function. Each BB Info is structured as follows:

|  Offset of the basic block relative to function begin |  -> ULEB128
|  Binary size of the basic block                       |  -> ULEB128
|  BB metadata                                          |  -> ULEB128  [ MBB.isReturn() OR MBB.hasTailCall() << 1  OR  MBB.isEHPad() << 2 ]

The new feature will replace the existing "BB labels" functionality with -basic-block-sections=labels.
The .bb_addr_map section scrubs the specially-encoded BB symbols from the binary and makes it friendly to profilers and debuggers.
Furthermore, the new feature reduces the binary size overhead from 70% bloat to only 12%.

For more information and results please refer to the RFC: https://lists.llvm.org/pipermail/llvm-dev/2020-July/143512.html

Reviewed By: MaskRay, snehasish

Differential Revision: https://reviews.llvm.org/D85408
The file was modifiedllvm/lib/CodeGen/MIRParser/MIRParser.cpp
The file was modifiedllvm/include/llvm/CodeGen/MachineFunction.h
The file was modifiedllvm/lib/CodeGen/MachineFunction.cpp
The file was modifiedllvm/lib/CodeGen/MachineBasicBlock.cpp
The file was modifiedclang/test/CodeGen/basic-block-sections.c
The file was modifiedllvm/include/llvm/MC/MCObjectFileInfo.h
The file was addedllvm/test/CodeGen/X86/basic-block-sections-labels-functions-sections.ll
The file was modifiedllvm/test/CodeGen/X86/basic-block-sections-labels.ll
The file was modifiedllvm/include/llvm/CodeGen/AsmPrinter.h
The file was modifiedclang/docs/UsersManual.rst
The file was modifiedllvm/lib/CodeGen/BasicBlockSections.cpp
The file was modifiedllvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
The file was modifiedllvm/lib/MC/MCObjectFileInfo.cpp
Commit 4ff4708d39b790bf7231ad0fa4e7cfddb4e26f95 by llvm-dev
collectBitParts - use const references. NFCI.

Fixes clang-tidy warnings first noticed on D87452.
The file was modifiedllvm/lib/Transforms/Utils/Local.cpp
Commit 132e57bc597bd3f50174b7d286c43f76b47f11c1 by walter erquinigo
Retry of D84974

- Fix a small issue caused by a conflicting name (GetObject) on Windows.
  The fix was to rename the internal GetObject function to
  GetNextFunction.
The file was modifiedlldb/tools/lldb-vscode/VSCode.h
The file was modifiedlldb/tools/lldb-vscode/package.json
The file was modifiedlldb/packages/Python/lldbsuite/test/tools/lldb-vscode/lldbvscode_testcase.py
The file was addedlldb/test/API/tools/lldb-vscode/runInTerminal/TestVSCode_runInTerminal.py
The file was modifiedlldb/tools/lldb-vscode/lldb-vscode.cpp
The file was addedlldb/test/API/tools/lldb-vscode/runInTerminal/Makefile
The file was addedlldb/test/API/tools/lldb-vscode/runInTerminal/main.c
The file was modifiedlldb/packages/Python/lldbsuite/test/tools/lldb-vscode/vscode.py
The file was modifiedlldb/tools/lldb-vscode/JSONUtils.cpp
The file was modifiedlldb/tools/lldb-vscode/VSCode.cpp
The file was modifiedlldb/tools/lldb-vscode/JSONUtils.h
Commit 7235326fb2342227d478d63378d2ba4d5e2418db by Louis Dionne
[libc++] Upgrade the Clang on build bots
The file was modifiedlibcxx/utils/docker/debian9/buildbot/docker-compose.yml
The file was modifiedlibcxx/utils/docker/debian9/buildbot/Dockerfile
Commit a3bc0401d436d8c7d2dd5b54e13b81333d53bdff by walter erquinigo
Fix 132e57bc597bd3f50174b7d286c43f76b47f11c1

Compile error found in
http://lab.llvm.org:8011/builders/lldb-x86_64-debian/builds/17403/steps/build/logs/stdio

Simple fix
The file was modifiedlldb/tools/lldb-vscode/lldb-vscode.cpp
Commit 8e69c3cde8eed94be226bdef1ff6cedda3a33bc4 by nikita.ppv
[DAGCombiner] Fold fmin/fmax with INF / FLT_MAX

Similar to D87415, this folds the various float min/max opcodes
with a constant INF or -INF operand, or FLT_MAX / -FLT_MAX operand
if the ninf flag is set. Some of the folds are only possible under
nnan.

The fminnum(X, INF) with nnan and fmaxnum(X, -INF) with nnan cases
are needed to improve the VECREDUCE_FMIN/FMAX lowerings on X86,
the rest is here for the sake of completeness.

Differential Revision: https://reviews.llvm.org/D87571
The file was modifiedllvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
The file was modifiedllvm/test/CodeGen/ARM/fminmax-folds.ll
Commit cfff88c03cf9e9b72906a41fd11e06721d54f293 by nikita.ppv
[InstCombine] Simplify select operand based on equality condition

For selects of the type X == Y ? A : B, check if we can simplify A
by using the X == Y equality and replace the operand if that's
possible. We already try to do this in InstSimplify, but will only
fold if the result of the simplification is the same as B, in which
case the select can be dropped entirely. Here the select will be
retained, just one operand simplified.

As we are performing an actual replacement here, we don't have
problems with refinement / poison values.

Differential Revision: https://reviews.llvm.org/D87480
The file was modifiedllvm/lib/Transforms/InstCombine/InstCombineSelect.cpp
The file was modifiedllvm/test/Transforms/InstCombine/select-binop-cmp.ll
The file was modifiedllvm/test/Transforms/InstCombine/select.ll
The file was modifiedllvm/test/Transforms/InstCombine/rem.ll
Commit da17e0d5c1dfabcba887e323b1aabc8cc4342cd6 by epastor
[ms] [llvm-ml] Add missing built-in type aliases

Add signed aliases for integral types, as well as the "DF" abbreviation for the FWORD type.

Reviewed By: thakis

Differential Revision: https://reviews.llvm.org/D87246
The file was modifiedllvm/lib/MC/MCParser/MasmParser.cpp
The file was addedllvm/test/tools/llvm-ml/builtin_types.test
Commit 7c44ee8e1937c7402a106f3fa6a356caa73a14e8 by epastor
[ms] [llvm-ml] Fix struct padding logic

MASM structs are end-padded to have size a multiple of the smaller of the requested alignment and the size of their largest field (taken recursively, if they have a field of STRUCT type).

This matches the behavior of ml.exe and ml64.exe. Our original implementation followed the MASM 6.0 documentation, which instead specified that MASM structs were padded to a multiple of their requested alignment.

Reviewed By: thakis

Differential Revision: https://reviews.llvm.org/D87248
The file was addedllvm/test/tools/llvm-ml/struct_alignment.test
The file was modifiedllvm/lib/MC/MCParser/MasmParser.cpp
Commit 20201dc76aaf68eb940eb14bfc6dd4983292fb79 by epastor
[ms] [llvm-ml] Add support for size queries in MASM

Add support for size inference, sizeof, typeof, and lengthof.

Reviewed By: thakis

Differential Revision: https://reviews.llvm.org/D86947
The file was modifiedllvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
The file was modifiedllvm/lib/Target/AMDGPU/AsmParser/AMDGPUAsmParser.cpp
The file was modifiedllvm/lib/MC/MCParser/MasmParser.cpp
The file was modifiedllvm/include/llvm/MC/MCParser/MCAsmParser.h
The file was addedllvm/test/tools/llvm-ml/size_inference.test
The file was modifiedllvm/include/llvm/MC/MCParser/MCTargetAsmParser.h
The file was modifiedllvm/lib/MC/MCParser/AsmParser.cpp
The file was modifiedllvm/test/tools/llvm-ml/struct.test
The file was addedllvm/test/tools/llvm-ml/type_operators.test
Commit 23a2b03221c5664fefc658c3eb26e7b6ecd1a1e8 by epastor
[ms] [llvm-ml] Add basic support for SEH, including PROC FRAME

Add basic support for SEH, including PROC FRAME

Reviewed By: thakis

Differential Revision: https://reviews.llvm.org/D86948
The file was addedllvm/test/tools/llvm-ml/proc.test
The file was modifiedllvm/lib/MC/MCParser/COFFMasmParser.cpp
The file was modifiedllvm/lib/MC/MCParser/MasmParser.cpp
The file was modifiedllvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
The file was addedllvm/test/tools/llvm-ml/proc_frame.test
Commit c0e3996bc7087a27e685c734480c0b92ff427d37 by nikita.ppv
[ARM] Add more tests for vecreduce soft float legalization (NFC)

This mirrors the existing fadd tests to fmul, fmin and fmax.
The file was addedllvm/test/CodeGen/ARM/vecreduce-fmax-legalization-soft-float.ll
The file was addedllvm/test/CodeGen/ARM/vecreduce-fmin-legalization-soft-float.ll
The file was addedllvm/test/CodeGen/ARM/vecreduce-fmul-legalization-soft-float.ll
Commit 53f36f06afbc02d1ab96e3789b41ddeafe31f40e by nikita.ppv
[Legalize][ARM][X86] Add float legalization for VECREDUCE

This adds SoftenFloatRes, PromoteFloatRes and SoftPromoteHalfRes
legalizations for VECREDUCE, to fill the remaining hole in the SDAG
legalization. These legalizations simply expand the reduction and
let it be recursively legalized. For the PromoteFloatRes case at
least it is possible to do better than that, but it's pretty tricky
(because we need to consider the interaction of three different
vector legalizations and the type promotion) and probably not
really worthwhile.

I haven't added ExpandFloatRes support, as I am not familiar with
ppc_fp128.

Differential Revision: https://reviews.llvm.org/D87569
The file was modifiedllvm/test/CodeGen/ARM/vecreduce-fmul-legalization-soft-float.ll
The file was modifiedllvm/test/CodeGen/ARM/vecreduce-fmax-legalization-soft-float.ll
The file was modifiedllvm/test/CodeGen/X86/vector-reduce-fmax-nnan.ll
The file was modifiedllvm/test/CodeGen/X86/vector-reduce-fmin-nnan.ll
The file was modifiedllvm/lib/CodeGen/SelectionDAG/LegalizeTypes.h
The file was modifiedllvm/test/CodeGen/ARM/vecreduce-fadd-legalization-soft-float.ll
The file was modifiedllvm/test/CodeGen/ARM/vecreduce-fmin-legalization-soft-float.ll
The file was modifiedllvm/lib/CodeGen/SelectionDAG/LegalizeFloatTypes.cpp
The file was modifiedllvm/lib/Target/ARM/ARMTargetTransformInfo.h
Commit abf1c82dcc5c54f2bbd65eb7b30cc40de2bd7147 by lntue
[libc] Extend MPFRMatcher to handle 2-input-1-output and support hypot function.

Differential Revision: https://reviews.llvm.org/D87514
The file was modifiedlibc/utils/MPFRWrapper/MPFRUtils.cpp
The file was modifiedlibc/utils/MPFRWrapper/MPFRUtils.h
Commit f06090243d870c2c0f6f1551eff0688a45fab298 by Louis Dionne
[libc++] Use LLVM 11 instead of trunk on build bots

Somehow the snapshot of LLVM trunk we use was seeing failures.
The file was modifiedlibcxx/utils/docker/debian9/buildbot/docker-compose.yml
Commit cc947207283f934c72af0eb0b1a08978c59d40a2 by nikita.ppv
[AArch64] Add additional vecreduce fmax/fmin legalization tests (NFC)

Add a vector widening test with ninf flag to the existing fmax
tests, and mirror them over into fmin tests.
The file was addedllvm/test/CodeGen/AArch64/vecreduce-fmin-legalization.ll
The file was modifiedllvm/test/CodeGen/AArch64/vecreduce-fmax-legalization.ll
Commit c0f199e5667a862819d333847059cfaa95354111 by albionapc
[PowerPC] Implement Thread Local Storage Support for Local Exec

This patch is the initial support for the Local Exec Thread Local
Storage model to produce code sequence and relocations correct
to the ABI for the model when using PC relative memory operations.

Patch by: Kamau Bridgeman

Differential Revision: https://reviews.llvm.org/D83404
The file was addedllvm/test/MC/PowerPC/pcrel-tls-local-exec-value-load-reloc.s
The file was modifiedllvm/include/llvm/BinaryFormat/ELFRelocs/PowerPC64.def
The file was modifiedllvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp
The file was modifiedllvm/lib/Target/PowerPC/PPCISelLowering.cpp
The file was modifiedllvm/lib/Target/PowerPC/MCTargetDesc/PPCELFObjectWriter.cpp
The file was modifiedllvm/lib/Target/PowerPC/PPCMCInstLower.cpp
The file was modifiedllvm/lib/Target/PowerPC/PPCInstrPrefix.td
The file was addedllvm/test/MC/PowerPC/pcrel-tls-local-exec-address-load-reloc.s
The file was modifiedllvm/lib/Target/PowerPC/PPCInstrInfo.td
The file was addedllvm/test/CodeGen/PowerPC/pcrel-tls-local-exec.ll
The file was modifiedllvm/lib/Target/PowerPC/PPCISelLowering.h
Commit f6f34024e9a4870eea6733dcbab6de89cc435262 by i
[ELF] Add documentation for --warn-backrefs: a GNU ld compatibility checking tool (and lesser of layering detection)

Differential Revision: https://reviews.llvm.org/D86762
The file was modifiedlld/docs/index.rst
The file was addedlld/docs/ELF/warn_backrefs.rst