FailedChanges

Summary

  1. Remove DialectHooks and introduce a Dialect Interfaces instead (details)
  2. Merge OpFolderDialectInterface with DialectFoldInterface (NFC) (details)
  3. [AMDGPU] Fix crash when dag-combining bitcast (details)
  4. [mlir][Type] Remove the remaining usages of Type::getKind in preparation for its removal (details)
  5. [lld-macho] Support dynamic linking of thread-locals (details)
  6. [lld-macho] Generate ObjC symbols from .tbd files (details)
  7. [lld-macho] Avoid unnecessary shared_ptr in DylibFile ctor (details)
  8. [lld-macho] Add error handling for malformed TBD files (details)
  9. [lld-macho] Support larger dylib symbol ordinals in bindings (details)
  10. [lld-macho] Implement -force_load (details)
  11. [lld-macho] Support -rpath (details)
  12. [macho2yaml] Remove an unused variable. NFC. (details)
  13. [lld-macho] Try to fix invalid-stub test on Windows (details)
  14. [AMDGPU] Pre-commit test for D85872 (details)
  15. [lld-macho] Fix invalid-stub test on Windows, take 2 (details)
  16. [HotColdSplit] Fix variable name spelling (details)
  17. [Clang options] Optimize optionMatches() runtime by removing mallocs (details)
  18. Revert "[SCEV] Look through single value PHIs." (details)
  19. [NFC] [PowerPC] Rename SPE strict conversion test (details)
  20. [flang][msvc] Use platform-independent primitives in temporary f18 driver. (details)
  21. [OpenMP] Ensure testing for versions 4.5 and default - Part 1 (details)
  22. [Parser] Suppress -Wempty-translation-unit if this is a header file (details)
  23. [flang] Compilation fix. (details)
  24. [SyntaxTree] Split tests for expressions (details)
  25. [SyntaxTree] Rename tests following `TestSuite_TestCase` + nits (details)
  26. [compiler-rt][asan][test] Skipt sanitizer_common tests on Sparc (details)
  27. [AMDGPU] Fix typo. NFC (details)
  28. [test] XFAIL two tests with inlining debug info issues on Sparc (details)
Commit c224bc71af4d190f913ac7784a4f475aab2f1cd7 by joker.eph
Remove DialectHooks and introduce a Dialect Interfaces instead

These hooks were introduced before the Interfaces mechanism was available.

DialectExtractElementHook is unused and entirely removed. The
DialectConstantFoldHook is used a fallback in the
operation fold() method, and is replaced by a DialectInterface.
The DialectConstantDecodeHook is used for interpreting OpaqueAttribute
and should be revamped, but is replaced with an interface in 1:1 fashion
for now.

Differential Revision: https://reviews.llvm.org/D85595
The file was addedmlir/include/mlir/Interfaces/DecodeAttributesInterfaces.h
The file was modifiedmlir/lib/IR/Dialect.cpp
The file was addedmlir/include/mlir/Interfaces/FoldInterfaces.h
The file was modifiedmlir/include/mlir/IR/Dialect.h
The file was removedmlir/include/mlir/IR/DialectHooks.h
The file was modifiedmlir/lib/IR/Attributes.cpp
The file was modifiedmlir/lib/IR/Operation.cpp
Commit b28e3db88d053b94250562f837758dc8a92a0a0f by joker.eph
Merge OpFolderDialectInterface with DialectFoldInterface (NFC)

Reviewed By: rriddle

Differential Revision: https://reviews.llvm.org/D85823
The file was modifiedmlir/test/lib/Dialect/Test/TestDialect.cpp
The file was modifiedmlir/lib/Transforms/Utils/FoldUtils.cpp
The file was modifiedmlir/docs/Canonicalization.md
The file was modifiedmlir/include/mlir/Interfaces/FoldInterfaces.h
The file was modifiedmlir/include/mlir/Transforms/FoldUtils.h
Commit 18b1e675232b44c905bce28211286f7df6434f27 by ruiling.song
[AMDGPU] Fix crash when dag-combining bitcast

