SuccessChanges

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

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)
  56. Sema: add support for `__attribute__((__swift_objc_members__))` (details)
  57. [InstSimplify] add folds for fmin/fmax with 'nnan' (details)
  58. [flang] Correctly detect overlapping integer cases (details)
  59. [libc] Decouple string functions. (details)
  60. [ELF] Define a reportRangeError() overload for thunks and tidy up recent PPC64 thunk range errors (details)
  61. [flang] Fix analyzed form of type-bound assignment (details)
  62. Let -basic-block-sections=labels emit basicblock metadata in a new .bb_addr_map section, instead of emitting special unary-encoded symbols. (details)
  63. collectBitParts - use const references. NFCI. (details)
  64. Retry of D84974 (details)
  65. [libc++] Upgrade the Clang on build bots (details)
  66. Fix 132e57bc597bd3f50174b7d286c43f76b47f11c1 (details)
  67. [DAGCombiner] Fold fmin/fmax with INF / FLT_MAX (details)
  68. [InstCombine] Simplify select operand based on equality condition (details)
  69. [ms] [llvm-ml] Add missing built-in type aliases (details)
  70. [ms] [llvm-ml] Fix struct padding logic (details)
  71. [ms] [llvm-ml] Add support for size queries in MASM (details)
  72. [ms] [llvm-ml] Add basic support for SEH, including PROC FRAME (details)
  73. [ARM] Add more tests for vecreduce soft float legalization (NFC) (details)
  74. [Legalize][ARM][X86] Add float legalization for VECREDUCE (details)
  75. [libc] Extend MPFRMatcher to handle 2-input-1-output and support hypot function. (details)
  76. [libc++] Use LLVM 11 instead of trunk on build bots (details)
  77. [AArch64] Add additional vecreduce fmax/fmin legalization tests (NFC) (details)
  78. [PowerPC] Implement Thread Local Storage Support for Local Exec (details)
  79. [ELF] Add documentation for --warn-backrefs: a GNU ld compatibility checking tool (and lesser of layering detection) (details)
  80. [FastISel] Bail out of selectGetElementPtr for vector GEPs. (details)
  81. [libc++] Add comment in atomic test to explain why part of it is disabled on Apple (details)
  82. [MemProf] Rename HeapProfiler to MemProfiler for consistency (details)
  83. [gn build] Port 226d80ebe20 (details)
  84. [docs][NewPM] Add docs for writing NPM passes (details)
  85. [Asan] Fix false leak report (details)
  86. Make namespace handling uniform across dialect backends. (details)
  87. Update PowerPC backend ownership in CODE_OWNERS.TXT (details)
  88. [AMDGPU] Add XDL resource to scheduling model (details)
  89. [SelectionDAG] Use Align/MaybeAlign in calls to getLoad/getStore/getExtLoad/getTruncStore. (details)
  90. [libc++] Make rotate a constexpr. (details)
  91. [libc++] Finish implementing P0202R3 (details)
  92. Fix MLIR standalone example to properly handle namespace (details)
  93. [libc++][test] Portability fix of std::strstreambuf constructor test (details)
  94. [docs] Update OrcV1 removal timeline. (details)
  95. [PruneEH][NFC] Use CallGraphUpdater in PruneEH (details)
  96. [flang] More clean-up of CookedSource API (details)
  97. Revert "[libc++] Make rotate a constexpr." (details)
  98. [Take 2] [libc++] Make rotate a constexpr. (details)
  99. [flang] Fix bug for forward referenced type (details)
  100. [GlobalISel] Add G_UNMERGE_VALUES(G_MERGE_VALUES) combine (details)
  101. Revert "[docs][NewPM] Add docs for writing NPM passes" (details)
  102. [GISel]: Add combine for G_FABS to G_FABS (details)
  103. Reland [docs][NewPM] Add docs for writing NPM passes (details)
  104. [Hexagon] Some HVX DAG combines (details)
  105. [Hexagon] Widen loads and handle any-/sign-/zero-extensions (details)
  106. [Hexagon] Add more detailed testcase for widening truncates (details)
  107. [Sema] Address-space sensitive index check for unbounded arrays (details)
  108. [X86] Place new constant node in topological order in X86DAGToDAGISel::matchBitExtract. (details)
  109. [GlobalISel] Add G_UNMERGE(Cst) -> Cst1, Cst2, ... combine (details)
  110. [Asan] Accept __lsan_ignore_object for redzone pointer (details)
  111. [AArch64] Statepoint support for AArch64. (details)
  112. [flang] Allow Fortran comments after #include path (details)
  113. Revert "[X86] Place new constant node in topological order in X86DAGToDAGISel::matchBitExtract." (details)
  114. [X86] Place new constant node in topological order in X86DAGToDAGISel::matchBitExtract (details)
  115. [flang] Respect BZ mode in exponent parts, too (details)
  116. [libc++abi] Do not declare __cxa_finalize and __cxa_atexit in <cxxabi.h> (details)
  117. [GlobalISel] Add `X,Y<dead> = G_UNMERGE Z` -> X = G_TRUNC Z (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/TargetLowering.cpp
The file was modifiedllvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
The file was modifiedllvm/test/CodeGen/X86/parity.ll
The file was modifiedllvm/lib/CodeGen/SelectionDAG/DAGCombiner.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 addedllvm/test/Transforms/CodeGenPrepare/X86/recursively-delete-dead-instructions.ll
The file was modifiedllvm/lib/CodeGen/CodeGenPrepare.cpp
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/Sema/SemaDecl.cpp
The file was modifiedclang/test/AST/ast-dump-fpfeatures.cpp
The file was modifiedclang/lib/CodeGen/CGStmtOpenMP.cpp
The file was modifiedclang/lib/CodeGen/CGObjC.cpp
The file was modifiedclang/lib/Sema/SemaCast.cpp
The file was modifiedclang/lib/Sema/SemaLambda.cpp
The file was modifiedclang/lib/Sema/SemaOpenMP.cpp
The file was modifiedclang/lib/Sema/SemaExprObjC.cpp
The file was modifiedclang/lib/AST/ASTImporter.cpp
The file was modifiedclang/lib/CodeGen/CGBlocks.cpp
The file was modifiedclang/include/clang/Basic/LangOptions.h
The file was modifiedclang/lib/Sema/SemaStmt.cpp
The file was modifiedclang/lib/AST/TextNodeDumper.cpp
The file was modifiedclang/lib/Sema/SemaDeclCXX.cpp
The file was modifiedclang/lib/Sema/Sema.cpp
The file was modifiedclang/lib/Sema/SemaInit.cpp
The file was modifiedclang/include/clang/AST/ExprCXX.h
The file was modifiedclang/lib/Serialization/ASTWriterDecl.cpp
The file was modifiedclang/lib/Sema/SemaExprCXX.cpp
The file was modifiedclang/lib/AST/Expr.cpp
The file was modifiedclang/lib/Sema/SemaTemplate.cpp
The file was modifiedclang/lib/Sema/SemaExpr.cpp
The file was modifiedclang/lib/AST/ExprCXX.cpp
The file was modifiedclang/lib/Analysis/BodyFarm.cpp
The file was modifiedclang/lib/Frontend/Rewrite/RewriteObjC.cpp
The file was modifiedclang/include/clang/AST/Expr.h
The file was modifiedclang/include/clang/AST/ExprObjC.h
The file was modifiedclang/lib/Serialization/ASTReaderStmt.cpp
The file was modifiedclang/lib/Sema/SemaObjCProperty.cpp
The file was modifiedclang/lib/Sema/SemaOverload.cpp
The file was modifiedclang/include/clang/AST/Stmt.h
The file was modifiedclang/include/clang/AST/TextNodeDumper.h
The file was modifiedclang/lib/Frontend/Rewrite/RewriteModernObjC.cpp
The file was modifiedclang/lib/Serialization/ASTWriterStmt.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/lib/ProfileData/GCOV.cpp
The file was modifiedllvm/test/tools/llvm-cov/llvm-cov.test
The file was modifiedllvm/tools/llvm-cov/gcov.cpp
The file was modifiedllvm/test/tools/llvm-cov/gcov-fake-4.2.c
The file was modifiedllvm/include/llvm/ProfileData/GCOV.h
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/SValBuilder.cpp
The file was modifiedclang/lib/StaticAnalyzer/Core/Environment.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 addedclang/test/Analysis/z3/pretty-dump.c
The file was modifiedclang/include/clang/StaticAnalyzer/Core/PathSensitive/SMTConv.h
The file was modifiedclang/lib/StaticAnalyzer/Core/SymbolManager.cpp
The file was modifiedclang/include/clang/StaticAnalyzer/Core/PathSensitive/SMTConstraintManager.h
The file was modifiedclang/include/clang/StaticAnalyzer/Core/PathSensitive/SymExpr.h
The file was modifiedclang/include/clang/StaticAnalyzer/Core/PathSensitive/SymbolManager.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 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/utils/TableGen/GlobalISelEmitter.cpp
The file was modifiedllvm/lib/Target/AMDGPU/AMDGPUInstructionSelector.h
The file was modifiedllvm/lib/Target/AMDGPU/AMDGPUInstructionSelector.cpp
The file was modifiedllvm/include/llvm/CodeGen/GlobalISel/InstructionSelectorImpl.h
The file was modifiedllvm/test/TableGen/GlobalISelEmitter.td
The file was modifiedllvm/test/TableGen/GlobalISelEmitterCustomPredicate.td
The file was modifiedllvm/lib/Target/AMDGPU/VOP3Instructions.td
The file was modifiedllvm/include/llvm/CodeGen/GlobalISel/InstructionSelector.h
The file was addedllvm/test/CodeGen/AMDGPU/GlobalISel/add_shl.ll
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/support/Logger.h
The file was modifiedclang-tools-extra/clangd/CodeComplete.cpp
The file was modifiedclang-tools-extra/clangd/DraftStore.cpp
The file was modifiedclang-tools-extra/clangd/PathMapping.cpp
The file was addedclang-tools-extra/clangd/unittests/LoggerTests.cpp
The file was modifiedclang-tools-extra/clangd/JSONTransport.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/RIFF.cpp
The file was modifiedclang-tools-extra/clangd/ClangdServer.cpp
The file was modifiedclang-tools-extra/clangd/ClangdLSPServer.cpp
The file was modifiedclang-tools-extra/clangd/index/Serialization.cpp
The file was modifiedclang-tools-extra/clangd/unittests/CMakeLists.txt
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/Target/Target.td
The file was modifiedllvm/include/llvm/Support/TargetOpcodes.def
The file was modifiedllvm/include/llvm/CodeGen/MachineFunction.h
The file was modifiedllvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
The file was modifiedllvm/include/llvm/CodeGen/MachineInstr.h
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/refactor/tweaks/RemoveUsingNamespace.cpp
The file was modifiedclang-tools-extra/clangd/refactor/tweaks/ObjCLocalizeStringLiteral.cpp
The file was modifiedclang-tools-extra/clangd/refactor/tweaks/SwapIfBranches.cpp
The file was modifiedclang-tools-extra/clangd/index/Background.cpp
The file was modifiedclang-tools-extra/clangd/refactor/tweaks/ExtractFunction.cpp
The file was modifiedclang-tools-extra/clangd/index/SymbolID.cpp
The file was modifiedclang-tools-extra/clangd/index/remote/marshalling/Marshalling.cpp
The file was modifiedclang-tools-extra/clangd/IncludeFixer.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/FindSymbols.cpp
The file was modifiedclang-tools-extra/clangd/URI.cpp
The file was modifiedclang-tools-extra/clangd/Preamble.cpp
The file was modifiedclang-tools-extra/clangd/tool/ClangdMain.cpp
The file was modifiedclang-tools-extra/clangd/JSONTransport.cpp
The file was modifiedclang-tools-extra/clangd/index/YAMLSerialization.cpp
The file was modifiedclang-tools-extra/clangd/refactor/Tweak.cpp
The file was modifiedclang-tools-extra/clangd/refactor/tweaks/DefineInline.cpp
The file was modifiedclang-tools-extra/clangd/SourceCode.cpp
The file was modifiedclang-tools-extra/clangd/refactor/tweaks/DefineOutline.cpp
The file was modifiedclang-tools-extra/clangd/refactor/tweaks/ExpandAutoType.cpp
The file was modifiedclang-tools-extra/clangd/xpc/XPCTransport.cpp
The file was modifiedclang-tools-extra/clangd/refactor/Rename.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/TableGen/GlobalISelEmitter.td
The file was modifiedllvm/utils/TableGen/GlobalISelEmitter.cpp
The file was modifiedllvm/test/TableGen/GlobalISelEmitterSkippedPatterns.td
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/inst-select-fract.f64.mir
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 addedllvm/test/CodeGen/AMDGPU/GlobalISel/fmed3.ll
The file was modifiedllvm/lib/Target/AMDGPU/AMDGPUInstructionSelector.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/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/lib/Target/ARM/ARMISelLowering.cpp
The file was modifiedllvm/test/CodeGen/Thumb2/mve-satmul-loops.ll
The file was modifiedllvm/test/CodeGen/ARM/usat.ll
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/test/Transforms/DeadStoreElimination/MSSA/multiblock-loops.ll
The file was modifiedllvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
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/CodeGen/AMDGPU/elf-notes.ll
The file was modifiedllvm/test/tools/llvm-readobj/ELF/note-freebsd.s
The file was modifiedllvm/tools/llvm-readobj/ELFDumper.cpp
Commit 412b417bfa79d54ebea1ae8bd0fd359044a133f4 by mkazantsev
[NFC] Add missing `const` statements in SCEV
The file was modifiedllvm/lib/Analysis/ScalarEvolution.cpp
The file was modifiedllvm/include/llvm/Analysis/ScalarEvolution.h
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/cluster_stores.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/merge-stores.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/call-argument-types.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/amdgpu-codegenprepare-idiv.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/fast-unaligned-load-store.global.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/load-unaligned.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/store-local.128.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/memory_clause.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/fshr.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/half.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/token-factor-inline-limit-test.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/widen-smrd-loads.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/insertelement.large.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/insert_vector_elt.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/extractelement-stack-lower.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/si-triv-disjoint-mem-access.ll
The file was modifiedllvm/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/store-local.96.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/insertelement-stack-lower.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/fast-unaligned-load-store.private.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/store-local.96.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/store-weird-sizes.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/local-memory.amdgcn.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/insertelement.i16.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/non-entry-alloca.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/store-local.128.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 modifiedllvm/test/CodeGen/PowerPC/lit.local.cfg
The file was addedllvm/test/CodeGen/PowerPC/aix-overflow-toc.py
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 addedllvm/test/Transforms/InstSimplify/fminmax-folds.ll
The file was modifiedllvm/test/Transforms/InstSimplify/floating-point-arithmetic.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/include/mlir/Dialect/StandardOps/IR/Ops.td
The file was modifiedmlir/lib/Dialect/StandardOps/IR/Ops.cpp
The file was modifiedmlir/test/Conversion/StandardToLLVM/convert-to-llvmir.mlir
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/include/iterator
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/lib/Analysis/MemorySSA.cpp
The file was modifiedllvm/include/llvm/Analysis/MemorySSA.h
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
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 modifiedclang/lib/Sema/SemaDeclAttr.cpp
The file was modifiedclang/include/clang/Basic/Attr.td
The file was addedclang/test/SemaObjC/attr-swift_objc_members.m
The file was modifiedclang/include/clang/Basic/AttrDocs.td
The file was modifiedclang/test/Misc/pragma-attribute-supported-attributes-list.test
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/lib/Analysis/InstructionSimplify.cpp
The file was modifiedllvm/test/Transforms/InstSimplify/fminmax-folds.ll
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/string_utils.h
The file was modifiedlibc/src/string/strcpy.cpp
The file was modifiedlibc/src/string/CMakeLists.txt
The file was modifiedlibc/src/string/memchr.cpp
The file was modifiedlibc/src/string/strnlen.cpp
The file was modifiedlibc/src/string/strlen.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/Target.h
The file was modifiedlld/ELF/Thunks.cpp
The file was modifiedlld/ELF/Relocations.cpp
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 addedflang/test/Semantics/defined-ops.f90
The file was modifiedflang/lib/Semantics/expression.cpp
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/include/llvm/CodeGen/AsmPrinter.h
The file was modifiedclang/docs/UsersManual.rst
The file was modifiedllvm/lib/CodeGen/MachineBasicBlock.cpp
The file was modifiedllvm/test/CodeGen/X86/basic-block-sections-labels.ll
The file was modifiedllvm/include/llvm/MC/MCObjectFileInfo.h
The file was modifiedllvm/include/llvm/CodeGen/MachineFunction.h
The file was modifiedllvm/lib/CodeGen/MIRParser/MIRParser.cpp
The file was addedllvm/test/CodeGen/X86/basic-block-sections-labels-functions-sections.ll
The file was modifiedclang/test/CodeGen/basic-block-sections.c
The file was modifiedllvm/lib/CodeGen/BasicBlockSections.cpp
The file was modifiedllvm/lib/CodeGen/MachineFunction.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.cpp
The file was modifiedlldb/tools/lldb-vscode/package.json
The file was modifiedlldb/tools/lldb-vscode/lldb-vscode.cpp
The file was modifiedlldb/packages/Python/lldbsuite/test/tools/lldb-vscode/lldbvscode_testcase.py
The file was modifiedlldb/packages/Python/lldbsuite/test/tools/lldb-vscode/vscode.py
The file was addedlldb/test/API/tools/lldb-vscode/runInTerminal/main.c
The file was modifiedlldb/tools/lldb-vscode/VSCode.h
The file was addedlldb/test/API/tools/lldb-vscode/runInTerminal/Makefile
The file was addedlldb/test/API/tools/lldb-vscode/runInTerminal/TestVSCode_runInTerminal.py
The file was modifiedlldb/tools/lldb-vscode/JSONUtils.h
The file was modifiedlldb/tools/lldb-vscode/JSONUtils.cpp
Commit 7235326fb2342227d478d63378d2ba4d5e2418db by Louis Dionne
[libc++] Upgrade the Clang on build bots
The file was modifiedlibcxx/utils/docker/debian9/buildbot/Dockerfile
The file was modifiedlibcxx/utils/docker/debian9/buildbot/docker-compose.yml
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/test/CodeGen/ARM/fminmax-folds.ll
The file was modifiedllvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
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/test/Transforms/InstCombine/select.ll
The file was modifiedllvm/test/Transforms/InstCombine/select-binop-cmp.ll
The file was modifiedllvm/lib/Transforms/InstCombine/InstCombineSelect.cpp
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 addedllvm/test/tools/llvm-ml/builtin_types.test
The file was modifiedllvm/lib/MC/MCParser/MasmParser.cpp
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/include/llvm/MC/MCParser/MCAsmParser.h
The file was addedllvm/test/tools/llvm-ml/size_inference.test
The file was modifiedllvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
The file was modifiedllvm/lib/Target/AMDGPU/AsmParser/AMDGPUAsmParser.cpp
The file was modifiedllvm/include/llvm/MC/MCParser/MCTargetAsmParser.h
The file was modifiedllvm/test/tools/llvm-ml/struct.test
The file was modifiedllvm/lib/MC/MCParser/AsmParser.cpp
The file was modifiedllvm/lib/MC/MCParser/MasmParser.cpp
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 addedllvm/test/tools/llvm-ml/proc_frame.test
The file was modifiedllvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
The file was modifiedllvm/lib/MC/MCParser/MasmParser.cpp
The file was modifiedllvm/lib/MC/MCParser/COFFMasmParser.cpp
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-fmul-legalization-soft-float.ll
The file was addedllvm/test/CodeGen/ARM/vecreduce-fmin-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-fmax-legalization-soft-float.ll
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/test/CodeGen/X86/vector-reduce-fmin-nnan.ll
The file was modifiedllvm/lib/CodeGen/SelectionDAG/LegalizeTypes.h
The file was modifiedllvm/lib/Target/ARM/ARMTargetTransformInfo.h
The file was modifiedllvm/test/CodeGen/ARM/vecreduce-fmul-legalization-soft-float.ll
The file was modifiedllvm/test/CodeGen/X86/vector-reduce-fmax-nnan.ll
The file was modifiedllvm/lib/CodeGen/SelectionDAG/LegalizeFloatTypes.cpp
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 modifiedllvm/test/CodeGen/AArch64/vecreduce-fmax-legalization.ll
The file was addedllvm/test/CodeGen/AArch64/vecreduce-fmin-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-address-load-reloc.s
The file was modifiedllvm/lib/Target/PowerPC/PPCInstrInfo.td
The file was modifiedllvm/include/llvm/BinaryFormat/ELFRelocs/PowerPC64.def
The file was modifiedllvm/lib/Target/PowerPC/MCTargetDesc/PPCELFObjectWriter.cpp
The file was modifiedllvm/lib/Target/PowerPC/PPCISelLowering.cpp
The file was modifiedllvm/lib/Target/PowerPC/PPCMCInstLower.cpp
The file was addedllvm/test/MC/PowerPC/pcrel-tls-local-exec-value-load-reloc.s
The file was addedllvm/test/CodeGen/PowerPC/pcrel-tls-local-exec.ll
The file was modifiedllvm/lib/Target/PowerPC/PPCISelLowering.h
The file was modifiedllvm/lib/Target/PowerPC/PPCInstrPrefix.td
The file was modifiedllvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp
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 addedlld/docs/ELF/warn_backrefs.rst
The file was modifiedlld/docs/index.rst
Commit 4208ea3e19f8e3e8cd35e6f5a6c43f4aa066c6ec by craig.topper
[FastISel] Bail out of selectGetElementPtr for vector GEPs.

The code that decomposes the GEP into ADD/MUL doesn't work properly
for vector GEPs. It can create bad COPY instructions or possibly
assert.

For now just bail out to SelectionDAG.

Fixes PR45906
The file was modifiedllvm/lib/CodeGen/SelectionDAG/FastISel.cpp
The file was modifiedllvm/test/CodeGen/X86/masked_gather_scatter.ll
Commit becf15527583380b510ce269ee51abd364551f13 by Louis Dionne
[libc++] Add comment in atomic test to explain why part of it is disabled on Apple
The file was modifiedlibcxx/test/std/atomics/types.pass.cpp
Commit 226d80ebe20e2d796af6c1bc43d9fbdfbb9d4a07 by tejohnson
[MemProf] Rename HeapProfiler to MemProfiler for consistency

This is consistent with the clang option added in
7ed8124d46f94601d5f1364becee9cee8538265e, and the comments on the
runtime patch in D87120.

Differential Revision: https://reviews.llvm.org/D87622
The file was modifiedllvm/test/Instrumentation/HeapProfiler/version-mismatch-check.ll
The file was modifiedclang/lib/Driver/ToolChains/CommonArgs.cpp
The file was modifiedclang/lib/Frontend/CompilerInvocation.cpp
The file was modifiedclang/lib/Driver/SanitizerArgs.cpp
The file was modifiedllvm/test/Instrumentation/HeapProfiler/basic.ll
The file was modifiedllvm/test/Instrumentation/HeapProfiler/instrumentation-use-callbacks.ll
The file was modifiedllvm/lib/Passes/PassRegistry.def
The file was modifiedllvm/lib/Transforms/Instrumentation/Instrumentation.cpp
The file was removedllvm/lib/Transforms/Instrumentation/HeapProfiler.cpp
The file was modifiedllvm/include/llvm/InitializePasses.h
The file was modifiedllvm/test/Instrumentation/HeapProfiler/masked-load-store.ll
The file was addedllvm/lib/Transforms/Instrumentation/MemProfiler.cpp
The file was modifiedllvm/test/Instrumentation/HeapProfiler/scale-granularity.ll
The file was modifiedllvm/lib/Passes/PassBuilder.cpp
The file was modifiedclang/test/Driver/fmemprof.cpp
The file was removedllvm/include/llvm/Transforms/Instrumentation/HeapProfiler.h
The file was modifiedclang/lib/CodeGen/BackendUtil.cpp
The file was modifiedclang/include/clang/Driver/SanitizerArgs.h
The file was addedllvm/include/llvm/Transforms/Instrumentation/MemProfiler.h
The file was modifiedclang/include/clang/Basic/CodeGenOptions.def
The file was modifiedllvm/lib/Transforms/Instrumentation/CMakeLists.txt
Commit 2ad38f7a46b59a5b6653239245d29590d7977b29 by llvmgnsyncbot
[gn build] Port 226d80ebe20
The file was modifiedllvm/utils/gn/secondary/llvm/lib/Transforms/Instrumentation/BUILD.gn
Commit c2590de30df23ef0db39b496cdec62a83a61fbfa by aeubanks
[docs][NewPM] Add docs for writing NPM passes

As to not conflict with the legacy PM example passes under
llvm/lib/Transforms/Hello, this is under HelloNew. This makes the
CMakeLists.txt and general directory structure less confusing for people
following the example.

Much of the doc structure was taken from WritinAnLLVMPass.rst.

This adds a HelloWorld pass which simply prints out each function name.

More will follow after this, e.g. passes over different units of IR, analyses.
https://llvm.org/docs/WritingAnLLVMPass.html contains a lot more.

Reviewed By: ychen, asbirlea

Differential Revision: https://reviews.llvm.org/D86979
The file was modifiedllvm/lib/Passes/LLVMBuild.txt
The file was addedllvm/utils/gn/secondary/llvm/lib/Transforms/HelloNew/BUILD.gn
The file was modifiedllvm/lib/Passes/PassBuilder.cpp
The file was modifiedllvm/lib/Passes/PassRegistry.def
The file was modifiedllvm/docs/WritingAnLLVMPass.rst
The file was addedllvm/include/llvm/Transforms/HelloNew/HelloWorld.h
The file was addedllvm/docs/WritingAnLLVMNewPMPass.rst
The file was addedllvm/lib/Transforms/HelloNew/CMakeLists.txt
The file was addedllvm/lib/Transforms/HelloNew/HelloWorld.cpp
The file was modifiedllvm/lib/Transforms/CMakeLists.txt
The file was addedllvm/test/Transforms/HelloNew/helloworld.ll
The file was modifiedllvm/utils/gn/secondary/llvm/lib/Passes/BUILD.gn
The file was addedllvm/lib/Transforms/HelloNew/LLVMBuild.txt
The file was modifiedllvm/docs/UserGuides.rst
The file was modifiedllvm/lib/Transforms/LLVMBuild.txt
Commit 9d01612db48fa27d18c6320974b8d711572e5c67 by Vitaly Buka
[Asan] Fix false leak report

If user thread is in the allocator, the allocator
may have no pointer into future user's part of
the allocated block. AddrIsInside ignores such
pointers and lsan reports a false memory leak.

Reviewed By: morehouse

Differential Revision: https://reviews.llvm.org/D87552
The file was modifiedcompiler-rt/lib/asan/asan_allocator.cpp
The file was addedcompiler-rt/test/asan/TestCases/redzone_noleak.cpp
Commit 7d1ed69c8aad00f3ba1e917da54508489de6d610 by joker.eph
Make namespace handling uniform across dialect backends.

Now backends spell out which namespace they want to be in, instead of relying on
clients #including them inside already-opened namespaces. This also means that
cppNamespaces should be fully qualified, and there's no implicit "::mlir::"
prepended to them anymore.

Reviewed By: mehdi_amini

Differential Revision: https://reviews.llvm.org/D86811
The file was modifiedmlir/examples/toy/Ch5/include/toy/Ops.td
The file was modifiedmlir/tools/mlir-tblgen/OpDefinitionsGen.cpp
The file was modifiedmlir/lib/Dialect/GPU/Transforms/ParallelLoopMapper.cpp
The file was modifiedmlir/include/mlir/Dialect/LLVMIR/LLVMOpBase.td
The file was modifiedmlir/test/mlir-tblgen/op-decl.td
The file was modifiedmlir/lib/Dialect/SPIRV/SPIRVAttributes.cpp
The file was modifiedmlir/test/lib/Dialect/Test/TestOps.td
The file was modifiedmlir/test/mlir-tblgen/op-attribute.td
The file was modifiedflang/include/flang/Optimizer/Dialect/FIROps.h
The file was modifiedmlir/tools/mlir-tblgen/OpFormatGen.cpp
The file was modifiedmlir/tools/mlir-tblgen/RewriterGen.cpp
The file was modifiedmlir/include/mlir/Dialect/AVX512/AVX512Dialect.h
The file was modifiedflang/include/flang/Optimizer/Dialect/FIROps.td
The file was modifiedmlir/examples/toy/Ch2/include/toy/Ops.td
The file was modifiedmlir/include/mlir/Dialect/AVX512/AVX512.td
The file was modifiedmlir/include/mlir/Dialect/LLVMIR/LLVMDialect.h
The file was modifiedmlir/include/mlir/Dialect/SPIRV/SPIRVOps.h
The file was modifiedmlir/include/mlir/Dialect/LLVMIR/ROCDLOps.td
The file was modifiedmlir/include/mlir/Dialect/SPIRV/SPIRVTypes.h
The file was modifiedmlir/include/mlir/Dialect/Quant/QuantOps.h
The file was modifiedmlir/include/mlir/Dialect/LLVMIR/NVVMDialect.h
The file was modifiedmlir/lib/Dialect/OpenMP/IR/OpenMPDialect.cpp
The file was modifiedmlir/lib/TableGen/Operator.cpp
The file was modifiedmlir/include/mlir/Dialect/LLVMIR/LLVMAVX512.td
The file was modifiedmlir/examples/toy/Ch7/include/toy/Dialect.h
The file was modifiedmlir/include/mlir/Dialect/Vector/VectorOps.td
The file was modifiedmlir/lib/Dialect/Shape/IR/Shape.cpp
The file was modifiedmlir/include/mlir/IR/OpBase.td
The file was modifiedmlir/include/mlir/Dialect/OpenMP/OpenMPDialect.h
The file was modifiedmlir/include/mlir/Dialect/LLVMIR/NVVMOps.td
The file was modifiedmlir/lib/Dialect/SPIRV/SPIRVOps.cpp
The file was modifiedmlir/include/mlir/Dialect/LLVMIR/ROCDLDialect.h
The file was modifiedmlir/include/mlir/Dialect/SCF/SCFOps.td
The file was modifiedmlir/include/mlir/Dialect/SPIRV/SPIRVDialect.h
The file was modifiedmlir/examples/toy/Ch5/include/toy/Dialect.h
The file was modifiedmlir/examples/toy/Ch6/include/toy/Ops.td
The file was modifiedmlir/lib/Dialect/LLVMIR/IR/LLVMAVX512Dialect.cpp
The file was modifiedmlir/include/mlir/Dialect/OpenMP/OpenMPOps.td
The file was modifiedmlir/lib/Dialect/AVX512/IR/AVX512Dialect.cpp
The file was modifiedmlir/include/mlir/Dialect/LLVMIR/LLVMOps.td
The file was modifiedmlir/include/mlir/Dialect/GPU/GPUDialect.h
The file was modifiedmlir/include/mlir/Dialect/SPIRV/SPIRVBase.td
The file was modifiedmlir/include/mlir/Dialect/OpenACC/OpenACCOps.td
The file was modifiedmlir/include/mlir/Dialect/GPU/GPUBase.td
The file was modifiedmlir/include/mlir/Dialect/SPIRV/SPIRVAttributes.h
The file was modifiedmlir/include/mlir/Dialect/Linalg/IR/LinalgBase.td
The file was modifiedmlir/include/mlir/TableGen/Operator.h
The file was modifiedmlir/include/mlir/Dialect/PDL/IR/PDLBase.td
The file was modifiedmlir/examples/toy/Ch3/include/toy/Dialect.h
The file was modifiedmlir/include/mlir/Dialect/Linalg/IR/LinalgOps.h
The file was modifiedmlir/tools/mlir-tblgen/DialectGen.cpp
The file was modifiedmlir/examples/toy/Ch3/include/toy/Ops.td
The file was modifiedmlir/lib/Dialect/LLVMIR/IR/NVVMDialect.cpp
The file was modifiedmlir/include/mlir/Dialect/Shape/IR/Shape.h
The file was modifiedmlir/include/mlir/Dialect/GPU/ParallelLoopMapper.h
The file was modifiedmlir/examples/toy/Ch6/include/toy/Dialect.h
The file was modifiedmlir/include/mlir/Dialect/Linalg/IR/LinalgTypes.h
The file was modifiedmlir/examples/toy/Ch2/include/toy/Dialect.h
The file was modifiedmlir/lib/Dialect/Linalg/IR/LinalgOps.cpp
The file was modifiedmlir/include/mlir/Dialect/Linalg/IR/LinalgStructuredOpsInterface.td
The file was modifiedmlir/examples/toy/Ch4/include/toy/Dialect.h
The file was modifiedmlir/include/mlir/Dialect/Vector/VectorOps.h
The file was modifiedmlir/examples/toy/Ch4/include/toy/Ops.td
The file was modifiedmlir/include/mlir/Dialect/Shape/IR/ShapeBase.td
The file was modifiedmlir/lib/Dialect/GPU/IR/GPUDialect.cpp
The file was modifiedmlir/examples/toy/Ch7/include/toy/Ops.td
The file was modifiedmlir/include/mlir/Dialect/PDL/IR/PDL.h
The file was modifiedmlir/test/lib/Dialect/Test/TestDialect.h
The file was modifiedmlir/include/mlir/Dialect/Quant/QuantOpsBase.td
The file was modifiedmlir/include/mlir/Dialect/PDLInterp/IR/PDLInterp.h
The file was modifiedmlir/lib/Dialect/PDL/IR/PDL.cpp
The file was modifiedmlir/lib/Dialect/Vector/VectorOps.cpp
The file was modifiedmlir/include/mlir/Dialect/PDLInterp/IR/PDLInterpOps.td
The file was modifiedmlir/include/mlir/Dialect/OpenACC/OpenACC.h
The file was modifiedmlir/include/mlir/Dialect/LLVMIR/LLVMAVX512Dialect.h
The file was modifiedmlir/include/mlir/Dialect/SCF/SCF.h
The file was modifiedflang/lib/Optimizer/Dialect/FIROps.cpp
The file was modifiedmlir/lib/Dialect/LLVMIR/IR/ROCDLDialect.cpp
The file was modifiedmlir/lib/Dialect/SCF/SCF.cpp
Commit db94df04fbfaa26cc3fda1ef77af32776bd10f21 by nemanja.i.ibm
Update PowerPC backend ownership in CODE_OWNERS.TXT
The file was modifiedllvm/CODE_OWNERS.TXT
Commit f859c30ecbbbeb33a90b00b76044a688b2e71879 by Austin.Kerbow
[AMDGPU] Add XDL resource to scheduling model

Reviewed By: rampitec

Differential Revision: https://reviews.llvm.org/D87621
The file was modifiedllvm/lib/Target/AMDGPU/SISchedule.td
The file was addedllvm/test/CodeGen/AMDGPU/schedule-xdl-resource.ll
Commit c193a689b475f91e63adb25dc5855f7a7f068c9a by craig.topper
[SelectionDAG] Use Align/MaybeAlign in calls to getLoad/getStore/getExtLoad/getTruncStore.

The versions that take 'unsigned' will be removed in the future.

I tried to use getOriginalAlign instead of getAlign in some
places. getAlign factors in the minimum alignment implied by
the offset in the pointer info. Since we're also passing the
pointer info we can use the original alignment.

Reviewed By: arsenm

Differential Revision: https://reviews.llvm.org/D87592
The file was modifiedllvm/lib/Target/Mips/MipsISelLowering.cpp
The file was modifiedllvm/lib/Target/XCore/XCoreISelLowering.cpp
The file was modifiedllvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
The file was modifiedllvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
The file was modifiedllvm/lib/Target/AMDGPU/SIISelLowering.cpp
The file was modifiedllvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
The file was modifiedllvm/lib/Target/X86/X86ISelLowering.cpp
The file was modifiedllvm/test/CodeGen/AArch64/usub_sat_vec.ll
The file was modifiedllvm/lib/Target/Hexagon/HexagonISelDAGToDAG.cpp
The file was modifiedllvm/test/CodeGen/PowerPC/aix-cc-abi.ll
The file was modifiedllvm/lib/Target/AVR/AVRISelLowering.cpp
The file was modifiedllvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
The file was modifiedllvm/lib/Target/Mips/MipsSEISelLowering.cpp
The file was modifiedllvm/lib/Target/SystemZ/SystemZSelectionDAGInfo.cpp
The file was modifiedllvm/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp
The file was modifiedllvm/test/CodeGen/AArch64/uadd_sat_vec.ll
The file was modifiedllvm/test/CodeGen/AArch64/ssub_sat_vec.ll
The file was modifiedllvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
The file was modifiedllvm/lib/Target/AArch64/AArch64ISelLowering.cpp
The file was modifiedllvm/lib/Target/AMDGPU/AMDGPUISelLowering.cpp
The file was modifiedllvm/lib/Target/ARM/ARMISelLowering.cpp
The file was modifiedllvm/test/CodeGen/AMDGPU/private-element-size.ll
The file was modifiedllvm/lib/Target/Sparc/SparcISelLowering.cpp
The file was modifiedllvm/test/CodeGen/AArch64/sadd_sat_vec.ll
Commit 1ec02efee9b1d01cde89f31ca9ba6a46b7662ac5 by zoecarver
[libc++] Make rotate a constexpr.

This patch makes `std::rotate` a constexpr. In doing so, this patch also
updates the internal `__move` and `__move_backward` funtions to be
constexpr.

Reviewed By: ldionne

Differential Revision: https://reviews.llvm.org/D65721
The file was modifiedlibcxx/include/algorithm
The file was modifiedlibcxx/include/iterator
The file was modifiedlibcxx/test/std/algorithms/alg.modifying.operations/alg.move/move_backward.pass.cpp
The file was modifiedlibcxx/test/std/algorithms/alg.modifying.operations/alg.rotate/rotate.pass.cpp
The file was modifiedlibcxx/test/std/algorithms/alg.modifying.operations/alg.move/move.pass.cpp
The file was modifiedlibcxx/www/cxx2a_status.html
Commit b552a30283cea1e9d3f90aef3cdd2ac24c366062 by Louis Dionne
[libc++] Finish implementing P0202R3

cppreference lists the support for this paper as partial.
I found 4 functions which the paper marks as `constexpr`,
but did not use the appropriate macro.

Differential Revision: https://reviews.llvm.org/D84275
The file was modifiedlibcxx/include/algorithm
The file was modifiedlibcxx/test/std/algorithms/alg.sorting/alg.merge/merge.pass.cpp
The file was modifiedlibcxx/test/std/algorithms/alg.modifying.operations/alg.rotate/rotate_copy.pass.cpp
The file was modifiedlibcxx/test/std/algorithms/alg.sorting/alg.merge/merge_comp.pass.cpp
The file was modifiedlibcxx/www/cxx2a_status.html
Commit 1dac073bdd95799ae2f3a40ba2073c34fd037f1b by joker.eph
Fix MLIR standalone example to properly handle namespace

ODS TableGen backend now requires to spell out which namespace they have
to be nested in, in an absolute way.
The file was modifiedmlir/examples/standalone/include/Standalone/StandaloneDialect.h
The file was modifiedmlir/examples/standalone/include/Standalone/StandaloneDialect.td
The file was modifiedmlir/examples/standalone/lib/Standalone/StandaloneOps.cpp
The file was modifiedmlir/examples/standalone/include/Standalone/StandaloneOps.h
Commit b3445c839fac0bbe174f85e39e9b08756c847465 by Louis Dionne
[libc++][test] Portability fix of std::strstreambuf constructor test

The standard does not require the constructor `strstreambuf(streamsize alsize_arg = 0)`
leave the stream array unallocated when called with parameter `alsize_arg > 0`.
Conformant implementations of this constructor may allocate minimal `alsize_arg`
number of bytes forcing `str()` method to return non-null pointer.

Thanks to Andrey Maksimov for the patch.

Differential Revision: https://reviews.llvm.org/D72465
The file was modifiedlibcxx/test/std/depr/depr.str.strstreams/depr.strstreambuf/depr.strstreambuf.cons/default.pass.cpp
Commit 44da6c2369da239517cd073f96688895081bc395 by Lang Hames
[docs] Update OrcV1 removal timeline.
The file was modifiedllvm/docs/ORCv2.rst
Commit f3d834485448b42e72c2d908a8be3d02285bd660 by aeubanks
[PruneEH][NFC] Use CallGraphUpdater in PruneEH

In preparation for porting the pass to NPM.

Reviewed By: asbirlea

Differential Revision: https://reviews.llvm.org/D87632
The file was modifiedllvm/lib/Transforms/IPO/PruneEH.cpp
Commit 5881bf0050398f4bb2d9761167d06a9ecfc8a371 by pklausler
[flang] More clean-up of CookedSource API

The std::string holding the content of a CookedSource no longer
needs to be exposed in its API after the recent work that allows
the parsing context to hold multiple instances of a CookedSource.
So clean the API.  These changes were extracted from some work in
progress that was made easier by the API changes.

Differential Revision: https://reviews.llvm.org/D87635
The file was modifiedflang/include/flang/Parser/parse-state.h
The file was modifiedflang/include/flang/Parser/provenance.h
The file was modifiedflang/lib/Parser/provenance.cpp
The file was modifiedflang/include/flang/Semantics/semantics.h
The file was modifiedflang/tools/f18/f18.cpp
The file was modifiedflang/unittests/Evaluate/intrinsics.cpp
The file was modifiedflang/lib/Parser/prescan.cpp
The file was modifiedflang/lib/Lower/OpenACC.cpp
Commit ed653184ac6385945e32535feb7af2876ec52d40 by zoecarver
Revert "[libc++] Make rotate a constexpr."

This reverts commit 1ec02efee9b1d01cde89f31ca9ba6a46b7662ac5.
The file was modifiedlibcxx/test/std/algorithms/alg.modifying.operations/alg.move/move_backward.pass.cpp
The file was modifiedlibcxx/test/std/algorithms/alg.modifying.operations/alg.rotate/rotate.pass.cpp
The file was modifiedlibcxx/www/cxx2a_status.html
The file was modifiedlibcxx/include/iterator
The file was modifiedlibcxx/include/algorithm
The file was modifiedlibcxx/test/std/algorithms/alg.modifying.operations/alg.move/move.pass.cpp
Commit 3ed89b51da38f081fedb57727076262abb81d149 by Louis Dionne
[Take 2] [libc++] Make rotate a constexpr.

This patch makes `std::rotate` a constexpr. In doing so, this patch also
updates the internal `__move` and `__move_backward` funtions to be
constexpr.

This patch was previously reverted in ed653184ac63 because it was missing
some UNSUPPORTED markup for older compilers. This commit adds it.

Differential Revision: https://reviews.llvm.org/D65721
The file was modifiedlibcxx/test/std/algorithms/alg.modifying.operations/alg.move/move_backward.pass.cpp
The file was modifiedlibcxx/test/std/algorithms/alg.modifying.operations/alg.rotate/rotate.pass.cpp
The file was modifiedlibcxx/test/std/algorithms/alg.modifying.operations/alg.move/move.pass.cpp
The file was modifiedlibcxx/test/std/algorithms/alg.modifying.operations/alg.rotate/rotate_copy.pass.cpp
The file was modifiedlibcxx/include/algorithm
The file was modifiedlibcxx/test/std/algorithms/alg.sorting/alg.merge/merge.pass.cpp
The file was modifiedlibcxx/include/iterator
The file was modifiedlibcxx/www/cxx2a_status.html
The file was modifiedlibcxx/test/std/algorithms/alg.sorting/alg.merge/merge_comp.pass.cpp
Commit cdbfb47998cd37ab0384ad944fa8e4ba1e1b47d0 by psteinfeld
[flang] Fix bug for forward referenced type

A type name in an IMPLICIT declaration that was later used in a PARAMETER
statement caused problems because the default symbol scope had not yet been
initialized.  I avoided dereferencing in the situation where the default scope
was uninitialized and added a test that triggers the problem.

Also, once I corrected the bad dereference, the compiler was putting out
misleading error messages.  The underlying error us due to violating section
7.5.10, paragraph 4, which states:
  A structure constructor shall not appear before the referenced type is
  defined.

I fixed this by testing to see if a type that is used in a structure
constructor is forward referenced.

Differential Revision: https://reviews.llvm.org/D87535
The file was modifiedflang/test/Semantics/bad-forward-type.f90
The file was modifiedflang/lib/Semantics/expression.cpp
Commit 670c276232ec2233323fab5ad4c1aeef923e9e48 by qcolombet
[GlobalISel] Add G_UNMERGE_VALUES(G_MERGE_VALUES) combine

Add the matching and applying function to the combiner helper for
G_UNMERGE_VALUES(G_MERGE_VALUES).

This combine also supports any merge-like input nodes, like G_BUILD_VECTORS
and is robust against bitcasts in between int unmerge and merge nodes.

When the input type of the merge node and the output type of the unmerge
node are not the same, but the sizes are, the combine still applies but
creates bitcasts between the sources and the destinations instead of
reusing the destinations directly.

Long term, the artifact combiner should probably reuse that helper, but
as of today, it doesn't use any outside helper, so I kept it this way.

Differential Revision: https://reviews.llvm.org/D87117
The file was modifiedllvm/include/llvm/CodeGen/GlobalISel/CombinerHelper.h
The file was addedllvm/test/CodeGen/AArch64/GlobalISel/combine-unmerge.mir
The file was modifiedllvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp
The file was modifiedllvm/include/llvm/Target/GlobalISel/Combine.td
Commit 39ec36415df5162fcffae09fde9b931e336a6f3d by aeubanks
Revert "[docs][NewPM] Add docs for writing NPM passes"

This reverts commit c2590de30df23ef0db39b496cdec62a83a61fbfa.

Breaks shared libs build
The file was modifiedllvm/lib/Transforms/CMakeLists.txt
The file was modifiedllvm/lib/Transforms/LLVMBuild.txt
The file was modifiedllvm/lib/Passes/PassRegistry.def
The file was removedllvm/lib/Transforms/HelloNew/HelloWorld.cpp
The file was removedllvm/lib/Transforms/HelloNew/LLVMBuild.txt
The file was removedllvm/lib/Transforms/HelloNew/CMakeLists.txt
The file was modifiedllvm/docs/WritingAnLLVMPass.rst
The file was modifiedllvm/lib/Passes/PassBuilder.cpp
The file was removedllvm/utils/gn/secondary/llvm/lib/Transforms/HelloNew/BUILD.gn
The file was modifiedllvm/lib/Passes/LLVMBuild.txt
The file was modifiedllvm/docs/UserGuides.rst
The file was removedllvm/docs/WritingAnLLVMNewPMPass.rst
The file was modifiedllvm/utils/gn/secondary/llvm/lib/Passes/BUILD.gn
The file was removedllvm/test/Transforms/HelloNew/helloworld.ll
The file was removedllvm/include/llvm/Transforms/HelloNew/HelloWorld.h
Commit 46f9137e43f3eb2de9990765a4c482b45b0f8dd5 by aditya_nandakumar
[GISel]: Add combine for G_FABS to G_FABS

https://reviews.llvm.org/D87554

Patch adds one new GICombinerRule for G_FABS. The combine rule folds G_FABS(G_FABS(X)) to G_FABS(X).
Patch additionally adds new combiner tests for the AArch64 target to test this new combiner rule.

Patch by mkitzan.
The file was modifiedllvm/include/llvm/CodeGen/GlobalISel/CombinerHelper.h
The file was modifiedllvm/include/llvm/Target/GlobalISel/Combine.td
The file was modifiedllvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp
The file was addedllvm/test/CodeGen/AArch64/GlobalISel/combine-fabs.mir
Commit 10b12d4035de40e5eaedddda82d9c533854eefcb by aeubanks
Reland [docs][NewPM] Add docs for writing NPM passes

As to not conflict with the legacy PM example passes under
llvm/lib/Transforms/Hello, this is under HelloNew. This makes the
CMakeLists.txt and general directory structure less confusing for people
following the example.

Much of the doc structure was taken from WritinAnLLVMPass.rst.

This adds a HelloWorld pass which simply prints out each function name.

More will follow after this, e.g. passes over different units of IR, analyses.
https://llvm.org/docs/WritingAnLLVMPass.html contains a lot more.

Relanded with missing "Support" dependency in LLVMBuild.txt.

Reviewed By: ychen, asbirlea

Differential Revision: https://reviews.llvm.org/D86979
The file was modifiedllvm/docs/UserGuides.rst
The file was modifiedllvm/lib/Passes/PassRegistry.def
The file was modifiedllvm/lib/Transforms/CMakeLists.txt
The file was addedllvm/lib/Transforms/HelloNew/HelloWorld.cpp
The file was modifiedllvm/lib/Passes/PassBuilder.cpp
The file was modifiedllvm/lib/Passes/LLVMBuild.txt
The file was modifiedllvm/lib/Transforms/LLVMBuild.txt
The file was addedllvm/docs/WritingAnLLVMNewPMPass.rst
The file was addedllvm/lib/Transforms/HelloNew/LLVMBuild.txt
The file was addedllvm/lib/Transforms/HelloNew/CMakeLists.txt
The file was addedllvm/utils/gn/secondary/llvm/lib/Transforms/HelloNew/BUILD.gn
The file was modifiedllvm/utils/gn/secondary/llvm/lib/Passes/BUILD.gn
The file was addedllvm/include/llvm/Transforms/HelloNew/HelloWorld.h
The file was addedllvm/test/Transforms/HelloNew/helloworld.ll
The file was modifiedllvm/docs/WritingAnLLVMPass.rst
Commit 6352381039c43c66f01a23be19472f7e611ffcdf by kparzysz
[Hexagon] Some HVX DAG combines

1. VINSERTW0 x, undef -> x
2. VROR (VROR x, a), b) -> VROR x, a+b
The file was modifiedllvm/lib/Target/Hexagon/HexagonISelLoweringHVX.cpp
Commit bb877d1af2ec2f624caa380350c8da00c984e754 by kparzysz
[Hexagon] Widen loads and handle any-/sign-/zero-extensions
The file was addedllvm/test/CodeGen/Hexagon/autohvx/widen-ext.ll
The file was modifiedllvm/lib/Target/Hexagon/HexagonISelLowering.h
The file was modifiedllvm/lib/Target/Hexagon/HexagonISelLoweringHVX.cpp
The file was modifiedllvm/lib/Target/Hexagon/HexagonPatternsHVX.td
The file was modifiedllvm/lib/Target/Hexagon/HexagonISelLowering.cpp
Commit f35617ad809b978635d10c0c39553840a03ac41f by kparzysz
[Hexagon] Add more detailed testcase for widening truncates
The file was addedllvm/test/CodeGen/Hexagon/autohvx/widen-trunc.ll
Commit da55e9ba1273284f1af61bceeaeb25e487838034 by Chris.Hamilton
[Sema] Address-space sensitive index check for unbounded arrays

