SuccessChanges

Summary

  1. [AMDGPU] Fix crash when dag-combining bitcast (details)
  2. [mlir][Type] Remove the remaining usages of Type::getKind in preparation for its removal (details)
  3. [lld-macho] Support dynamic linking of thread-locals (details)
  4. [lld-macho] Generate ObjC symbols from .tbd files (details)
  5. [lld-macho] Avoid unnecessary shared_ptr in DylibFile ctor (details)
  6. [lld-macho] Add error handling for malformed TBD files (details)
  7. [lld-macho] Support larger dylib symbol ordinals in bindings (details)
  8. [lld-macho] Implement -force_load (details)
  9. [lld-macho] Support -rpath (details)
  10. [macho2yaml] Remove an unused variable. NFC. (details)
  11. [lld-macho] Try to fix invalid-stub test on Windows (details)
  12. [AMDGPU] Pre-commit test for D85872 (details)
  13. [lld-macho] Fix invalid-stub test on Windows, take 2 (details)
  14. [HotColdSplit] Fix variable name spelling (details)
  15. [Clang options] Optimize optionMatches() runtime by removing mallocs (details)
  16. Revert "[SCEV] Look through single value PHIs." (details)
  17. [NFC] [PowerPC] Rename SPE strict conversion test (details)
  18. [flang][msvc] Use platform-independent primitives in temporary f18 driver. (details)
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 (diff)
The file was modifiedllvm/lib/Target/AMDGPU/AMDGPUISelLowering.cpp (diff)
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/MLIRContext.cpp (diff)
The file was modifiedmlir/lib/IR/AsmPrinter.cpp (diff)
The file was modifiedmlir/lib/Dialect/SPIRV/SPIRVTypes.cpp (diff)
The file was modifiedmlir/lib/Dialect/LLVMIR/IR/LLVMTypeSyntax.cpp (diff)
The file was modifiedmlir/lib/Conversion/StandardToLLVM/StandardToLLVM.cpp (diff)
The file was modifiedmlir/lib/Dialect/Shape/IR/Shape.cpp (diff)
The file was modifiedmlir/include/mlir/IR/StandardTypes.h (diff)
The file was modifiedmlir/lib/IR/Builders.cpp (diff)
The file was modifiedmlir/lib/IR/StandardTypes.cpp (diff)
The file was modifiedmlir/lib/IR/Attributes.cpp (diff)
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/SymbolTable.cpp (diff)
The file was modifiedlld/MachO/SyntheticSections.cpp (diff)
The file was modifiedlld/MachO/ExportTrie.cpp (diff)
The file was modifiedlld/MachO/Writer.cpp (diff)
The file was modifiedlld/MachO/Symbols.h (diff)
The file was addedlld/test/MachO/invalid/bad-got-to-tlv-reference.s
The file was modifiedlld/MachO/InputSection.cpp (diff)
The file was modifiedlld/MachO/SyntheticSections.h (diff)
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 addedlld/test/MachO/invalid/bad-tlv-relocation.s
The file was modifiedlld/MachO/Arch/X86_64.cpp (diff)
The file was modifiedlld/MachO/InputFiles.cpp (diff)
The file was modifiedlld/MachO/SymbolTable.h (diff)
The file was modifiedlld/MachO/InputSection.h (diff)
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/test/MachO/stub-link.s (diff)
The file was modifiedlld/test/MachO/Inputs/MacOSX.sdk/System/Library/Frameworks/CoreFoundation.framework/CoreFoundation.tbd (diff)
The file was modifiedlld/MachO/InputFiles.cpp (diff)
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.cpp (diff)
The file was modifiedlld/MachO/Driver.cpp (diff)
The file was modifiedlld/MachO/InputFiles.h (diff)
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 addedlld/test/MachO/invalid/invalid-stub.s
The file was modifiedlld/MachO/Driver.cpp (diff)
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 (diff)
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 addedlld/test/MachO/force-load.s
The file was modifiedlld/MachO/Driver.cpp (diff)
The file was modifiedlld/test/MachO/invalid/bad-archive.s (diff)
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/Driver.cpp (diff)
The file was modifiedlld/MachO/Options.td (diff)
The file was addedlld/test/MachO/rpath.s
The file was modifiedlld/MachO/Config.h (diff)
The file was modifiedlld/MachO/Writer.cpp (diff)
Commit 449b4d2a8b2ad1ae9555338a810a8fb74158d16b by Xing
[macho2yaml] Remove an unused variable. NFC.
The file was modifiedllvm/tools/obj2yaml/macho2yaml.cpp (diff)
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 (diff)
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 (diff)
Commit 7d32e6e3f0a94ae65ffc19d3948658365584d048 by jezng
[lld-macho] Fix invalid-stub test on Windows, take 2
The file was modifiedlld/test/MachO/invalid/invalid-stub.s (diff)
Commit f902a7eccf30a762d9a533c3884edfb692c26a09 by 1894981+hiraditya
[HotColdSplit] Fix variable name spelling
The file was modifiedllvm/lib/Transforms/IPO/HotColdSplitting.cpp (diff)
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 (diff)
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 (diff)
The file was modifiedllvm/lib/Analysis/ScalarEvolution.cpp (diff)
The file was modifiedllvm/test/Analysis/ScalarEvolution/solve-quadratic-overflow.ll (diff)
The file was modifiedllvm/test/Transforms/LoopStrengthReduce/funclet.ll (diff)
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 (diff)
The file was modifiedflang/tools/f18-parse-demo/f18-parse-demo.cpp (diff)