Changes from Git (git http://labmaster3.local/git/llvm-project.git)


  1. [AArch64] Fix over-eager fusing of NEON SIMD MUL/ADD (details)
  2. [lldb/Reproducer] Add version check (details)
  3. [OpenCL] Use generic addr space for lambda call operator (details)
  4. [EditLine] Fix RecallHistory to make it go in the right direction. (details)
  5. [SYCL] Add sycl_kernel attribute for accelerated code outlining (details)
Commit f2e7de81c625413a7f682c757ab64e7b63b48800 by Sanne.Wouda
[AArch64] Fix over-eager fusing of NEON SIMD MUL/ADD
Summary: The ISel pattern for SIMD MLA is a bit too eager: it replaces
the ADD with an MLA even when the MUL cannot be eliminated, e.g. when it
has another use.  An MLA is usually has a higher latency than an ADD
(and there are fewer pipes available that can execute it), so trading an
MLA for an ADD is not great.
ISel is not taking the number of uses of the MUL result into account,
nor any other factors such as the length of the critical path or other
resource pressure.
The MachineCombiner is able to make these judgments so this patch ports
the ISel pattern for MUL/ADD fusing to the MachineCombiner.
Similarly for MUL/SUB -> MLS, as well as the indexed variants.
The change has no impact on SPEC CPU© intrate nor fprate.
Reviewers: dmgreen, SjoerdMeijer, fhahn, Gerolf
Subscribers: kristof.beyls, hiraditya, llvm-commits
Tags: #llvm
Differential Revision:
The file was modifiedllvm/lib/Target/AArch64/
The file was modifiedllvm/include/llvm/CodeGen/MachineCombinerPattern.h
The file was modifiedllvm/test/CodeGen/AArch64/GlobalISel/select-with-no-legality-check.mir
The file was modifiedllvm/lib/Target/AArch64/AArch64InstrInfo.cpp
The file was modifiedllvm/test/CodeGen/AArch64/overeager_mla_fusing.ll
Commit 62827737acd878af6cd8930758b0d6f297173f40 by Jonas Devlieghere
[lldb/Reproducer] Add version check
To ensure a reproducer works correctly, the version of LLDB used for
capture and replay must match. Right now the reproducer already contains
the LLDB version. However, this is purely informative. LLDB will happily
replay a reproducer generated with a different version of LLDB, which
can cause subtle differences.
This patch adds a version check which compares the current LLDB version
with the one in the reproducer. If the version doesn't match, LLDB will
refuse to replay. It also adds an escape hatch to make it possible to
still replay the reproducer without having to mess with the recorded
version. This might prove useful when you know two versions of LLDB
match, even though the version string doesn't. This behavior is
triggered by passing a new flag -reproducer-skip-version-check to the
lldb driver.
Differential revision:
The file was modifiedlldb/include/lldb/API/SBReproducer.h
The file was modifiedlldb/tools/driver/Driver.cpp
The file was modifiedlldb/source/API/SBReproducer.cpp
The file was addedlldb/test/Shell/Reproducer/TestVersionCheck.test
The file was modifiedlldb/tools/driver/
Commit 980133a2098cf6159785b8ac0cbe4d8fbf99bfea by anastasia.stulova
[OpenCL] Use generic addr space for lambda call operator
Since lambdas are represented by callable objects, we add generic addr
space for implicit object parameter in call operator.
Any lambda variable declared in __constant addr space
(which is not convertible to generic) fails to compile with a
diagnostic. To support constant addr space we need to add a way to
qualify the lambda call operators.
Tags: #clang
Differential Revision:
The file was modifiedclang/lib/Sema/Sema.cpp
The file was modifiedclang/lib/Sema/SemaLambda.cpp
The file was modifiedclang/include/clang/Sema/Sema.h
The file was modifiedclang/lib/Sema/SemaDeclCXX.cpp
The file was addedclang/test/SemaOpenCLCXX/
The file was modifiedclang/lib/Sema/SemaType.cpp
Commit 0e9b0b6d11e882efec8505d97c4b65e1562e6715 by Jonas Devlieghere
[EditLine] Fix RecallHistory to make it go in the right direction.
The naming used by editline for the history operations is counter
intuitive to how it's used in lldb for the REPL.
- The H_PREV operation returns the previous element in the history,
  which is newer than the current one.
- The H_NEXT operation returns the next element in the history, which
  is older than the current one.
This exposed itself as a bug in the REPL where the behavior of up- and
down-arrow was inverted. This wasn't immediately obvious because of how
we save the current "live" entry.
This patch fixes the bug and introduces and enum to wrap the editline
operations that match the semantics of lldb.
Differential revision:
The file was modifiedlldb/include/lldb/Host/Editline.h
The file was modifiedlldb/source/Host/common/Editline.cpp
Commit c094e7dc4b3f9d1c1e590b008bb1cc46e3496abd by alexey.bader
[SYCL] Add sycl_kernel attribute for accelerated code outlining
SYCL is single source offload programming model relying on compiler to
separate device code (i.e. offloaded to an accelerator) from the code
executed on the host.
Here is code example of the SYCL program to demonstrate compiler
outlining work:
``` int foo(int x) { return ++x; } int bar(int x) { throw
std::exception("CPU code only!"); }
... using namespace cl::sycl; queue Q; buffer<int, 1> a(range<1>{1024});
Q.submit([&](handler& cgh) {
auto A = a.get_access<access::mode::write>(cgh);
cgh.parallel_for<init_a>(range<1>{1024}, [=](id<1> index) {
   A[index] = index[0] + foo(42);
SYCL device compiler must compile lambda expression passed to
cl::sycl::handler::parallel_for method and function foo called from this
lambda expression for an "accelerator". SYCL device compiler also must
ignore bar function as it's not required for offloaded code execution.
This patch adds the sycl_kernel attribute, which is used to mark code
passed to cl::sycl::handler::parallel_for as "accelerated code".
Attribute must be applied to function templates which parameters include
at least "kernel name" and "kernel function object". These parameters
will be used to establish an ABI between the host application and
offloaded part.
Reviewers: jlebar, keryell, Naghasan, ABataev, Anastasia, bader,
aaron.ballman, rjmccall, rsmith
Reviewed By: keryell, bader
Subscribers: mgorny, OlegM, ArturGainullin, agozillon, aaron.ballman,
ebevhan, Anastasia, cfe-commits
Tags: #clang
Differential Revision:
Signed-off-by: Alexey Bader <>
The file was modifiedclang/include/clang/Basic/
The file was modifiedclang/include/clang/Basic/
The file was addedclang/test/SemaSYCL/kernel-attribute.cpp
The file was modifiedclang/include/clang/Basic/
The file was modifiedclang/lib/Sema/SemaDeclAttr.cpp
The file was addedclang/test/SemaSYCL/kernel-attribute-on-non-sycl.cpp