Check applied to unbounded (incomplete) arrays and pointers
to spot cases where the computed address is beyond the
largest possible addressable extent of the array, based
on the address space in which the array is delcared, or
which the pointer refers to.

Check helps to avoid cases of nonsense pointer math and
array indexing which could lead to linker failures or
runtime exceptions.  Of particular interest when building
for embedded systems with small address spaces.

Reviewed By: aaron.ballman

Differential Revision: https://reviews.llvm.org/D86796
The file was modifiedclang/test/Sema/const-eval.c
The file was modifiedclang/test/SemaCXX/constant-expression-cxx1y.cpp
The file was modifiedclang/include/clang/Basic/DiagnosticSemaKinds.td
The file was modifiedclang/lib/Sema/SemaChecking.cpp
The file was addedclang/test/Sema/unbounded-array-bounds.c
Commit 32515938901685bcbc438d5f5bb03cb8a9f4c637 by craig.topper
[X86] Place new constant node in topological order in X86DAGToDAGISel::matchBitExtract.

Fixes PR47525
The file was addedllvm/test/CodeGen/X86/pr47525.ll
The file was modifiedllvm/lib/Target/X86/X86ISelDAGToDAG.cpp
Commit a36278c2f8b5ba7e964ef2cdc14ef8c3f8b8a045 by qcolombet
[GlobalISel] Add G_UNMERGE(Cst) -> Cst1, Cst2, ... combine

