-
Notifications
You must be signed in to change notification settings - Fork 744
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'sycl' into llvmspirv_pulldown
- Loading branch information
Showing
347 changed files
with
4,338 additions
and
3,444 deletions.
There are no files selected for viewing
Validating CODEOWNERS rules …
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
clang/test/CodeGenSYCL/int_footer_with_explicit_specialization.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
// RUN: %clang_cc1 -fsycl-is-device -internal-isystem %S/Inputs -triple spir64-unknown-unknown -fsycl-int-footer=%t.footer.h -emit-llvm %s -o - | ||
// RUN: FileCheck -input-file=%t.footer.h %s --check-prefix=CHECK-FOOTER | ||
|
||
// This test checks that integration footer is emitted correctly when a | ||
// device_global has an explicit template specialization in template arguments. | ||
|
||
#include "sycl.hpp" | ||
|
||
namespace sycl { | ||
template <typename T> struct X {}; | ||
template <> struct X<int> {}; | ||
namespace detail { | ||
struct Y {}; | ||
} // namespace detail | ||
template <> struct X<detail::Y> {}; | ||
} // namespace sycl | ||
|
||
using namespace sycl; | ||
template <typename T, typename = X<detail::Y>> struct Arg1 { T val; }; | ||
|
||
using namespace sycl::ext::oneapi; | ||
template <typename properties_t> | ||
device_global<properties_t> dev_global; | ||
|
||
SYCL_EXTERNAL auto foo() { | ||
(void)dev_global<Arg1<int>>; | ||
} | ||
|
||
// CHECK-FOOTER: __sycl_device_global_registration::__sycl_device_global_registration() noexcept { | ||
// CHECK-FOOTER-NEXT: device_global_map::add((void *)&::dev_global<Arg1<int, sycl::X<sycl::detail::Y>>>, "_Z10dev_globalI4Arg1IiN4sycl1XINS1_6detail1YEEEEE"); | ||
// CHECK-FOOTER-NEXT: } | ||
// CHECK-FOOTER-NEXT: } // namespace (unnamed) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
// RUN: %clang_cc1 -fsycl-is-device -ast-dump %s | FileCheck %s | ||
// | ||
// Checks that the compound statement of the implicitly generated kernel body | ||
// has a valid source location (containing "line"). Previously this location | ||
// was invalid containing "<<invalid sloc>>" which causes asserts in the | ||
// llvm profiling tools. | ||
|
||
#include "Inputs/sycl.hpp" | ||
|
||
struct Functor { | ||
void operator()() const {} | ||
}; | ||
|
||
// CHECK: FunctionDecl {{.*}} _ZTS7Functor 'void ()' | ||
// CHECK-NEXT: |-CompoundStmt {{.*}} <{{.*}}line{{.*}}> | ||
|
||
int main() { | ||
|
||
sycl::queue().submit([&](sycl::handler &cgh) { | ||
cgh.single_task(Functor{}); | ||
}); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
//===-- AsanKernelMetadata.h - fix kernel medatadata for sanitizer ---===// | ||
// | ||
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. | ||
// See https://llvm.org/LICENSE.txt for license information. | ||
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | ||
// | ||
//===----------------------------------------------------------------------===// | ||
// This pass fixes attributes and metadata of the global variable | ||
// "__AsanKernelMetadata" | ||
//===----------------------------------------------------------------------===// | ||
|
||
#pragma once | ||
|
||
#include "llvm/IR/PassManager.h" | ||
|
||
namespace llvm { | ||
|
||
class AsanKernelMetadataPass : public PassInfoMixin<AsanKernelMetadataPass> { | ||
public: | ||
PreservedAnalyses run(Module &M, ModuleAnalysisManager &MAM); | ||
}; | ||
|
||
} // namespace llvm |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.