FailedChanges

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

Summary

  1. Make the AsmPrinter print "<<NULL TYPE>>" instead of crashing on null types (details)
  2. [DebugInfo]: Allow DwarfCompileUnit to have line table symbol (details)
  3. [InlineFunction] Update metadata on loads that are return values (details)
  4. [mlir][Pass] Add documentation for the declarative pass specification (details)
  5. [mlir] Update the documentation on Canonicalization (details)
  6. [MLIR][NFC] Make AsmPrinter messages on null structures consistent (details)
  7. [X86][SSE] Combine unary shuffle(HORIZOP,HORIZOP) -> HORIZOP (details)
  8. Remove unused function 'isInRange'. NFCI. (details)
  9. Add documentation and testing for (details)
  10. Permit constant evaluation of mixed __builtin_memcmp between char and (details)
  11. [mlir] Only number the parent operation in Block::printAsOperand (details)
  12. [mlir] Refactor and cleanup the translation facilities. (details)
  13. DebugInfo: Fix default template parameter computation for dependent non-type template parameters (details)
  14. [mlir][spirv] NFC: remove uncessary return after llvm_unreachable (details)
  15. [ORC] Add MachO universal binary support to StaticLibraryDefinitionGenerator. (details)
  16. Expose `attributor-disable` to the new and old pass managers (details)
  17. [OpenMP][NFCI] Move OpenMP clause information to `lib/Frontend/OpenMP` (details)
  18. [clang] Persist Attr::IsPackExpansion into the PCH (details)
  19. [DAGCombiner] Replace a hardcoded constant in visitZERO_EXTEND with a proper check for the condition its trying to protect. (details)
  20. [OpenMP] Add extra qualification to OpenMP clause id (details)
  21. [OpenMP][NFC] Move and simplify directive -> allowed clause mapping (details)
  22. [DAGCombiner] Use getAnyExtOrTrunc instead of getSExtOrTrunc in the zext(setcc) combine. (details)
  23. PR45239: Don't deallocate TemplateIdAnnotations if they might still be (details)
Commit 96eb38418bcc2e11f9b991629231451dc8c19555 by joker.eph
Make the AsmPrinter print "<<NULL TYPE>>" instead of crashing on null types

Even if this indicates in general a problem at call sites, the printer
is used for debugging and avoiding crashing is friendlier for example
when used in diagnostics or other printer.

Differential Revision: https://reviews.llvm.org/D77481
The file was modifiedmlir/lib/IR/AsmPrinter.cpp
Commit 0d71782f4e29784873080571f7aebd5bdd163f3f by SourabhSingh.Tomar
[DebugInfo]: Allow DwarfCompileUnit to have line table symbol

Previously line table symbol was represented as `DIE::value_iterator`
inside `DwarfCompileUnit` and subsequent function `intStmtList`
was used to create a local `MCSymbol` to initialize it.

This patch removes `DIE::value_iterator` from `DwarfCompileUnit`
and intoduce `MCSymbol` for representing this units symbol for
`debug_line` section. As a result `applyStmtList` is also modified
to utilize this. Further more a helper function `getLineTableStartSym`
is also introduced to get this symbol, this would be used by clients
which need to access this line table, i.e `debug_macro`.

Reviewed By: dblaikie

Differential Revision: https://reviews.llvm.org/D77489
The file was modifiedllvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h
The file was modifiedllvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
Commit 1d0f757904919d19f1cf5dcd307874bceb1e9efb by anna
[InlineFunction] Update metadata on loads that are return values

This patch builds upon D76140 by updating metadata on pointer typed
loads in inlined functions, when the load is the return value, and the
callsite contains return attributes which can be updated as metadata on
the load.
Added test cases show this for nonnull, dereferenceable,
dereferenceable_or_null

Reviewed-By: jdoerfert

Differential Revision: https://reviews.llvm.org/D76792
The file was addedllvm/test/Transforms/Inline/ret_load_metadata.ll
The file was modifiedllvm/lib/Transforms/Utils/InlineFunction.cpp
Commit c7b83a4fe581bef4696faca3ebe74c20ef65bff6 by riddleriver
[mlir][Pass] Add documentation for the declarative pass specification

