SuccessChanges

Summary

  1. clang-format: [JS] detect ASI after closing parens. Summary: A closing parenthesis followed by a declaration or statement should always terminate the current statement. Reviewers: djasper Subscribers: klimek, cfe-commits Differential Revision: https://reviews.llvm.org/D36491
  2. [ValueTracking] Honour recursion limit. The recently improved support for `icmp` in ValueTracking (r307304) exposes the fact that `isImplied` condition doesn't really bail out if we hit the recursion limit (and calls `computeKnownBits` which increases the depth and asserts). Differential Revision: https://reviews.llvm.org/D36512
  3. [AArch64] Assembler support for the ARMv8.2a dot product instructions Dot product is an optional ARMv8.2a extension, see also the public architecture specification here: https://developer.arm.com/products/architecture/a-profile/exploration-tools. This patch adds AArch64 assembler support for these dot product instructions. Differential Revision: https://reviews.llvm.org/D36515
  4. [OpenMP] Make OpenMP generated code for the NVIDIA device relocatable by default Original Diff: D29642 This patch was previously reverted due to an error with patch D29654 that this depends on.
  5. Reapply Sema: allow imaginary constants via GNU extension if UDL overloads not present. C++14 added user-defined literal support for complex numbers so that you can write something like "complex<double> val = 2i". However, there is an existing GNU extension supporting this syntax and interpreting the result as a _Complex type. This changes parsing so that such literals are interpreted in terms of C++14's operators if an overload is present but otherwise falls back to the original GNU extension. (We now have more robust diagnostics for implicit conversions so the libc++ test that caused the original revert still passes).
  6. [OpenCL] Minor refactoring to reduce copy/pasted code Set the type of TheCall inside SemaBuiltinReserveRWPipe to reduce duplicated code.
  7. [ARM] Remove FeatureNoARM implies ModeThumb. Summary: By removing FeatureNoARM implies ModeThumb, we can detect cases where a function's target-features contain -thumb-mode (enables ARM codegen for the function), but the architecture does not support ARM mode. Previously, the implication caused the FeatureNoARM bit to be cleared for functions with -thumb-mode, making the assertion in ARMSubtarget::ARMSubtarget [1] pointless for such functions. This assertion is the only guard against generating ARM code for architectures without ARM codegen support. Is there a place where we could easily generate error messages for the user? At the moment, we would generate ARM code for Thumb-only architectures. X86 has the same behavior as ARM, as in it only has an assertion and no error message, but I think for ARM an error message would be helpful. What do you think? For the example below, `llc -mtriple=armv7m-eabi test.ll -o -` will generate ARM assembler (or fail with an assertion error with this patch). Note that if we run the resulting assembler through llvm-mc, we get an appropriate error message, but not when codegen is handled through clang. ``` define void @bar() #0 { entry: ret void } attributes #0 = { "target-features"="-thumb-mode" } ``` [1] https://github.com/llvm-mirror/llvm/blob/c1f7b54cef62e9c8aa745d40bea146a167bf844e/lib/Target/ARM/ARMSubtarget.cpp#L147 Reviewers: t.p.northover, rengolin, peter.smith, aadg, silviu.baranga, richard.barton.arm, echristo Reviewed By: rengolin, echristo Subscribers: efriedma, aemerson, javed.absar, kristof.beyls, llvm-commits Differential Revision: https://reviews.llvm.org/D35569
  8. [Support] PR33388 - Fix formatv_object move constructor formatv_object currently uses the implicitly defined move constructor, but it is buggy. In typical use-cases, the problem doesn't show-up because all calls to the move constructor are elided. Thus, the buggy constructors are never invoked. The issue especially shows-up when code is compiled using the -fno-elide-constructors compiler flag. For instance, this is useful when attempting to collect accurate code coverage statistics. The exact issue is the following: The Parameters data member is correctly moved, thus making the parameters occupy a new memory location in the target object. Unfortunately, the default copying of the Adapters blindly copies the vector of pointers, leaving each of these pointers referencing the parameters in the original object instead of the copied one. These pointers quickly become dangling when the original object is deleted. This quickly leads to crashes. The solution is to update the Adapters pointers when performing a move. The copy constructor isn't useful for format objects and can thus be deleted. This resolves PR33388. Differential Revision: https://reviews.llvm.org/D34463
  9. [DAG] Explicitly cleanup merged load values during store merge. NFCI.
  10. [X86][Ms-InlineAsm] Extend MS Dot operator to accept "this" + struct/class pointers aliases MS InlineAsm Dot operator accepts "Bases" such as "this" (cpp) and class/struct pointer typedef. This patch enhance its implementation with this behavior. Differential Revision: https://reviews.llvm.org/D36450
  11. [clangd] Fixed a bug in make_tagged. It accidentally std::move'd from Value parameter if it deduced to an l-value ref.
  12. Fix -Wpessimizing-move warning.
  13. [Sema] -Wenum-compare no longer warn on anonymous enums in switch statements Patch by: Reka Nikolett Kovacs
  14. [AsmParser][AVX512]Enhance OpMask/Zero/Merge syntax check rubostness Adopt a more strict approach regarding what marks should/can appear after a destination register, when operating upon an AVX512 platform. Differential Revision: https://reviews.llvm.org/D35785
  15. Revert "PR19668, PR23034: Fix handling of move constructors and deleted copy constructors when deciding whether classes should be passed indirectly." This reverts commit r310401 because it seems to have broken some ARM bot(s).
