UnstableChanges

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

Summary

  1. [OpenCL] Use generic addr space for lambda call operator (details)
  2. [EditLine] Fix RecallHistory to make it go in the right direction. (details)
  3. [SYCL] Add sycl_kernel attribute for accelerated code outlining (details)
  4. [SLP] Enhance SLPVectorizer to vectorize different combinations of (details)
  5. [scudo][standalone] Add chunk ownership function (details)
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: https://reviews.llvm.org/D69938
The file was modifiedclang/include/clang/Sema/Sema.h
The file was modifiedclang/lib/Sema/Sema.cpp
The file was modifiedclang/lib/Sema/SemaDeclCXX.cpp
The file was modifiedclang/lib/Sema/SemaLambda.cpp
The file was modifiedclang/lib/Sema/SemaType.cpp
The file was addedclang/test/SemaOpenCLCXX/address-space-lambda.cl
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: https://reviews.llvm.org/D70932
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: https://reviews.llvm.org/D60455
Signed-off-by: Alexey Bader <alexey.bader@intel.com>
The file was addedclang/test/SemaSYCL/kernel-attribute.cpp
The file was modifiedclang/lib/Sema/SemaDeclAttr.cpp
The file was modifiedclang/include/clang/Basic/AttrDocs.td
The file was addedclang/test/SemaSYCL/kernel-attribute-on-non-sycl.cpp
The file was modifiedclang/include/clang/Basic/Attr.td
The file was modifiedclang/include/clang/Basic/DiagnosticSemaKinds.td
Commit a315519c17abaa621eddd30fd116ac2e030a36e9 by anton.a.afanasyev
[SLP] Enhance SLPVectorizer to vectorize different combinations of
aggregates
Summary: Make SLPVectorize to recognize homogeneous aggregates like
`{<2 x float>, <2 x float>}`, `{{float, float}, {float, float}}`,
`[2 x {float, float}]` and so on. It's a follow-up of
https://reviews.llvm.org/D70068. Merged `findBuildVector()` and
`findBuildAggregate()` to one `findBuildAggregate()` function making it
recursive to recognize multidimensional aggregates. Aggregates required
to be homogeneous.
Reviewers: RKSimon, ABataev, dtemirbulatov, spatel, vporpo
Subscribers: hiraditya, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D70587
The file was modifiedllvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
The file was modifiedllvm/test/Transforms/SLPVectorizer/X86/pr42022.ll
Commit 5595249e48ef83bae5f2e61c0190332534902051 by kostyak
[scudo][standalone] Add chunk ownership function
Summary: In order to be compliant with tcmalloc's extension ownership
determination function, we have to expose a function that will say if a
chunk was allocated by us.
As to whether or not this has security consequences: someone able to
call this function repeatedly could use it to determine secrets (cookie)
or craft a valid header. So this should not be exposed directly to
untrusted user input.
Add related tests.
Additionally clang-format caught a few things to change.
Reviewers: hctim, pcc, cferris, eugenis, vitalybuka
Subscribers: JDevlieghere, jfb, #sanitizers, llvm-commits
Tags: #sanitizers, #llvm
Differential Revision: https://reviews.llvm.org/D70908
The file was modifiedcompiler-rt/lib/scudo/standalone/tests/combined_test.cpp
The file was modifiedcompiler-rt/lib/scudo/standalone/chunk.h
The file was modifiedcompiler-rt/lib/scudo/standalone/combined.h