SuccessChanges

Summary

  1. [SelectionDAG] Move ISD:PARITY formation from DAGCombine to SimplifyDemandedBits. (details)
  2. [docs] Document LLVM_EXTERNALIZE_DEBUGINFO CMake option (details)
  3. [CodeGenPrepare] Fix zapping dead operands of assume (details)
  4. [AST][FPEnv] Keep FP options in trailing storage of CastExpr (details)
  5. [llvm-cov gcov] Refactor counting and reporting (details)
  6. [analyzer] Evaluate PredefinedExpressions (details)
  7. [analyzer][docs][NFC] Document the ento namespace in the llvm/Lexicon (details)
  8. [analyzer][z3] Use more elaborate Z3 variable names (details)
  9. [CodeGen] Fix bug in IncrementPointer (details)
  10. [ARM] Fix so immediates and pc relative checks (details)
  11. [UnifyLoopExits] Fix non-deterministic iteration order (details)
  12. [compiler-rt] [netbsd] Use internal_ptrace() instead of ptrace() (details)
  13. [JumpThreading] Fix an incorrect Modified status (details)
  14. AMDGPU/GlobalISel/Emitter Support for predicate code that uses operands (details)
  15. [clangd] Add error() function for creating formatv-style llvm::Errors. NFC (details)
  16. [gn build] Port 30667c967d3 (details)
  17. [DebugInstrRef][1/9] Add fields for instr-ref variable locations (details)
  18. [clangd] Track tweaks that fail the apply stage (details)
  19. [CodeGen][X86] Regenerate minmax reduction sequence tests to match arithmetic tests. (details)
  20. [clangd] makeStringError,make_error<StringError> -> error() (details)
  21. [LegalizeDAG] Fix MSVC "result of 32-bit shift implicitly converted to 64 bits" warning. NFCI. (details)
  22. AMDGPU/GlobalISel Add test for non-leaf complex patterns (details)
  23. AMDGPU/GlobalISel/Emitter Recognize additional 'same operand checks' (details)
  24. AMDGPU/GlobalISel Check for NoNaNsFPMath in isKnownNeverSNaN (details)
  25. [SVE] In LoopIdiomRecognize::isLegalStore bail out for scalable vectors (details)
  26. [ARM][MVE] Tail-predication: check get.active.lane.mask's TC value (details)
  27. [SyntaxTree][List] Fix: `ParameterDeclarationList` is the `List` inside `ParametersAndQualifiers` (details)
  28. [SyntaxTree] Provide `List::classof` (details)
  29. [SyntaxTree][List] `assertInvariants` for `List`s (details)
  30. [ARM] Selects SSAT/USAT from correct LLVM IR (details)
  31. [DSE] Precommit test case for invalid elimination of store in loop. (details)
  32. [DSE] Only eliminate candidates that always store the same loc. (details)
  33. [CGP] Limit converting phi types to simple loads and stores (details)
  34. [mlir] Check for type conversion success in std->llvm function conversion (details)
  35. [pstl] Support Threading Building Blocks 2020 (oneTBB) for "tbb" parallel backend. (details)
  36. [llvm-readobj/elf][test] - Test all core note types properly. (details)
  37. [llvm-readelf/obj] - Refine and generalize the code that is used to dump notes. (details)
  38. [NFC] Add missing `const` statements in SCEV (details)
  39. [llvm-readobj] - Cleanup implementation LLVMStyle<ELFT>::printAddrsig(). (details)
  40. [llvm-readobj/elf] - Don't use unwrapOrError when reporting errors about SHT_DYNAMIC sections. (details)
  41. Don't dereference from a dyn_cast<>. NFCI. (details)
  42. Assert we've found both vector types. NFCI. (details)
  43. [AMDGPU] Don't cluster stores (details)
  44. [InstSimplify] fix miscompiles with maximum/minimum intrinsics (details)
  45. [ARM] Enable tail predication for reduction tests. NFC (details)
  46. [XCOFF][AIX] Handle TOC entries that could not be reached by positive range in small code model (details)
  47. [InstSimplify] fix test comments; NFC (details)
  48. [InstSimplify] add/move tests for fmin/fmax; NFC (details)
  49. [InstSimplify] reduce code duplication for fmin/fmax folds; NFC (details)
  50. Add support for casting elements in vectors for certain Std dialect type conversion operations. (details)
  51. [libcxx] ostream{,buf}_iterator::difference_type changes in C++20 (details)
  52. Assert we've found the size of each (non-overlapping) structure. NFCI. (details)
  53. [MemorySSA] Precommit test case for PR47498. (details)
  54. [MemorySSA] Make sure PerformedPhiTrans is updated for each visited def. (details)
  55. [InstSimplify] allow folds for fmin/fmax with 'ninf' (details)
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/SelectionDAG.cpp
The file was modifiedllvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
The file was modifiedllvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
The file was modifiedllvm/test/CodeGen/X86/parity.ll
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/AST/Expr.cpp
The file was modifiedclang/lib/Sema/SemaOverload.cpp
The file was modifiedclang/test/AST/ast-dump-fpfeatures.cpp
The file was modifiedclang/lib/Frontend/Rewrite/RewriteModernObjC.cpp
The file was modifiedclang/lib/Sema/SemaLambda.cpp
The file was modifiedclang/lib/CodeGen/CGStmtOpenMP.cpp
The file was modifiedclang/lib/AST/TextNodeDumper.cpp
The file was modifiedclang/include/clang/AST/ExprCXX.h
The file was modifiedclang/lib/Sema/SemaCast.cpp
The file was modifiedclang/include/clang/Basic/LangOptions.h
The file was modifiedclang/lib/Analysis/BodyFarm.cpp
The file was modifiedclang/lib/Sema/SemaExpr.cpp
The file was modifiedclang/lib/Sema/SemaExprCXX.cpp
The file was modifiedclang/lib/CodeGen/CGBlocks.cpp
The file was modifiedclang/include/clang/AST/Stmt.h
The file was modifiedclang/lib/Serialization/ASTWriterStmt.cpp
The file was modifiedclang/lib/Sema/SemaDecl.cpp
The file was modifiedclang/include/clang/AST/TextNodeDumper.h
The file was modifiedclang/lib/CodeGen/CGObjC.cpp
The file was modifiedclang/lib/Sema/SemaObjCProperty.cpp
The file was modifiedclang/include/clang/AST/ExprObjC.h
The file was modifiedclang/lib/Sema/SemaInit.cpp
The file was modifiedclang/lib/Sema/SemaStmt.cpp
The file was modifiedclang/lib/Sema/SemaExprObjC.cpp
The file was modifiedclang/lib/Sema/SemaDeclCXX.cpp
The file was modifiedclang/lib/Serialization/ASTWriterDecl.cpp
The file was modifiedclang/lib/Sema/SemaTemplate.cpp
The file was modifiedclang/lib/Serialization/ASTReaderStmt.cpp
The file was modifiedclang/include/clang/AST/Expr.h
The file was modifiedclang/lib/AST/ASTImporter.cpp
The file was modifiedclang/lib/AST/ExprCXX.cpp
The file was modifiedclang/lib/Sema/SemaOpenMP.cpp
The file was modifiedclang/lib/Sema/Sema.cpp
The file was modifiedclang/lib/Frontend/Rewrite/RewriteObjC.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/test/tools/llvm-cov/gcov-fake-4.2.c
The file was modifiedllvm/lib/ProfileData/GCOV.cpp
The file was modifiedllvm/include/llvm/ProfileData/GCOV.h
The file was modifiedllvm/test/tools/llvm-cov/llvm-cov.test
The file was modifiedllvm/tools/llvm-cov/gcov.cpp
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 modifiedclang/lib/StaticAnalyzer/Core/Environment.cpp
The file was modifiedclang/lib/StaticAnalyzer/Core/SValBuilder.cpp
The file was addedclang/test/Analysis/eval-predefined-exprs.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/include/clang/StaticAnalyzer/Core/PathSensitive/SymbolManager.h
The file was modifiedclang/include/clang/StaticAnalyzer/Core/PathSensitive/SMTConstraintManager.h
The file was modifiedclang/lib/StaticAnalyzer/Core/SymbolManager.cpp
The file was modifiedclang/include/clang/StaticAnalyzer/Core/PathSensitive/SMTConv.h
The file was modifiedclang/include/clang/StaticAnalyzer/Core/PathSensitive/SymExpr.h
The file was addedclang/test/Analysis/z3/pretty-dump.c
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 modifiedllvm/lib/Target/ARM/ARMConstantIslandPass.cpp
The file was addedllvm/test/CodeGen/ARM/constant-island-SOImm-limit16.mir
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 addedllvm/test/Transforms/JumpThreading/constant-fold-status.ll
The file was modifiedllvm/lib/Transforms/Scalar/JumpThreading.cpp
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/VOP3Instructions.td
The file was modifiedllvm/include/llvm/CodeGen/GlobalISel/InstructionSelector.h
The file was modifiedllvm/test/TableGen/GlobalISelEmitter.td
The file was modifiedllvm/test/TableGen/GlobalISelEmitterCustomPredicate.td
The file was modifiedllvm/lib/Target/AMDGPU/AMDGPUInstructionSelector.h
The file was modifiedllvm/utils/TableGen/GlobalISelEmitter.cpp
The file was modifiedllvm/include/llvm/CodeGen/GlobalISel/InstructionSelectorImpl.h
The file was addedllvm/test/CodeGen/AMDGPU/GlobalISel/add_shl.ll
The file was modifiedllvm/lib/Target/AMDGPU/AMDGPUInstructionSelector.cpp
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 modifiedclang-tools-extra/clangd/ClangdServer.cpp
The file was modifiedclang-tools-extra/clangd/unittests/CMakeLists.txt
The file was modifiedclang-tools-extra/clangd/RIFF.cpp
The file was modifiedclang-tools-extra/clangd/DraftStore.cpp
The file was addedclang-tools-extra/clangd/unittests/LoggerTests.cpp
The file was modifiedclang-tools-extra/clangd/PathMapping.cpp
The file was modifiedclang-tools-extra/clangd/ClangdLSPServer.cpp
The file was modifiedclang-tools-extra/clangd/JSONTransport.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/support/Logger.cpp
The file was modifiedclang-tools-extra/clangd/support/Logger.h
The file was modifiedclang-tools-extra/clangd/index/Serialization.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/Support/TargetOpcodes.def
The file was modifiedllvm/include/llvm/Target/Target.td
The file was modifiedllvm/include/llvm/CodeGen/MachineFunction.h
The file was modifiedllvm/include/llvm/CodeGen/MachineInstr.h
The file was modifiedllvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
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/xpc/XPCTransport.cpp
The file was modifiedclang-tools-extra/clangd/refactor/tweaks/AddUsing.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/index/YAMLSerialization.cpp
The file was modifiedclang-tools-extra/clangd/Preamble.cpp
The file was modifiedclang-tools-extra/clangd/IncludeFixer.cpp
The file was modifiedclang-tools-extra/clangd/JSONTransport.cpp
The file was modifiedclang-tools-extra/clangd/SourceCode.cpp
The file was modifiedclang-tools-extra/clangd/index/remote/marshalling/Marshalling.cpp
The file was modifiedclang-tools-extra/clangd/refactor/tweaks/DefineOutline.cpp
The file was modifiedclang-tools-extra/clangd/refactor/tweaks/ObjCLocalizeStringLiteral.cpp
The file was modifiedclang-tools-extra/clangd/index/Background.cpp
The file was modifiedclang-tools-extra/clangd/refactor/Tweak.cpp
The file was modifiedclang-tools-extra/clangd/FindSymbols.cpp
The file was modifiedclang-tools-extra/clangd/tool/ClangdMain.cpp
The file was modifiedclang-tools-extra/clangd/URI.cpp
The file was modifiedclang-tools-extra/clangd/refactor/Rename.cpp
The file was modifiedclang-tools-extra/clangd/refactor/tweaks/SwapIfBranches.cpp
The file was modifiedclang-tools-extra/clangd/refactor/tweaks/ExpandAutoType.cpp
The file was modifiedclang-tools-extra/clangd/index/SymbolID.cpp
The file was modifiedclang-tools-extra/clangd/refactor/tweaks/ExtractFunction.cpp
The file was modifiedclang-tools-extra/clangd/unittests/TestFS.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/GlobalISelEmitterSkippedPatterns.td
The file was modifiedllvm/test/TableGen/GlobalISelEmitter.td
The file was modifiedllvm/utils/TableGen/GlobalISelEmitter.cpp
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/Target/AMDGPU/AMDGPUInstructionSelector.cpp
The file was addedllvm/test/CodeGen/AMDGPU/GlobalISel/fmed3.ll
The file was modifiedllvm/lib/CodeGen/GlobalISel/Utils.cpp
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/test/CodeGen/Thumb2/LowOverheadLoops/tail-pred-const.ll
The file was modifiedllvm/lib/Target/ARM/MVETailPredication.cpp
The file was modifiedllvm/test/CodeGen/Thumb2/LowOverheadLoops/basic-tail-pred.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/include/clang/Tooling/Syntax/Tree.h
The file was modifiedclang/lib/Tooling/Syntax/Tree.cpp
Commit ceb0128509c51100afbf804bda84d82b7ebe06b1 by ecaldas
[SyntaxTree][List] `assertInvariants` for `List`s