Revision 310482 by mprobst:
clang-format: [JS] detect ASI after closing parens.

Summary: A closing parenthesis followed by a declaration or statement should always terminate the current statement.

Reviewers: djasper

Subscribers: klimek, cfe-commits

Differential Revision: https://reviews.llvm.org/D36491
Change TypePath in RepositoryPath in Workspace
The file was modified/cfe/trunk/lib/Format/UnwrappedLineParser.cppclang.src/lib/Format/UnwrappedLineParser.cpp
The file was modified/cfe/trunk/unittests/Format/FormatTestJS.cppclang.src/unittests/Format/FormatTestJS.cpp
Revision 310481 by davide:
[ValueTracking] Honour recursion limit.

The recently improved support for `icmp` in ValueTracking
(r307304) exposes the fact that `isImplied` condition doesn't
really bail out if we hit the recursion limit (and calls
`computeKnownBits` which increases the depth and asserts).

Differential Revision:  https://reviews.llvm.org/D36512
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/lib/Analysis/ValueTracking.cppllvm.src/lib/Analysis/ValueTracking.cpp
The file was added/llvm/trunk/test/Transforms/SimplifyCFG/pr34131.llllvm.src/test/Transforms/SimplifyCFG/pr34131.ll
Revision 310480 by sjoerdmeijer:
[AArch64] Assembler support for the ARMv8.2a dot product instructions

Dot product is an optional ARMv8.2a extension, see also the public architecture
specification here:
https://developer.arm.com/products/architecture/a-profile/exploration-tools.
This patch adds AArch64 assembler support for these dot product instructions.

Differential Revision: https://reviews.llvm.org/D36515
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/include/llvm/Support/AArch64TargetParser.defllvm.src/include/llvm/Support/AArch64TargetParser.def
The file was modified/llvm/trunk/include/llvm/Support/TargetParser.hllvm.src/include/llvm/Support/TargetParser.h
The file was modified/llvm/trunk/lib/Target/AArch64/AArch64.tdllvm.src/lib/Target/AArch64/AArch64.td
The file was modified/llvm/trunk/lib/Target/AArch64/AArch64InstrFormats.tdllvm.src/lib/Target/AArch64/AArch64InstrFormats.td
The file was modified/llvm/trunk/lib/Target/AArch64/AArch64InstrInfo.tdllvm.src/lib/Target/AArch64/AArch64InstrInfo.td
The file was modified/llvm/trunk/lib/Target/AArch64/AArch64Subtarget.hllvm.src/lib/Target/AArch64/AArch64Subtarget.h
The file was modified/llvm/trunk/lib/Target/AArch64/AsmParser/AArch64AsmParser.cppllvm.src/lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp
The file was added/llvm/trunk/test/MC/AArch64/armv8.2a-dotprod-errors.sllvm.src/test/MC/AArch64/armv8.2a-dotprod-errors.s
The file was added/llvm/trunk/test/MC/AArch64/armv8.2a-dotprod.sllvm.src/test/MC/AArch64/armv8.2a-dotprod.s
The file was modified/llvm/trunk/test/MC/AArch64/neon-diagnostics.sllvm.src/test/MC/AArch64/neon-diagnostics.s
The file was added/llvm/trunk/test/MC/Disassembler/AArch64/armv8.2a-dotprod.txtllvm.src/test/MC/Disassembler/AArch64/armv8.2a-dotprod.txt
Revision 310479 by gbercea:
[OpenMP] Make OpenMP generated code for the NVIDIA device relocatable by default

Original Diff: D29642

This patch was previously reverted due to an error with patch D29654
that this depends on.
Change TypePath in RepositoryPath in Workspace
The file was modified/cfe/trunk/lib/Driver/ToolChains/Cuda.cppclang.src/lib/Driver/ToolChains/Cuda.cpp
The file was modified/cfe/trunk/test/Driver/openmp-offload.cclang.src/test/Driver/openmp-offload.c
Revision 310478 by Tim Northover:
Reapply Sema: allow imaginary constants via GNU extension if UDL overloads not present.

C++14 added user-defined literal support for complex numbers so that you
can write something like "complex<double> val = 2i". However, there is
an existing GNU extension supporting this syntax and interpreting the
result as a _Complex type.