From the code after the 'break', they are processing 64bit scalar and
vector bitcast. So I think the break-condition should be (cond1 || cond2)
This means we only execute following code if (64bit and dest-is-vector).

Also remove a previous fix which is not needed with this new fix.
(introduced in: 1349a04ef5f594dda705ec80474dda4837f26dba)

Reviewed By: arsenm

Differential Revision: https://reviews.llvm.org/D85804
The file was modifiedllvm/test/CodeGen/AMDGPU/amdgcn.bitcast.ll
The file was modifiedllvm/lib/Target/AMDGPU/AMDGPUISelLowering.cpp
Commit 65277126bf90401436e018fcce0fc636d34ea771 by riddleriver
[mlir][Type] Remove the remaining usages of Type::getKind in preparation for its removal

This revision removes all of the lingering usages of Type::getKind. A consequence of this is that FloatType is now split into 4 derived types that represent each of the possible float types(BFloat16Type, Float16Type, Float32Type, and Float64Type). Other than this split, this revision is NFC.

Reviewed By: mehdi_amini

Differential Revision: https://reviews.llvm.org/D85566
The file was modifiedmlir/lib/IR/Attributes.cpp
The file was modifiedmlir/lib/IR/Builders.cpp
The file was modifiedmlir/lib/IR/AsmPrinter.cpp
The file was modifiedmlir/lib/IR/MLIRContext.cpp
The file was modifiedmlir/include/mlir/IR/StandardTypes.h
The file was modifiedmlir/lib/IR/StandardTypes.cpp
The file was modifiedmlir/lib/Dialect/LLVMIR/IR/LLVMTypeSyntax.cpp
The file was modifiedmlir/lib/Dialect/Shape/IR/Shape.cpp
The file was modifiedmlir/lib/Conversion/StandardToLLVM/StandardToLLVM.cpp
The file was modifiedmlir/lib/Dialect/SPIRV/SPIRVTypes.cpp
Commit 3c9100fb785c400c457ce83ba724a3b762b2348a by jezng
[lld-macho] Support dynamic linking of thread-locals

References to symbols in dylibs work very similarly regardless of
whether the symbol is a TLV. The main difference is that we have a
separate `__thread_ptrs` section that acts as the GOT for these
thread-locals.

We can identify thread-locals in dylibs by a flag in their export trie
entries, and we cross-check it with the relocations that refer to them
to ensure that we are not using a GOT relocation to reference a
thread-local (or vice versa).

Reviewed By: #lld-macho, smeenai

Differential Revision: https://reviews.llvm.org/D85081
The file was addedlld/test/MachO/invalid/bad-got-to-dylib-tlv-reference.s
The file was addedlld/test/MachO/invalid/bad-tlv-relocation.s
The file was modifiedlld/MachO/InputFiles.cpp
The file was addedlld/test/MachO/tlv-dylib.s
The file was addedlld/test/MachO/invalid/bad-got-to-tlv-reference.s
The file was modifiedlld/MachO/ExportTrie.cpp
The file was modifiedlld/MachO/InputSection.h
The file was modifiedlld/MachO/SymbolTable.h
The file was modifiedlld/MachO/SymbolTable.cpp
The file was modifiedlld/MachO/InputSection.cpp
The file was modifiedlld/MachO/SyntheticSections.h
The file was modifiedlld/MachO/Writer.cpp
The file was modifiedlld/MachO/SyntheticSections.cpp
The file was modifiedlld/MachO/Arch/X86_64.cpp
The file was modifiedlld/MachO/Symbols.h
Commit a499898e86ec322ed47b43aaabdd3fedbf58840a by jezng
[lld-macho] Generate ObjC symbols from .tbd files

I followed similar logic in TapiFile.cpp.

Reviewed By: #lld-macho, smeenai

Differential Revision: https://reviews.llvm.org/D85255
The file was modifiedlld/MachO/InputFiles.cpp
The file was modifiedlld/test/MachO/Inputs/MacOSX.sdk/System/Library/Frameworks/CoreFoundation.framework/CoreFoundation.tbd
The file was modifiedlld/test/MachO/stub-link.s
Commit 7e6d6754998058457c2ec94e89daf7f998d970a0 by jezng
[lld-macho] Avoid unnecessary shared_ptr in DylibFile ctor