Summary:
This revision adds a section to WritingAPass to document the declarative specification, and how to use it.

Differential Revision: https://reviews.llvm.org/D77102
The file was modifiedmlir/docs/WritingAPass.md
Commit 8d0bc0348240437804004064311ee326d7279cc4 by riddleriver
[mlir] Update the documentation on Canonicalization

Summary: This updates the canonicalization documentation, and properly documents the different ways of canonicalizing operations.

Differential Revision: https://reviews.llvm.org/D77490
The file was modifiedmlir/docs/Canonicalization.md
Commit 34392b518f9ae50bce1aee066ed8343820bde1e2 by uday
[MLIR][NFC] Make AsmPrinter messages on null structures consistent

Make AsmPrinter messages on null structures consistent: use <<NULL ...>>.

Differential Revision: https://reviews.llvm.org/D77509
The file was modifiedmlir/lib/IR/AsmPrinter.cpp
Commit 4431a29c60e7c56fe17a1053f7ae55994af6fdba by llvm-dev
[X86][SSE] Combine unary shuffle(HORIZOP,HORIZOP) -> HORIZOP

We had previously limited the shuffle(HORIZOP,HORIZOP) combine to binary shuffles, but we can often merge unary shuffles just as well, folding in UNDEF/ZERO values into the 64-bit half lanes.

For the (P)HADD/HSUB cases this is limited to fast-horizontal cases but PACKSS/PACKUS combines under all cases.
The file was modifiedllvm/test/CodeGen/X86/vec_saddo.ll
The file was modifiedllvm/test/CodeGen/X86/vec_umulo.ll
The file was modifiedllvm/test/CodeGen/X86/vec_ssubo.ll
The file was modifiedllvm/test/CodeGen/X86/vec_uaddo.ll
The file was modifiedllvm/test/CodeGen/X86/haddsub-undef.ll
The file was modifiedllvm/lib/Target/X86/X86ISelLowering.cpp
The file was modifiedllvm/test/CodeGen/X86/phaddsub-undef.ll
The file was modifiedllvm/test/CodeGen/X86/vec_usubo.ll
The file was modifiedllvm/test/CodeGen/X86/haddsub-shuf.ll
The file was modifiedllvm/test/CodeGen/X86/vec_smulo.ll
The file was modifiedllvm/test/CodeGen/X86/shuffle-vs-trunc-256.ll
Commit a43e23360657e3df82af6b96b403d1a5a3174744 by llvm-dev
Remove unused function 'isInRange'. NFCI.
The file was modifiedllvm/lib/Target/X86/X86ISelLowering.cpp
Commit 7f24db01751da6953782630bb42dcca8a111590b by richard
Add documentation and testing for
2c88a485c71155c19e512f22c54e63ee337282a3.

Also extend it to cover memchr for consistency.
The file was modifiedclang/test/SemaCXX/constexpr-string.cpp
The file was modifiedclang/docs/LanguageExtensions.rst
The file was modifiedclang/lib/AST/ExprConstant.cpp
Commit 944db8a433f591e514219c12fa33b7e8fdd5e883 by richard
Permit constant evaluation of mixed __builtin_memcmp between char and
char8_t.
The file was modifiedclang/test/SemaCXX/constexpr-string.cpp
The file was modifiedclang/lib/AST/ExprConstant.cpp
Commit c9da04d6604dda656bb2000e634e2e7764f486bf by riddleriver
[mlir] Only number the parent operation in Block::printAsOperand

Summary: Blocks are numbered locally within a region, so numbering above the parent region is unnecessary.

Differential Revision: https://reviews.llvm.org/D77510
The file was modifiedmlir/lib/IR/AsmPrinter.cpp
Commit 74d44c43e8caa5d325106b0587ea030360ed01c9 by riddleriver
[mlir] Refactor and cleanup the translation facilities.

Summary:
This revision performs several cleanups on the translation infra:
* Removes the TranslateCLParser library and consolidates into Translation
  - This was a weird library that existed in Support, and didn't really justify being a standalone library.
* Cleans up the internal registration and consolidates all of the translation functions within one registry.