Add a combiner helper that replaces G_UNMERGE of big constants into direct
use of smaller constants.

Differential Revision: https://reviews.llvm.org/D87166
The file was modifiedllvm/test/CodeGen/AArch64/GlobalISel/combine-unmerge.mir
The file was modifiedllvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp
The file was modifiedllvm/include/llvm/CodeGen/GlobalISel/CombinerHelper.h
The file was modifiedllvm/include/llvm/Target/GlobalISel/Combine.td
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/saddsat.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/sdiv.i64.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/udiv.i64.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/urem.i64.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/srem.i64.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/ssubsat.ll
Commit 1d70984fa220f966ddcecd7906c5f10368fe1b93 by Vitaly Buka
[Asan] Accept __lsan_ignore_object for redzone pointer

The check that the pointer inside of the user part of the chunk does not
adds any value, but it's the last user of AddrIsInside.

I'd like to simplify AsanChunk in followup patches.

Reviewed By: morehouse

Differential Revision: https://reviews.llvm.org/D87642
The file was modifiedcompiler-rt/lib/asan/asan_allocator.cpp
The file was modifiedcompiler-rt/test/asan/TestCases/lsan_annotations.cpp
Commit e6bc7037d386184d94bf68b184d0ac62b96a4098 by listmail
[AArch64] Statepoint support for AArch64.