DylibFile doesn't store a pointer to its InterfaceFile
parameter, so there's no need to use a shared_ptr.

Reviewed By: #lld-macho, compnerd

Differential Revision: https://reviews.llvm.org/D85402
The file was modifiedlld/MachO/InputFiles.h
The file was modifiedlld/MachO/Driver.cpp
The file was modifiedlld/MachO/InputFiles.cpp
Commit c3eb1e27547094405bc0ecbbd7b993912106c28c by jezng
[lld-macho] Add error handling for malformed TBD files

Previously, lld would crash while complaining that `Expected<T>
must be checked before access or destruction`.

Reviewed By: #lld-macho, compnerd

Differential Revision: https://reviews.llvm.org/D85403
The file was modifiedlld/MachO/Driver.cpp
The file was addedlld/test/MachO/invalid/invalid-stub.s
Commit 180ad756ec5c41b7771404a5da13af7f268f4859 by jezng
[lld-macho] Support larger dylib symbol ordinals in bindings

Do folks care if we don't have a test for this? Creating 16
dylibs to trigger this straightforward code path seems a little tedious

Reviewed By: #lld-macho, smeenai

Differential Revision: https://reviews.llvm.org/D85467
The file was modifiedlld/MachO/SyntheticSections.cpp
Commit 437e6bd286acc2515b0b4eb622c2a2e9539e1ab6 by jezng
[lld-macho] Implement -force_load

It's similar to lld-ELF's `-whole-archive`, but applied to individual
archives instead of to a series of them.

Reviewed By: #lld-macho, smeenai

Differential Revision: https://reviews.llvm.org/D85550
The file was modifiedlld/test/MachO/invalid/bad-archive.s
The file was addedlld/test/MachO/force-load.s
The file was modifiedlld/MachO/Driver.cpp
Commit e48d1262b88f7088f3e2b41b459f508829a2ea1c by jezng
[lld-macho] Support -rpath

Pretty straightforward; just emits LC_RPATH for dyld to consume.

Note that lld itself does not yet support dylib lookup via @rpath.

Reviewed By: #lld-macho, compnerd

Differential Revision: https://reviews.llvm.org/D85701
The file was modifiedlld/MachO/Options.td
The file was modifiedlld/MachO/Config.h
The file was modifiedlld/MachO/Driver.cpp
The file was modifiedlld/MachO/Writer.cpp
The file was addedlld/test/MachO/rpath.s
Commit 449b4d2a8b2ad1ae9555338a810a8fb74158d16b by Xing
[macho2yaml] Remove an unused variable. NFC.
The file was modifiedllvm/tools/obj2yaml/macho2yaml.cpp
Commit 11e2c253ac7993abbe347c048247453e0b423a32 by jezng
[lld-macho] Try to fix invalid-stub test on Windows

Summary: Path separator issues...
The file was modifiedlld/test/MachO/invalid/invalid-stub.s
Commit 2781f3003bab5656d9b0915d3be05d44d738f870 by carl.ritson
[AMDGPU] Pre-commit test for D85872
The file was modifiedllvm/test/CodeGen/AMDGPU/transform-block-with-return-to-epilog.ll
Commit 7d32e6e3f0a94ae65ffc19d3948658365584d048 by jezng
[lld-macho] Fix invalid-stub test on Windows, take 2
The file was modifiedlld/test/MachO/invalid/invalid-stub.s
Commit f902a7eccf30a762d9a533c3884edfb692c26a09 by 1894981+hiraditya
[HotColdSplit] Fix variable name spelling
The file was modifiedllvm/lib/Transforms/IPO/HotColdSplitting.cpp
Commit d54c252bc8a15bc80bb9f0a83b3bebc6d211144a by nadav256
[Clang options] Optimize optionMatches() runtime by removing mallocs

