SuccessChanges

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)
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 removedmlir/include/mlir/IR/DialectHooks.h
The file was modifiedmlir/lib/IR/Attributes.cpp
The file was modifiedmlir/include/mlir/IR/Dialect.h
The file was addedmlir/include/mlir/Interfaces/FoldInterfaces.h
The file was modifiedmlir/lib/IR/Dialect.cpp
The file was addedmlir/include/mlir/Interfaces/DecodeAttributesInterfaces.h
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/include/mlir/Transforms/FoldUtils.h
The file was modifiedmlir/test/lib/Dialect/Test/TestDialect.cpp
The file was modifiedmlir/include/mlir/Interfaces/FoldInterfaces.h
The file was modifiedmlir/lib/Transforms/Utils/FoldUtils.cpp
The file was modifiedmlir/docs/Canonicalization.md
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/lib/Target/AMDGPU/AMDGPUISelLowering.cpp
The file was modifiedllvm/test/CodeGen/AMDGPU/amdgcn.bitcast.ll
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/Dialect/SPIRV/SPIRVTypes.cpp
The file was modifiedmlir/lib/Dialect/Shape/IR/Shape.cpp
The file was modifiedmlir/lib/IR/StandardTypes.cpp
The file was modifiedmlir/include/mlir/IR/StandardTypes.h
The file was modifiedmlir/lib/IR/MLIRContext.cpp
The file was modifiedmlir/lib/Conversion/StandardToLLVM/StandardToLLVM.cpp
The file was modifiedmlir/lib/IR/Builders.cpp
The file was modifiedmlir/lib/Dialect/LLVMIR/IR/LLVMTypeSyntax.cpp
The file was modifiedmlir/lib/IR/AsmPrinter.cpp
The file was modifiedmlir/lib/IR/Attributes.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 modifiedlld/MachO/InputSection.h
The file was modifiedlld/MachO/SymbolTable.cpp
The file was modifiedlld/MachO/InputFiles.cpp
The file was modifiedlld/MachO/Writer.cpp
The file was modifiedlld/MachO/ExportTrie.cpp
The file was addedlld/test/MachO/invalid/bad-got-to-dylib-tlv-reference.s
The file was addedlld/test/MachO/tlv-dylib.s
The file was modifiedlld/MachO/Symbols.h
The file was modifiedlld/MachO/SyntheticSections.h
The file was modifiedlld/MachO/Arch/X86_64.cpp
The file was addedlld/test/MachO/invalid/bad-got-to-tlv-reference.s
The file was addedlld/test/MachO/invalid/bad-tlv-relocation.s
The file was modifiedlld/MachO/SymbolTable.h
The file was modifiedlld/MachO/SyntheticSections.cpp
The file was modifiedlld/MachO/InputSection.cpp
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/InputFiles.cpp
The file was modifiedlld/MachO/Driver.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 modifiedlld/MachO/Driver.cpp
The file was addedlld/test/MachO/force-load.s
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/Config.h
The file was modifiedlld/MachO/Options.td
The file was modifiedlld/MachO/Driver.cpp
The file was modifiedlld/MachO/Writer.cpp
The file was addedlld/test/MachO/rpath.s