This changes parsing so that such literals are interpreted in terms of
C++14's operators if an overload is present but otherwise falls back to
the original GNU extension.

(We now have more robust diagnostics for implicit conversions so the
libc++ test that caused the original revert still passes).
Change TypePath in RepositoryPath in Workspace
The file was modified/cfe/trunk/include/clang/Basic/DiagnosticLexKinds.tdclang.src/include/clang/Basic/DiagnosticLexKinds.td
The file was modified/cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.tdclang.src/include/clang/Basic/DiagnosticSemaKinds.td
The file was modified/cfe/trunk/include/clang/Sema/Sema.hclang.src/include/clang/Sema/Sema.h
The file was modified/cfe/trunk/lib/Lex/LiteralSupport.cppclang.src/lib/Lex/LiteralSupport.cpp
The file was modified/cfe/trunk/lib/Sema/SemaExpr.cppclang.src/lib/Sema/SemaExpr.cpp
The file was modified/cfe/trunk/lib/Sema/SemaLookup.cppclang.src/lib/Sema/SemaLookup.cpp
The file was added/cfe/trunk/test/SemaCXX/imaginary-constants.cppclang.src/test/SemaCXX/imaginary-constants.cpp
Revision 310477 by joey:
[OpenCL] Minor refactoring to reduce copy/pasted code

Set the type of TheCall inside SemaBuiltinReserveRWPipe to reduce
duplicated code.
Change TypePath in RepositoryPath in Workspace
The file was modified/cfe/trunk/lib/Sema/SemaChecking.cppclang.src/lib/Sema/SemaChecking.cpp
Revision 310476 by fhahn:
[ARM] Remove FeatureNoARM implies ModeThumb.

Summary:
By removing FeatureNoARM implies ModeThumb, we can detect cases where a
function's target-features contain -thumb-mode (enables ARM codegen for the
function), but the architecture does not support ARM mode. Previously, the
implication caused the FeatureNoARM bit to be cleared for functions with
-thumb-mode, making the assertion in ARMSubtarget::ARMSubtarget [1]
pointless for such functions.

This assertion is the only guard against generating ARM code for
architectures without ARM codegen support. Is there a place where we
could easily generate error messages for the user? At the moment, we
would generate ARM code for Thumb-only architectures. X86 has the same
behavior as ARM, as in it only has an assertion and no error message,
but I think for ARM an error message would be helpful. What do you
think?

For the example below, `llc -mtriple=armv7m-eabi test.ll -o -` will
generate ARM assembler (or fail with an assertion error with this patch).
Note that if we run the resulting assembler through llvm-mc, we get
an appropriate error message, but not when codegen is handled
through clang.

```
define void @bar() #0 {
entry:
  ret void
}

attributes #0 = { "target-features"="-thumb-mode" }
```

[1] https://github.com/llvm-mirror/llvm/blob/c1f7b54cef62e9c8aa745d40bea146a167bf844e/lib/Target/ARM/ARMSubtarget.cpp#L147

Reviewers: t.p.northover, rengolin, peter.smith, aadg, silviu.baranga, richard.barton.arm, echristo

Reviewed By: rengolin, echristo

Subscribers: efriedma, aemerson, javed.absar, kristof.beyls, llvm-commits

Differential Revision: https://reviews.llvm.org/D35569
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/lib/Target/ARM/ARM.tdllvm.src/lib/Target/ARM/ARM.td
The file was modified/llvm/trunk/test/CodeGen/ARM/scavenging.mirllvm.src/test/CodeGen/ARM/scavenging.mir
Revision 310475 by belleyb:
[Support] PR33388 - Fix formatv_object move constructor

formatv_object currently uses the implicitly defined move constructor,
but it is buggy. In typical use-cases, the problem doesn't show-up
because all calls to the move constructor are elided. Thus, the buggy
constructors are never invoked.

The issue especially shows-up when code is compiled using the
-fno-elide-constructors compiler flag. For instance, this is useful when
attempting to collect accurate code coverage statistics.

The exact issue is the following:

The Parameters data member is correctly moved, thus making the
parameters occupy a new memory location in the target
object. Unfortunately, the default copying of the Adapters blindly
copies the vector of pointers, leaving each of these pointers
referencing the parameters in the original object instead of the copied
one. These pointers quickly become dangling when the original object is
deleted. This quickly leads to crashes.

The solution is to update the Adapters pointers when performing a move.
The copy constructor isn't useful for format objects and can thus be
deleted.

This resolves PR33388.