Differential Revision: https://reviews.llvm.org/D66012
Patch By: loicottet (with major rebase by me)
The file was modifiedllvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp
The file was addedllvm/test/CodeGen/AArch64/statepoint-call-lowering.ll
The file was modifiedllvm/lib/Target/AArch64/AArch64ISelLowering.cpp
The file was modifiedllvm/lib/Target/AArch64/AArch64RegisterInfo.cpp
The file was modifiedllvm/lib/Target/AArch64/AArch64AsmPrinter.cpp
The file was modifiedllvm/lib/Target/AArch64/AArch64InstrInfo.cpp
Commit 4706880f06fbaf5f95dab2b6fd4cd2a5cf1693e6 by pklausler
[flang] Allow Fortran comments after #include path

C-style /*comments*/ are removed during preprocessing directive
tokenization, but Fortran !comments need to be specifically
allowed.

Fixes LLVM bugzilla 47466.

Differential Revision: https://reviews.llvm.org/D87638
The file was addedflang/test/Preprocessing/empty.h
The file was modifiedflang/lib/Parser/preprocessor.cpp
The file was addedflang/test/Preprocessing/include-comment.F90
Commit da1aaa0b7080049e0d6ef82a4a6784e89c20f059 by craig.topper
Revert "[X86] Place new constant node in topological order in X86DAGToDAGISel::matchBitExtract."

