SuccessChanges

Summary

  1. [lld][WebAssembly] Emit all return types of multivalue functions (details)
  2. [Sanitizer] Fix segfaults during unwinding on SystemZ (details)
  3. [InstSimplify] Extract abs intrinsic tests into separate file (NFC) (details)
  4. [InstSimplify] Add additional abs intrinsic icmp tests (NFC) (details)
  5. [ValueTracking] Add abs intrinsics support to computeConstantRange() (details)
  6. Build a flat LLDB.framework for embedded Darwin targets (details)
  7. [libcxx][test] Fix a -Wstring-concatenation warning in fuzzer_test.h (details)
  8. [lldb] Fix unit test parsing to handle CR+LF as well as LF (details)
  9. [MLIR][NFC] Remove tblgen:: prefix in TableGen/*.cpp files (details)
  10. [flang][msvc] Remove default arguments for function specializations. (details)
  11. [NFC][MLIR][OpenMP] Add comments and test for OpenMP enum declaration utility (details)
  12. [Coverage] Enable emitting gap area between macros (details)
  13. [PowerPC]  Implement Vector Shift Builtins (details)
  14. [lldb] Fix relative imports and set the appropriate include dirs (details)
  15. PR47143: Don't crash while constant-evaluating value-initialization of (details)
  16. Remove DialectHooks and introduce a Dialect Interfaces instead (details)
  17. Merge OpFolderDialectInterface with DialectFoldInterface (NFC) (details)
  18. [AMDGPU] Fix crash when dag-combining bitcast (details)
  19. [mlir][Type] Remove the remaining usages of Type::getKind in preparation for its removal (details)
  20. [lld-macho] Support dynamic linking of thread-locals (details)
  21. [lld-macho] Generate ObjC symbols from .tbd files (details)
  22. [lld-macho] Avoid unnecessary shared_ptr in DylibFile ctor (details)
  23. [lld-macho] Add error handling for malformed TBD files (details)
  24. [lld-macho] Support larger dylib symbol ordinals in bindings (details)
  25. [lld-macho] Implement -force_load (details)
  26. [lld-macho] Support -rpath (details)
  27. [macho2yaml] Remove an unused variable. NFC. (details)
  28. [lld-macho] Try to fix invalid-stub test on Windows (details)
  29. [AMDGPU] Pre-commit test for D85872 (details)
  30. [lld-macho] Fix invalid-stub test on Windows, take 2 (details)
Commit 304264e73d2956e18083cdcdafecf57b1677a25a by tlively
[lld][WebAssembly] Emit all return types of multivalue functions

We previously were incorrectly emitting only the first result type.

Differential Revision: https://reviews.llvm.org/D85783
The file was addedlld/test/wasm/multivalue-return-func-types.s
The file was modifiedlld/wasm/WriterUtils.cpp
Commit eca4b4007d6bafd5fc4be24e2b275ffc22841c63 by iii
[Sanitizer] Fix segfaults during unwinding on SystemZ

Every now and then SystemZ programs built with ASan crash with

    ERROR: AddressSanitizer: stack-overflow on address 0x040000000000

for no apparent reason. The problem is that
BufferedStackTrace::UnwindFast() is specialized for SystemZ: it takes
register 14 from the frame, however, IsValidFrame() is not
specialized, and does not guarantee that frame[14] is going to be a
valid memory access.

Fix by introducing per-arch kFrameSize and using it in IsValidFrame().

Reviewed By: uweigand

Differential Revision: https://reviews.llvm.org/D85822
The file was modifiedcompiler-rt/lib/sanitizer_common/sanitizer_stacktrace.h
Commit 7397a019b80b1068249f82cd8d0b30510b1ea877 by nikita.ppv
[InstSimplify] Extract abs intrinsic tests into separate file (NFC)

Also move some tests from InstCombine to InstSimplify,
as they are already handled by InstSimplify.
The file was addedllvm/test/Transforms/InstSimplify/abs_intrinsic.ll
The file was modifiedllvm/test/Transforms/InstCombine/abs-intrinsic.ll
The file was modifiedllvm/test/Transforms/InstSimplify/call.ll
Commit 6446c1184001ae7ec3ab83062a61661dc41fe29a by nikita.ppv
[InstSimplify] Add additional abs intrinsic icmp tests (NFC)

While abs >= 0 already folds, some variations thereon don't.
The file was modifiedllvm/test/Transforms/InstSimplify/abs_intrinsic.ll
Commit eba5f5f79823d8fd50f9e1e7f143e3210cc01823 by nikita.ppv
[ValueTracking] Add abs intrinsics support to computeConstantRange()

Implementation is the same as for SPF_ABS.
The file was modifiedllvm/lib/Analysis/ValueTracking.cpp
The file was modifiedllvm/test/Transforms/InstCombine/abs-intrinsic.ll
The file was modifiedllvm/test/Transforms/InstSimplify/abs_intrinsic.ll
Commit d49aedd315e35180b1df19476353ebe2558a318b by Vedant Kumar
Build a flat LLDB.framework for embedded Darwin targets

This patch configures LLDB.framework to build as a flat unversioned
framework on non-macOS Darwin targets, which have never supported the
macOS framework layout.

This patch also renames the 'IOS' cmake variable to 'APPLE_EMBEDDED' to
reflect the fact that lldb is built for several different kinds of embedded
Darwin targets, not just iOS.

Differential Revision: https://reviews.llvm.org/D85770
The file was modifiedlldb/tools/lldb-server/CMakeLists.txt
The file was modifiedlldb/cmake/modules/LLDBFramework.cmake
The file was modifiedlldb/unittests/debugserver/CMakeLists.txt
The file was modifiedlldb/cmake/modules/LLDBConfig.cmake
The file was modifiedlldb/source/Host/CMakeLists.txt
The file was modifiedlldb/tools/debugserver/source/CMakeLists.txt
Commit cc6d9f59fdbaf8b36b811562124ebabdc778ba2d by erik.pilkington
[libcxx][test] Fix a -Wstring-concatenation warning in fuzzer_test.h

This was causing failures on green dragon:
http://lab.llvm.org:8080/green/job/libc++%20and%20libc++abi%20trunk/780/
The file was modifiedlibcxx/test/libcxx/fuzzing/fuzzer_test.h
Commit 7ddfb956e1a5ee91d0d30f33ca0c84faeb471db4 by amccarth
[lldb] Fix unit test parsing to handle CR+LF as well as LF

Apparently when the strings are created, the `'\n'` is converted to the
platform's natural new line indicator, which is CR+LF on Windows.  But
upon reading back with `sscanf`, the CRs caused a matching failure.
The file was modifiedlldb/unittests/Utility/TimerTest.cpp
Commit 12d16de538ce3726ea08ff415b34d97bed205a0d by jurahul
[MLIR][NFC] Remove tblgen:: prefix in TableGen/*.cpp files

- Add "using namespace mlir::tblgen" in several of the TableGen/*.cpp files and
  eliminate the tblgen::prefix to reduce code clutter.

Differential Revision: https://reviews.llvm.org/D85800
The file was modifiedmlir/lib/TableGen/Argument.cpp
The file was modifiedmlir/lib/TableGen/Format.cpp
The file was modifiedmlir/lib/TableGen/OpTrait.cpp
The file was modifiedmlir/lib/TableGen/Pattern.cpp
The file was modifiedmlir/lib/TableGen/Attribute.cpp
The file was modifiedmlir/lib/TableGen/Dialect.cpp
The file was modifiedmlir/lib/TableGen/OpClass.cpp
The file was modifiedmlir/include/mlir/TableGen/OpClass.h
The file was modifiedmlir/lib/TableGen/Operator.cpp
The file was modifiedmlir/lib/TableGen/Predicate.cpp
Commit 62ef1cb2079123b86878e4bfed3c14db448f1373 by llvm-project
[flang][msvc] Remove default arguments for function specializations.

C++ does not allow function template specializations to have default arguments. IIUC callers will only use the default arguments of the primary template. gcc and clang accept the syntax anyway, but msvc emits an error.

See https://en.cppreference.com/w/cpp/language/template_specialization for more details.

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/D85657
The file was modifiedflang/include/flang/Decimal/decimal.h
Commit fc544dcf2daa378c74ea6dd4c86ed5478e7b48c5 by kiran.chandramohan
[NFC][MLIR][OpenMP] Add comments and test for OpenMP enum declaration utility

Reviewed By: mehdi_amini

Differential Revision: https://reviews.llvm.org/D85857
The file was modifiedmlir/tools/mlir-tblgen/OpenMPCommonGen.cpp
The file was addedmlir/test/mlir-tblgen/openmp-common.td
Commit a31c89c1b7a0a2fd3e2c0b8a587a60921abf4abd by zequanwu
[Coverage] Enable emitting gap area between macros

Differential Revision: https://reviews.llvm.org/D85176
The file was modifiedclang/test/CoverageMapping/macros.c
The file was modifiedclang/lib/CodeGen/CoverageMappingGen.cpp
The file was modifiedclang/test/CoverageMapping/if.cpp
The file was modifiedclang/test/CoverageMapping/macroscopes.cpp
The file was modifiedclang/test/CoverageMapping/macro-expressions.cpp
The file was modifiedclang/test/CoverageMapping/moremacros.c
The file was modifiedclang/test/CoverageMapping/macroparams2.c
Commit 3136cbe29e74e19e6cb71c5ce71e4b92a63d03d8 by albionapc
[PowerPC]  Implement Vector Shift Builtins

This patch implements the builtins for the vector shifts (shl, srl, sra), and
adds the appropriate test cases for these builtins. The builtins utilize the
vector shift instructions introduced within ISA 3.1.

Differential Revision: https://reviews.llvm.org/D83338
The file was modifiedclang/lib/Headers/altivec.h
The file was modifiedllvm/lib/Target/PowerPC/PPCISelLowering.cpp
The file was addedllvm/test/CodeGen/PowerPC/p10-vector-shift.ll
The file was modifiedclang/test/CodeGen/builtins-ppc-p10vector.c
The file was modifiedllvm/lib/Target/PowerPC/PPCInstrPrefix.td
Commit fbfd831ddac2a9dd2e7bcdf179c88de7c9c5f5ae by Jonas Devlieghere
[lldb] Fix relative imports and set the appropriate include dirs

After moving python.swig and lua.swig into their respective
subdirectories, the relative paths in these files were out of date. This
fixes that and ensures the appropriate include paths are set in the SWIG
invocation.

Differential revision: https://reviews.llvm.org/D85859
The file was modifiedlldb/bindings/python/python.swig
The file was modifiedlldb/bindings/lua/CMakeLists.txt
The file was modifiedlldb/bindings/python/CMakeLists.txt
The file was modifiedlldb/bindings/lua/lua.swig
Commit bd08e0cf1cb1f1f294e4253ba5907ec4c81b05fe by richard
PR47143: Don't crash while constant-evaluating value-initialization of
an array of unknown bound as the initializer of an array new expression.
The file was modifiedclang/lib/AST/ExprConstant.cpp
The file was modifiedclang/test/SemaCXX/constant-expression-cxx2a.cpp
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 modifiedmlir/include/mlir/IR/Dialect.h
The file was addedmlir/include/mlir/Interfaces/FoldInterfaces.h
The file was removedmlir/include/mlir/IR/DialectHooks.h
The file was modifiedmlir/lib/IR/Dialect.cpp
The file was modifiedmlir/lib/IR/Attributes.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/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
The file was modifiedmlir/test/lib/Dialect/Test/TestDialect.cpp
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/Dialect/LLVMIR/IR/LLVMTypeSyntax.cpp
The file was modifiedmlir/lib/IR/MLIRContext.cpp
The file was modifiedmlir/lib/IR/Attributes.cpp
The file was modifiedmlir/lib/IR/Builders.cpp
The file was modifiedmlir/include/mlir/IR/StandardTypes.h
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/AsmPrinter.cpp
The file was modifiedmlir/lib/IR/StandardTypes.cpp
The file was modifiedmlir/lib/Conversion/StandardToLLVM/StandardToLLVM.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.cpp
The file was modifiedlld/MachO/InputSection.h
The file was modifiedlld/MachO/ExportTrie.cpp
The file was modifiedlld/MachO/SyntheticSections.h
The file was addedlld/test/MachO/invalid/bad-tlv-relocation.s
The file was addedlld/test/MachO/invalid/bad-got-to-dylib-tlv-reference.s
The file was addedlld/test/MachO/invalid/bad-got-to-tlv-reference.s
The file was modifiedlld/MachO/InputFiles.cpp
The file was modifiedlld/MachO/Writer.cpp
The file was modifiedlld/MachO/Symbols.h
The file was modifiedlld/MachO/Arch/X86_64.cpp
The file was modifiedlld/MachO/SymbolTable.cpp
The file was addedlld/test/MachO/tlv-dylib.s
The file was modifiedlld/MachO/SymbolTable.h
The file was modifiedlld/MachO/SyntheticSections.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/Driver.cpp
The file was modifiedlld/MachO/InputFiles.h
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 addedlld/test/MachO/invalid/invalid-stub.s
The file was modifiedlld/MachO/Driver.cpp
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/MachO/Driver.cpp
The file was modifiedlld/test/MachO/invalid/bad-archive.s
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/Driver.cpp
The file was modifiedlld/MachO/Writer.cpp
The file was addedlld/test/MachO/rpath.s
The file was modifiedlld/MachO/Config.h
The file was modifiedlld/MachO/Options.td
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