Differential Revision: https://reviews.llvm.org/D77514
The file was modifiedmlir/lib/Translation/CMakeLists.txt
The file was removedmlir/lib/Support/TranslateClParser.cpp
The file was removedmlir/include/mlir/Support/TranslateClParser.h
The file was modifiedmlir/tools/mlir-translate/CMakeLists.txt
The file was modifiedmlir/include/mlir/Translation.h
The file was modifiedmlir/lib/Support/CMakeLists.txt
The file was modifiedmlir/lib/Translation/Translation.cpp
The file was modifiedmlir/tools/mlir-translate/mlir-translate.cpp
Commit e9644e6f4f21e6b6177ef9085cdc9ed9f44b7783 by dblaikie
DebugInfo: Fix default template parameter computation for dependent non-type template parameters

This addresses the immediate bug, though in theory we could still
produce a default parameter for the DWARF in this test case - but other
cases will be definitely unachievable (you could have a default
parameter that cannot be evaluated - so long as the user overrode it
with another value rather than relying on that default)
The file was modifiedclang/test/CodeGenCXX/debug-info-template-parameter.cpp
The file was modifiedclang/lib/CodeGen/CGDebugInfo.cpp
Commit 322c235a522b880a830fd2f22da5f9591fa1d468 by antiagainst
[mlir][spirv] NFC: remove uncessary return after llvm_unreachable
The file was modifiedmlir/lib/Dialect/SPIRV/SPIRVLowering.cpp
Commit 1b39c6f62c7c0345f2260f1cca26f93c0fb2f75a by Lang Hames
[ORC] Add MachO universal binary support to StaticLibraryDefinitionGenerator.

Add a new overload of StaticLibraryDefinitionGenerator::Load that takes a triple
argument and supports loading archives from MachO universal binaries in addition
to regular archives.

The LLI tool is updated to use this overload.
The file was modifiedllvm/include/llvm/Object/MachOUniversal.h
The file was modifiedllvm/tools/lli/lli.cpp
The file was modifiedllvm/include/llvm/ExecutionEngine/Orc/ExecutionUtils.h
The file was modifiedllvm/lib/ExecutionEngine/Orc/ExecutionUtils.cpp
The file was addedllvm/test/ExecutionEngine/OrcLazy/macho-universal-static-library-support.ll
The file was modifiedllvm/utils/lit/lit/llvm/config.py
Commit b43b59fcc0e7743ea5112ca397c0aae810091e5c by johannes
Expose `attributor-disable` to the new and old pass managers

The new and old pass managers (PassManagerBuilder.cpp and
PassBuilder.cpp) are exposed to an `extern` declaration of
`attributor-disable` option which will guard the addition of the
attributor passes to the pass pipelines.

Reviewed By: jdoerfert

Differential Revision: https://reviews.llvm.org/D76871
The file was modifiedllvm/lib/Passes/PassBuilder.cpp
The file was modifiedllvm/lib/Transforms/IPO/PassManagerBuilder.cpp
The file was modifiedllvm/test/Transforms/Attributor/ArgumentPromotion/invalidation.ll
The file was modifiedllvm/test/Other/new-pm-thinlto-defaults.ll
The file was modifiedllvm/test/Other/new-pm-defaults.ll
The file was modifiedllvm/test/Other/pass-pipelines.ll
The file was modifiedllvm/test/Other/opt-O3-pipeline.ll
The file was modifiedllvm/lib/Transforms/IPO/Attributor.cpp
The file was modifiedllvm/test/Other/opt-O2-pipeline.ll
The file was modifiedllvm/test/Other/new-pm-thinlto-postlink-pgo-defaults.ll
The file was modifiedllvm/test/Other/new-pm-thinlto-prelink-pgo-defaults.ll
The file was modifiedllvm/test/Other/new-pm-thinlto-prelink-samplepgo-defaults.ll
The file was modifiedllvm/test/Other/opt-Os-pipeline.ll
The file was modifiedllvm/test/Other/new-pm-thinlto-postlink-samplepgo-defaults.ll
Commit 419a559c5a73f13578d891feb1299cada08d581e by johannes
[OpenMP][NFCI] Move OpenMP clause information to `lib/Frontend/OpenMP`