Differential Revision: https://reviews.llvm.org/D87600
The file was modifiedclang/lib/Tooling/Syntax/Tree.cpp
The file was modifiedclang/include/clang/Tooling/Syntax/Tree.h
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/ssat.ll
The file was modifiedllvm/lib/Target/ARM/ARMISelLowering.cpp
The file was modifiedllvm/test/CodeGen/ARM/usat.ll
The file was modifiedllvm/test/CodeGen/Thumb2/mve-satmul-loops.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/test/tools/llvm-readobj/ELF/note-freebsd.s
The file was modifiedllvm/test/CodeGen/AMDGPU/elf-notes.ll
The file was modifiedllvm/tools/llvm-readobj/ELFDumper.cpp
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/dynamic-not-in-pt-dynamic.test
The file was modifiedllvm/test/tools/llvm-readobj/ELF/non-dynamic-in-pt-dynamic.test
The file was modifiedllvm/tools/llvm-readobj/ELFDumper.cpp
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/extractelement-stack-lower.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/insertelement-stack-lower.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/half.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/non-entry-alloca.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/load-unaligned.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/call-argument-types.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/insert_vector_elt.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/fast-unaligned-load-store.private.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/memory_clause.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/merge-stores.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/token-factor-inline-limit-test.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/insertelement.i16.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/GlobalISel/store-local.96.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/store-weird-sizes.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/widen-smrd-loads.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/fshr.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/store-local.128.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/fast-unaligned-load-store.global.ll
The file was modifiedllvm/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp
The file was modifiedllvm/test/CodeGen/AMDGPU/store-local.128.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/amdgpu-codegenprepare-idiv.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/MC/XCOFFObjectWriter.cpp
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
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/lib/Dialect/StandardOps/IR/Ops.cpp
The file was modifiedmlir/include/mlir/Dialect/StandardOps/IR/Ops.td
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/include/iterator
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
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/test/Transforms/InstSimplify/fminmax-folds.ll
The file was modifiedllvm/lib/Analysis/InstructionSimplify.cpp