I got the bug number wrong.

This reverts commit 32515938901685bcbc438d5f5bb03cb8a9f4c637.
The file was modifiedllvm/lib/Target/X86/X86ISelDAGToDAG.cpp
The file was removedllvm/test/CodeGen/X86/pr47525.ll
Commit 46673763fe598aa9d3f0edaf1ba7a1645c4eacfe by craig.topper
[X86] Place new constant node in topological order in X86DAGToDAGISel::matchBitExtract

Fixes PR47482
The file was addedllvm/test/CodeGen/X86/pr47482.ll
The file was modifiedllvm/lib/Target/X86/X86ISelDAGToDAG.cpp
Commit b2cf572b562048f54b774d9cef88cf792a33ab31 by pklausler
[flang] Respect BZ mode in exponent parts, too

The Fortran standard discusses BZ mode (treat blanks as zero digits)
explicitly in its effect on the editing of the digits prior to the
exponent part, but doesn't mention it in description of the
exponent part.  Other compilers honor BZ mode in the exponent,
so we should do so too.  So "1 e 1 " is 1.E11 in BZ mode.

Differential Revision: https://reviews.llvm.org/D87653
The file was modifiedflang/unittests/Runtime/hello.cpp
The file was modifiedflang/runtime/edit-input.cpp
Commit 8bd0dc5bfe23fdfba110eefd33ff658289a307ab by Louis Dionne
[libc++abi] Do not declare __cxa_finalize and __cxa_atexit in <cxxabi.h>

These functions are not defined by libc++abi, so they don't belong in <cxxabi.h>.

Differential Revision: https://reviews.llvm.org/D75795
The file was modifiedlibcxxabi/include/cxxabi.h
Commit d2321129bda712a0e7ee222c7cb6a62e5ca5b6f4 by qcolombet
[GlobalISel] Add `X,Y<dead> = G_UNMERGE Z` -> X = G_TRUNC Z

Add a combiner helper that replaces G_UNMERGE where all the destination lanes
are dead except the first one with a G_TRUNC.

Differential Revision: https://reviews.llvm.org/D87174
The file was modifiedllvm/include/llvm/CodeGen/GlobalISel/CombinerHelper.h
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/postlegalizercombiner-select.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/regbankselect-amdgcn.s.buffer.load.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/llvm.amdgcn.s.buffer.load.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/combine-shl-narrow.mir
The file was modifiedllvm/test/CodeGen/AArch64/GlobalISel/combine-unmerge.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/legalize-llvm.amdgcn.image.store.2d.d16.ll
The file was modifiedllvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp
The file was modifiedllvm/include/llvm/Target/GlobalISel/Combine.td