The method optionMatches() constructs 9865 std::string instances when comparing different
options. Many of these instances exceed the size of the internal storage and force memory
allocations. This patch adds an early exit check that eliminates most of the string allocations
while keeping the code simple.

Example inputs:
Prefix: /, Name: Fr
Prefix: -, Name: Fr
Prefix: -, Name: fsanitize-address-field-padding=
Prefix: -, Name: fsanitize-address-globals-dead-stripping
Prefix: -, Name: fsanitize-address-poison-custom-array-cookie
Prefix: -, Name: fsanitize-address-use-after-scope
Prefix: -, Name: fsanitize-address-use-odr-indicator
Prefix: -, Name: fsanitize-blacklist=

Differential Revision: D85538
The file was modifiedllvm/lib/Option/OptTable.cpp
Commit 0581c0b0eeba03da590d1176a4580cf9b9e8d1e3 by tamur
Revert "[SCEV] Look through single value PHIs."

This reverts commit e441b7a7a0a72c28daf5a8e594559c667e5b4534.

This patch causes a compile error in tensorflow opensource project. The stack trace looks like:

Point of crash:
llvm/include/llvm/Analysis/LoopInfoImpl.h : line 35

(gdb) ptype *this
type = const class llvm::LoopBase<llvm::BasicBlock, llvm::Loop> [with BlockT = llvm::BasicBlock, LoopT = llvm::Loop]

(gdb) p *this
$1 = {ParentLoop = 0x0, SubLoops = std::vector of length 0, capacity 0, Blocks = std::vector of length 0, capacity 1,
  DenseBlockSet = {<llvm::SmallPtrSetImpl<llvm::BasicBlock const*>> = {<llvm::SmallPtrSetImplBase> = {<llvm::DebugEpochBase> = {Epoch = 3}, SmallArray = 0x1b2bf6c8, CurArray = 0x1b2bf6c8,
        CurArraySize = 8, NumNonEmpty = 0, NumTombstones = 0}, <No data fields>}, SmallStorage = {0xfffffffffffffffe, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}}, IsInvalid = true}

(gdb) p *this->DenseBlockSet->CurArray
$2 = (const void *) 0xfffffffffffffffe

I will try to get a case from tensorflow or use creduce to get a small case.
The file was modifiedllvm/test/Analysis/ScalarEvolution/solve-quadratic-i1.ll
The file was modifiedllvm/test/Analysis/ScalarEvolution/solve-quadratic-overflow.ll
The file was modifiedllvm/lib/Analysis/ScalarEvolution.cpp
The file was modifiedllvm/test/Transforms/LoopStrengthReduce/funclet.ll
Commit 1ce26c9d658694f640e2b615498f9eeb57612d28 by qiucofan
[NFC] [PowerPC] Rename SPE strict conversion test
The file was addedllvm/test/CodeGen/PowerPC/fp-strict-conv-spe.ll
The file was removedllvm/test/CodeGen/PowerPC/fp-strict-conv.ll
Commit 18e9482e44ed2b59008a8a3b05c6c49ef0243b6d by llvm-project
[flang][msvc] Use platform-independent primitives in temporary f18 driver.

Use functions for process launching, temporary file creation and file deletion from LLVM support library instead of POSIX-specific ones.