Differential Revision: https://reviews.llvm.org/D34463
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/include/llvm/Support/FormatVariadic.hllvm.src/include/llvm/Support/FormatVariadic.h
The file was modified/llvm/trunk/unittests/Support/FormatVariadicTest.cppllvm.src/unittests/Support/FormatVariadicTest.cpp
Revision 310474 by niravd:
[DAG] Explicitly cleanup merged load values during store merge. NFCI.
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cppllvm.src/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
Revision 310472 by coby:
[X86][Ms-InlineAsm] Extend MS Dot operator to accept "this" + struct/class pointers aliases

MS InlineAsm Dot operator accepts "Bases" such as "this" (cpp) and class/struct pointer typedef.
This patch enhance its implementation with this behavior.

Differential Revision: https://reviews.llvm.org/D36450
Change TypePath in RepositoryPath in Workspace
The file was modified/cfe/trunk/lib/Sema/SemaStmtAsm.cppclang.src/lib/Sema/SemaStmtAsm.cpp
The file was modified/cfe/trunk/test/CodeGen/ms-inline-asm.cclang.src/test/CodeGen/ms-inline-asm.c
The file was modified/cfe/trunk/test/CodeGen/ms-inline-asm.cppclang.src/test/CodeGen/ms-inline-asm.cpp
Revision 310470 by ibiryukov:
[clangd] Fixed a bug in make_tagged.

It accidentally std::move'd from Value parameter if it deduced to an
l-value ref.
Change TypePath in RepositoryPath in Workspace
The file was modified/clang-tools-extra/trunk/clangd/ClangdServer.hclang-tools-extra.src/clangd/ClangdServer.h
Revision 310469 by hokein:
Fix -Wpessimizing-move warning.
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/lib/Target/X86/AsmParser/X86AsmParser.cppllvm.src/lib/Target/X86/AsmParser/X86AsmParser.cpp
Revision 310468 by xazax:
[Sema] -Wenum-compare no longer warn on anonymous enums in switch statements

Patch by: Reka Nikolett Kovacs
Change TypePath in RepositoryPath in Workspace
The file was modified/cfe/trunk/lib/Sema/SemaStmt.cppclang.src/lib/Sema/SemaStmt.cpp
The file was modified/cfe/trunk/test/SemaCXX/warn-enum-compare.cppclang.src/test/SemaCXX/warn-enum-compare.cpp
Revision 310467 by coby:
[AsmParser][AVX512]Enhance OpMask/Zero/Merge syntax check rubostness

Adopt a more strict approach regarding what marks should/can appear after a destination register, when operating upon an AVX512 platform.

Differential Revision: https://reviews.llvm.org/D35785
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/lib/Target/X86/AsmParser/X86AsmParser.cppllvm.src/lib/Target/X86/AsmParser/X86AsmParser.cpp
The file was modified/llvm/trunk/test/MC/X86/avx512-err.sllvm.src/test/MC/X86/avx512-err.s
The file was added/llvm/trunk/test/MC/X86/intel-syntax-avx512-error.sllvm.src/test/MC/X86/intel-syntax-avx512-error.s
Revision 310464 by rovka:
Revert "PR19668, PR23034: Fix handling of move constructors and deleted copy constructors when deciding whether classes should be passed indirectly."

This reverts commit r310401 because it seems to have broken some ARM
bot(s).
Change TypePath in RepositoryPath in Workspace
The file was modified/cfe/trunk/include/clang/AST/DeclCXX.hclang.src/include/clang/AST/DeclCXX.h
The file was modified/cfe/trunk/lib/AST/ASTImporter.cppclang.src/lib/AST/ASTImporter.cpp
The file was modified/cfe/trunk/lib/AST/DeclCXX.cppclang.src/lib/AST/DeclCXX.cpp
The file was modified/cfe/trunk/lib/CodeGen/CGCXXABI.cppclang.src/lib/CodeGen/CGCXXABI.cpp
The file was modified/cfe/trunk/lib/CodeGen/ItaniumCXXABI.cppclang.src/lib/CodeGen/ItaniumCXXABI.cpp
The file was modified/cfe/trunk/lib/CodeGen/MicrosoftCXXABI.cppclang.src/lib/CodeGen/MicrosoftCXXABI.cpp
The file was modified/cfe/trunk/lib/Sema/SemaDeclCXX.cppclang.src/lib/Sema/SemaDeclCXX.cpp
The file was modified/cfe/trunk/lib/Serialization/ASTReaderDecl.cppclang.src/lib/Serialization/ASTReaderDecl.cpp
The file was modified/cfe/trunk/lib/Serialization/ASTWriter.cppclang.src/lib/Serialization/ASTWriter.cpp
The file was modified/cfe/trunk/test/CodeGenCXX/uncopyable-args.cppclang.src/test/CodeGenCXX/uncopyable-args.cpp
The file was modified/cfe/trunk/unittests/ASTMatchers/ASTMatchersNarrowingTest.cppclang.src/unittests/ASTMatchers/ASTMatchersNarrowingTest.cpp