This is a cleanup and normalization patch that also enables reuse with
Flang later on. A follow up will clean up and move the directive ->
clauses mapping.

Reviewed By: fghanim

Differential Revision: https://reviews.llvm.org/D77112
The file was modifiedclang/lib/StaticAnalyzer/Core/CMakeLists.txt
The file was modifiedclang/include/clang/AST/OpenMPClause.h
The file was modifiedclang/lib/AST/StmtProfile.cpp
The file was modifiedclang/include/clang/Basic/OpenMPKinds.def
The file was modifiedclang/include/clang/Basic/OpenMPKinds.h
The file was modifiedclang/lib/Parse/ParseOpenMP.cpp
The file was modifiedclang/lib/Serialization/ASTWriter.cpp
The file was modifiedclang/lib/CodeGen/CGOpenMPRuntimeNVPTX.cpp
The file was modifiedclang/lib/ASTMatchers/Dynamic/Marshallers.h
The file was modifiedclang/lib/AST/ASTTypeTraits.cpp
The file was modifiedclang/lib/AST/OpenMPClause.cpp
The file was modifiedllvm/include/llvm/Frontend/OpenMP/OMPKinds.def
The file was modifiedclang/lib/AST/AttrImpl.cpp
The file was modifiedclang/lib/ASTMatchers/CMakeLists.txt
The file was modifiedclang/lib/Sema/TreeTransform.h
The file was modifiedllvm/include/llvm/Frontend/OpenMP/OMPConstants.h
The file was modifiedclang/include/clang/Basic/Attr.td
The file was modifiedclang/include/clang/AST/RecursiveASTVisitor.h
The file was modifiedllvm/lib/Frontend/OpenMP/OMPConstants.cpp
The file was modifiedclang/lib/Basic/OpenMPKinds.cpp
The file was modifiedclang/lib/AST/TextNodeDumper.cpp
The file was modifiedclang/lib/Serialization/ASTReader.cpp
The file was modifiedclang/include/clang/AST/ASTTypeTraits.h
The file was modifiedclang/lib/Sema/SemaOpenMP.cpp
The file was modifiedclang/tools/libclang/CIndex.cpp
The file was modifiedclang/include/clang/AST/ASTFwd.h
The file was modifiedclang/lib/Analysis/CMakeLists.txt
The file was modifiedclang/lib/StaticAnalyzer/Checkers/CMakeLists.txt
The file was modifiedclang/unittests/ASTMatchers/ASTMatchersNarrowingTest.cpp
Commit 8b3b7556e9ab6084e9fd337d64dac1c165867d32 by zeratul976
[clang] Persist Attr::IsPackExpansion into the PCH

Summary: Fixes https://github.com/clangd/clangd/issues/309

Subscribers: ilya-biryukov, kadircet, usaxena95, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D77194
The file was addedclang/test/PCH/cxx-attrs-packexpansion.cpp
The file was modifiedclang/utils/TableGen/ClangAttrEmitter.cpp
Commit 586c051a27070fc7fa3b04f220ed2b3e73c685b7 by craig.topper
[DAGCombiner] Replace a hardcoded constant in visitZERO_EXTEND with a proper check for the condition its trying to protect.

This code is replacing a shift with a new shift on an extended type.
If the shift amount type can't represent the maximum shift amount
for the new type, the amount needs to be extended to a type that
can.

Previously, the code just hardcoded a check for 256 bits which
seems to have been an assumption that the original shift amount
was MVT::i8. But that seems more catered to a specific target
like X86 that uses i8 as its legal shift amount type. Other
targets may use different types.

This commit changes the code to look at the real type of the shift
amount and makes sure it has enough bits for the Log2 of the
new type. There are similar checks to this in SelectionDAGBuilder
and LegalizeIntegerTypes.
The file was modifiedllvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
Commit 8ea07f62a6f06bdb7da981425227995423867a4d by johannes
[OpenMP] Add extra qualification to OpenMP clause id