This patch is part of the series to [[ http://lists.llvm.org/pipermail/flang-dev/2020-July/000448.html | make flang compilable with MS Visual Studio ]].

Reviewed By: DavidTruby

Differential Revision: https://reviews.llvm.org/D85660
The file was modifiedflang/tools/f18/f18.cpp
The file was modifiedflang/tools/f18-parse-demo/f18-parse-demo.cpp
Commit eaa341fbea961894759355256d25d785509002ef by Saiyedul.Islam
[OpenMP] Ensure testing for versions 4.5 and default - Part 1

Many OpenMP Clang tests do not RUN for version 4.5 and the default
version. This first patch in the series only handles test cases
which do not require any modifications in the CHECK lines after
adding RUN lines for default version.

Reviewed By: ABataev

Differential Revision: https://reviews.llvm.org/D84844
The file was modifiedclang/test/OpenMP/parallel_if_codegen.cpp
The file was modifiedclang/test/OpenMP/teams_distribute_parallel_for_if_codegen.cpp
The file was modifiedclang/test/OpenMP/parallel_for_if_messages.cpp
The file was modifiedclang/test/OpenMP/target_parallel_codegen.cpp
The file was modifiedclang/test/OpenMP/parallel_master_if_messages.cpp
The file was modifiedclang/test/OpenMP/target_parallel_for_codegen.cpp
The file was modifiedclang/test/OpenMP/target_teams_thread_limit_codegen.cpp
The file was modifiedclang/test/OpenMP/target_exit_data_ast_print.cpp
The file was modifiedclang/test/OpenMP/cancel_if_messages.cpp
The file was modifiedclang/test/OpenMP/parallel_if_messages.cpp
The file was modifiedclang/test/OpenMP/target_teams_distribute_codegen.cpp
The file was modifiedclang/test/OpenMP/target_teams_num_teams_codegen.cpp
The file was modifiedclang/test/OpenMP/teams_distribute_parallel_for_if_messages.cpp
The file was modifiedclang/test/OpenMP/task_if_messages.cpp
The file was modifiedclang/test/OpenMP/target_ast_print.cpp
The file was modifiedclang/test/OpenMP/target_teams_distribute_if_messages.cpp
The file was modifiedclang/test/OpenMP/cancel_ast_print.cpp
The file was modifiedclang/test/OpenMP/target_update_if_messages.cpp
The file was modifiedclang/test/OpenMP/target_teams_if_messages.cpp
The file was modifiedclang/test/OpenMP/distribute_parallel_for_num_threads_codegen.cpp
The file was modifiedclang/test/OpenMP/distribute_parallel_for_if_codegen.cpp
The file was modifiedclang/test/OpenMP/distribute_parallel_for_if_messages.cpp
The file was modifiedclang/test/OpenMP/target_parallel_if_messages.cpp
The file was modifiedclang/test/OpenMP/target_enter_data_ast_print.cpp
The file was modifiedclang/test/OpenMP/target_if_messages.cpp
The file was modifiedclang/test/OpenMP/target_teams_distribute_parallel_for_if_messages.cpp
The file was modifiedclang/test/OpenMP/distribute_parallel_for_reduction_codegen.cpp
The file was modifiedclang/test/OpenMP/target_enter_data_if_messages.cpp
The file was modifiedclang/test/OpenMP/cancel_codegen_cleanup.cpp
The file was modifiedclang/test/OpenMP/report_default_DSA.cpp
The file was modifiedclang/test/OpenMP/parallel_sections_if_messages.cpp
The file was modifiedclang/test/OpenMP/capturing_in_templates.cpp
The file was modifiedclang/test/OpenMP/nvptx_target_requires_unified_shared_memory.cpp
The file was modifiedclang/test/OpenMP/teams_distribute_parallel_for_simd_num_threads_codegen.cpp
The file was modifiedclang/test/OpenMP/target_parallel_num_threads_codegen.cpp
The file was modifiedclang/test/OpenMP/parallel_default_messages.cpp
The file was modifiedclang/test/OpenMP/teams_distribute_parallel_for_num_threads_codegen.cpp
The file was modifiedclang/test/OpenMP/cancel_codegen.cpp
The file was modifiedclang/test/OpenMP/task_if_codegen.cpp
The file was modifiedclang/test/OpenMP/target_exit_data_if_messages.cpp
The file was modifiedclang/test/OpenMP/distribute_parallel_for_simd_num_threads_codegen.cpp
The file was modifiedclang/test/OpenMP/target_teams_distribute_parallel_for_if_codegen.cpp
Commit c286d6fdeeb2b103777d3ae8c9de84937cb51efe by sam.mccall
[Parser] Suppress -Wempty-translation-unit if this is a header file

This is motivated by tooling (clangd, libclang etc) - headers without
declarations are legitimate even if they're not valid TUs.

The other use -x c-header cases (PCH/modules) are nonstandard anyway and this
warning doesn't seem necessary there either.

Differential Revision: https://reviews.llvm.org/D85789
The file was modifiedclang/test/Parser/empty-translation-unit.c
The file was modifiedclang/lib/Parse/Parser.cpp
Commit 8199cd8a550dab8f9b4035d34b7e576892daab09 by llvm-project
[flang] Compilation fix.

unlink() was changed to llvm::sys::fs::remove() in f18.cpp, but the same
change also has to be applied to f18-parse-demo.cpp.
The file was modifiedflang/tools/f18-parse-demo/f18-parse-demo.cpp
Commit d1211fd1ec037f88c2cc855bc850200948c76940 by ecaldas
[SyntaxTree] Split tests for expressions

We do that because:
* Big tests generated big tree dumps that could hardly serve as documentation.
* In most cases the tests didn't share setup, thus there was not much addition in lines of code.

We split tests for:
* `UserDefinedLiteral`
* `NestedBinaryOperator`
* `UserDefinedBinaryOperator`
* `UserDefinedPrefixOperator`
* `QualifiedId`

Differential Revision: https://reviews.llvm.org/D85819
The file was modifiedclang/unittests/Tooling/Syntax/TreeTest.cpp
Commit 833c2b6be26bcdf90aac2f6de6e345bcd858149e by ecaldas
[SyntaxTree] Rename tests following `TestSuite_TestCase` + nits
The file was modifiedclang/unittests/Tooling/Syntax/TreeTest.cpp
Commit 55e472e9dab68c0cb21a65237c5240dfe6105c01 by ro
[compiler-rt][asan][test] Skipt sanitizer_common tests on Sparc

When building on `sparc64-unknown-linux-gnu`, I found that a large number
of `SanitizerCommon-asan-sparc*-Linux` tests were `FAIL`ing, like

   SanitizerCommon-asan-sparc-Linux :: Linux/aligned_alloc-alignment.cpp
  [...]
   SanitizerCommon-asan-sparcv9-Linux :: Linux/aligned_alloc-alignment.cpp
  [...]

many of them due to

  fatal error: error in backend: Function "_Z14User_OnSIGSEGViP9siginfo_tPv": over-aligned dynamic alloca not supported.

which breaks ASan on Sparc.  Currently ASan is only built for the benefit
of `gcc` where it does work.  However, when enabling the compilation in
`compiler-rt` to make certain it continues to build, I missed
`compiler-rt/test/sanitizer_common` when disabling ASan testing on Sparc
(it's not yet enabled on Solaris).

This patch fixes the issue.

Tested on `sparcv9-sun-solaris2.11` with the `sanitizer_comon` testsuite enabled.

Differential Revision: https://reviews.llvm.org/D85732
The file was modifiedcompiler-rt/test/sanitizer_common/CMakeLists.txt
Commit ca227d73e10a99ab1563830eca17b6e8e0a71eae by sebastian.neubauer
[AMDGPU] Fix typo. NFC
The file was modifiedllvm/docs/AMDGPUUsage.rst
Commit 7af4bbb643393a735b1b49d1b9c4f316a4834333 by ro
[test] XFAIL two tests with inlining debug info issues on Sparc

Currently only two test failures remain on Sparc, both
`sparcv9-sun-solaris2.11` and `sparc64-unknown-linux-gnu`:

  LLVM :: DebugInfo/Generic/debug-label-inline.ll
  LLVM :: Linker/subprogram-linkonce-weak.ll

They seem related in that debug info isn't generated for instruction
bundles (like `retl+add` in the delay slot).

I've filed separate bugs for both files (Bug 47129 and 47131), though it's
probably the same issue.

This patch `XFAIL`s the tests.

Tested on `sparcv9-sun-solaris2.11` and `amd64-pc-solaris2.11`.

Differential Revision: https://reviews.llvm.org/D85827
The file was modifiedllvm/test/DebugInfo/Generic/debug-label-inline.ll
The file was modifiedllvm/test/Linker/subprogram-linkonce-weak.ll