Forgot to adjust this use in 419a559c5a73f13578d891feb1299cada08d581e.
The file was modifiedclang-tools-extra/clang-tidy/openmp/UseDefaultNoneCheck.cpp
Commit 931c0cd713ee9b082389727bed1b518c6a44344f by johannes
[OpenMP][NFC] Move and simplify directive -> allowed clause mapping

Move the listing of allowed clauses per OpenMP directive to the new
macro file in `llvm/Frontend/OpenMP`. Also, use a single generic macro
that specifies the directive and one allowed clause explicitly instead
of a dedicated macro per directive.

We save 800 loc and boilerplate for all new directives/clauses with no
functional change. We also need to include the macro file only once and
not once per directive.

Depends on D77112.

Reviewed By: JonChesterfield

Differential Revision: https://reviews.llvm.org/D77113
The file was modifiedclang/include/clang/ASTMatchers/ASTMatchers.h
The file was modifiedclang/unittests/AST/CMakeLists.txt
The file was modifiedclang/unittests/ASTMatchers/Dynamic/CMakeLists.txt
The file was modifiedclang/lib/Tooling/CMakeLists.txt
The file was modifiedclang/unittests/Rename/CMakeLists.txt
The file was modifiedclang/unittests/Tooling/CMakeLists.txt
The file was modifiedclang/lib/ASTMatchers/Dynamic/CMakeLists.txt
The file was modifiedclang/unittests/Sema/CMakeLists.txt
The file was modifiedllvm/include/llvm/Frontend/OpenMP/OMPKinds.def
The file was modifiedllvm/lib/Frontend/OpenMP/OMPConstants.cpp
The file was modifiedclang/include/clang/Basic/OpenMPKinds.def
The file was modifiedclang/unittests/ASTMatchers/CMakeLists.txt
The file was modifiedclang/include/clang/Basic/OpenMPKinds.h
The file was modifiedllvm/include/llvm/Frontend/OpenMP/OMPConstants.h
The file was modifiedclang/lib/Basic/OpenMPKinds.cpp
The file was modifiedclang/unittests/StaticAnalyzer/CMakeLists.txt
The file was modifiedclang/lib/Tooling/Transformer/CMakeLists.txt
The file was modifiedclang/unittests/Analysis/CMakeLists.txt
Commit 97e57f3b24509efcadf83eb7436c044a2becd973 by craig.topper
[DAGCombiner] Use getAnyExtOrTrunc instead of getSExtOrTrunc in the zext(setcc) combine.

We're ANDing with 1 right after which will cause the SIGN_EXTEND to
be combined to ANY_EXTEND later. Might as well just start with an
ANY_EXTEND.

While there replace create the AND using the getZeroExtendInReg
helper to remove the need to explicitly create the VecOnes constant.
The file was modifiedllvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
Commit 6163aa96799cbad7f2f58e02c5bebee9647056a5 by richard
PR45239: Don't deallocate TemplateIdAnnotations if they might still be
in the token stream.

Previously we deleted all template-id annotations at the end of each
top-level declaration. That doesn't work: we can do some lookahead and
form a template-id annotation, and then roll back that lookahead, parse,
and decide that we're missing a semicolon at the end of a top-level
declaration, before we reach the annotation token. In that situation,
we'd end up parsing the annotation token after deleting its associated
data, leading to various forms of badness.

We now only delete template-id annotations if the preprocessor can
assure us that there are no annotation tokens left in the token stream
(or if we're already at EOF). This lets us delete the annotation tokens
earlier in a lot of cases; we now clean them up at the end of each
statement and class member, not just after each top-level declaration.
This also permitted some simplification of the delay-parsed templates
cleanup code.
The file was modifiedclang/include/clang/Parse/RAIIObjectsForParser.h
The file was modifiedclang/lib/Parse/Parser.cpp
The file was modifiedclang/lib/Parse/ParseTemplate.cpp
The file was modifiedclang/lib/Parse/ParseDeclCXX.cpp
The file was modifiedclang/include/clang/Lex/Preprocessor.h
The file was modifiedclang/lib/Parse/ParseStmt.cpp
The file was modifiedclang/include/clang/Parse/Parser.h
The file was modifiedclang/test/Parser/cxx-template-decl.cpp