Skip to content

Commit f78a60b

Browse files
committed
Merge remote-tracking branch 'otcshare/sycl' into private/abatashe/post_commit
* otcshare/sycl: (469 commits) [SYCL] Implement thread-local storage restriction (intel#1281) [Driver][SYCL][FPGA] Adjust the output location for the project report (intel#1278) [SYCL][NFC] Fix static code analysis concerns (intel#1283) [SYCL] Fix the test/basic_tests/buffer/subbuffer.cpp (intel#1277) [SYCL][CUDA] Implement the program kernel names query (intel#1248) [SYCL] Honor the LLVM_LIBDIR_SUFFIX variable at installation time (intel#1261) [SYCL][UX] Diagnostic for undefined device functions (intel#1026) [SYCL] Reverse reqd_work_group_size attribute (intel#1234) [SYCL] Rename project to oneAPI DPC++ Compiler (intel#1249) [SYCL][XPTI] Instrumentation of SYCL runtime with XPTI (intel#1129) [SYCL] Add buffer dimensions restriction (intel#1147) [SYCL][NFC] Update copyright header in handler files (intel#1271) [SYCL][NFC] Format the code with clang-format [SYCL][Test] Fix SYCL library location path for LIT tests (intel#1228) [SYCL][NFC] Fix doxygen warnings (intel#1270) [SYCL][CUDA] Add the CUDA backend to the deploy-sycl-toolchain target (intel#1268) [SYCL][NFC] Fix a misleading comment regarding the SYCL flow (intel#1266) Change capability for SpecId decoration README.md: Mention retrieving llvm archive signatures travis: Restore macOS builds ...
2 parents 4ee3269 + eb373c4 commit f78a60b

File tree

1,478 files changed

+54436
-20794
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,478 files changed

+54436
-20794
lines changed

CONTRIBUTING.md

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Contributing
22

33
## License
4-
Intel Project for LLVM* technology is licensed under the terms of the
4+
Intel Project for LLVM\* technology is licensed under the terms of the
55
Apache-2.0 with LLVM-exception license ([LICENSE.txt](llvm/LICENSE.TXT))
66
to ensure our ability to contribute this project to the LLVM project
77
under the same license.
@@ -70,11 +70,11 @@ commit automatically with `git commit -s`.
7070
### Development
7171

7272
- Create a personal fork of the project on GitHub
73-
- Use **sycl** branch as baseline for your changes
73+
- For the DPC++ Compiler project, use **sycl** branch as baseline for your
74+
changes. See [Get Started Guide](sycl/doc/GetStartedGuide.md).
7475
- Prepare your patch (follow
7576
[LLVM coding standards](https://llvm.org/docs/CodingStandards.html))
76-
- Build the project and run all tests (see
77-
[GetStartedWithSYCLCompiler.md](sycl/doc/GetStartedWithSYCLCompiler.md))
77+
- Build the project and run all tests
7878

7979
### Review and acceptance testing
8080

@@ -94,4 +94,8 @@ Project maintainers merge pull requests using one of the following options:
9494
- [Squash and merge] Used when there are multiple commits in the PR
9595
- Squashing is done to make sure that the project is buildable on any commit
9696
- [Create a merge commit] Used for LLVM pull-down PRs to preserve hashes of the
97-
commits pulled from the LLVM community repository
97+
commits pulled from the LLVM community repository
98+
99+
100+
*Other names and brands may be claimed as the property of others.
101+

README.md

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,28 @@
1-
# Intel Project for LLVM* technology
1+
# Intel Project for LLVM\* technology
22

33
## Introduction
44

55
Intel staging area for llvm.org contribution.
66
Home for Intel LLVM-based projects:
7-
- SYCL* Compiler and Runtimes - compiler and runtime libraries for SYCL ([https://www.khronos.org/sycl/](https://www.khronos.org/sycl/)). See **sycl** branch.
7+
- oneAPI Data Parallel C++ compiler - see **sycl** branch. More information on
8+
oneAPI and DPC++ is available at
9+
([https://www.oneapi.com/](https://www.oneapi.com/))
810

911
## License
1012
See [LICENSE.txt](sycl/LICENSE.TXT) for details.
1113

12-
1314
## Contributing
1415
See [CONTRIBUTING.md](CONTRIBUTING.md) for details.
1516

1617
## Sub-projects Documentation
17-
- SYCL Compiler and Runtimes - See [GetStartedWithSYCLCompiler.md](sycl/doc/GetStartedWithSYCLCompiler.md)
18+
- oneAPI Data Parallel C++ compiler - See
19+
[GetStartedGuide.md](sycl/doc/GetStartedGuide.md)
1820

19-
*Other names and brands may be claimed as the property of others.
21+
## DPC++ extensions
2022

21-
## SYCL Extension Proposal Documents
23+
DPC++ is an open, cross-architecture language built upon the ISO C++ and Khronos
24+
SYCL\* standards. DPC++ extends these standards with a number of extensions,
25+
which can be found in [sycl/doc/extensions](sycl/doc/extensions) directory.
2226

23-
See [sycl/doc/extensions](sycl/doc/extensions)
27+
\*Other names and brands may be claimed as the property of others.
2428

buildbot/configure.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,11 @@ def do_configure(args):
1010
llvm_dir = os.path.join(args.src_dir, "llvm")
1111
sycl_dir = os.path.join(args.src_dir, "sycl")
1212
spirv_dir = os.path.join(args.src_dir, "llvm-spirv")
13+
xpti_dir = os.path.join(args.src_dir, "xpti")
1314
ocl_header_dir = os.path.join(args.obj_dir, "OpenCL-Headers")
1415
icd_loader_lib = os.path.join(args.obj_dir, "OpenCL-ICD-Loader", "build")
1516
llvm_targets_to_build = 'X86'
16-
llvm_enable_projects = 'clang;llvm-spirv;sycl;opencl-aot'
17+
llvm_enable_projects = 'clang;llvm-spirv;sycl;opencl-aot;xpti'
1718
libclc_targets_to_build = ''
1819
sycl_build_pi_cuda = 'OFF'
1920
llvm_enable_assertions = 'ON'
@@ -48,9 +49,10 @@ def do_configure(args):
4849
"-DCMAKE_BUILD_TYPE={}".format(args.build_type),
4950
"-DLLVM_ENABLE_ASSERTIONS={}".format(llvm_enable_assertions),
5051
"-DLLVM_TARGETS_TO_BUILD={}".format(llvm_targets_to_build),
51-
"-DLLVM_EXTERNAL_PROJECTS=sycl;llvm-spirv;opencl-aot",
52+
"-DLLVM_EXTERNAL_PROJECTS=sycl;llvm-spirv;opencl-aot;xpti",
5253
"-DLLVM_EXTERNAL_SYCL_SOURCE_DIR={}".format(sycl_dir),
5354
"-DLLVM_EXTERNAL_LLVM_SPIRV_SOURCE_DIR={}".format(spirv_dir),
55+
"-DLLVM_EXTERNAL_XPTI_SOURCE_DIR={}".format(xpti_dir),
5456
"-DLLVM_ENABLE_PROJECTS={}".format(llvm_enable_projects),
5557
"-DLIBCLC_TARGETS_TO_BUILD={}".format(libclc_targets_to_build),
5658
"-DOpenCL_INCLUDE_DIR={}".format(ocl_header_dir),
@@ -61,7 +63,8 @@ def do_configure(args):
6163
"-DCMAKE_INSTALL_PREFIX={}".format(install_dir),
6264
"-DSYCL_INCLUDE_TESTS=ON", # Explicitly include all kinds of SYCL tests.
6365
"-DLLVM_ENABLE_DOXYGEN={}".format(llvm_enable_doxygen),
64-
"-DBUILD_SHARED_LIBS={}".format(llvm_build_shared_libs),
66+
"-DBUILD_SHARED_LIBS={}".format(llvm_build_shared_libs),
67+
"-DSYCL_ENABLE_XPTI_TRACING=ON", # Explicitly turn on XPTI tracing
6568
llvm_dir
6669
]
6770

clang-tools-extra/clang-tidy/ClangTidy.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -409,6 +409,8 @@ ClangTidyASTConsumerFactory::CreateASTConsumer(
409409
}
410410

411411
for (auto &Check : Checks) {
412+
if (!Check->isLanguageVersionSupported(Context.getLangOpts()))
413+
continue;
412414
Check->registerMatchers(&*Finder);
413415
Check->registerPPCallbacks(*SM, PP, ModuleExpanderPP);
414416
}

clang-tools-extra/clang-tidy/ClangTidyCheck.h

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,11 +53,24 @@ class ClangTidyCheck : public ast_matchers::MatchFinder::MatchCallback {
5353
/// constructor using the Options.get() methods below.
5454
ClangTidyCheck(StringRef CheckName, ClangTidyContext *Context);
5555

56+
/// Override this to disable registering matchers and PP callbacks if an
57+
/// invalid language version is being used.
58+
///
59+
/// For example if a check is examining overloaded functions then this should
60+
/// be overridden to return false when the CPlusPlus flag is not set in
61+
/// \p LangOpts.
62+
virtual bool isLanguageVersionSupported(const LangOptions &LangOpts) const {
63+
return true;
64+
}
65+
5666
/// Override this to register ``PPCallbacks`` in the preprocessor.
5767
///
5868
/// This should be used for clang-tidy checks that analyze preprocessor-
5969
/// dependent properties, e.g. include directives and macro definitions.
6070
///
71+
/// This will only be executed if the function isLanguageVersionSupported
72+
/// returns true.
73+
///
6174
/// There are two Preprocessors to choose from that differ in how they handle
6275
/// modular #includes:
6376
/// - PP is the real Preprocessor. It doesn't walk into modular #includes and
@@ -80,6 +93,9 @@ class ClangTidyCheck : public ast_matchers::MatchFinder::MatchCallback {
8093
/// "this" will be used as callback, but you can also specify other callback
8194
/// classes. Thereby, different matchers can trigger different callbacks.
8295
///
96+
/// This will only be executed if the function isLanguageVersionSupported
97+
/// returns true.
98+
///
8399
/// If you need to merge information between the different matchers, you can
84100
/// store these as members of the derived class. However, note that all
85101
/// matches occur in the order of the AST traversal.

clang-tools-extra/clang-tidy/misc/NoRecursionCheck.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@ void NoRecursionCheck::check(const MatchFinder::MatchResult &Result) {
264264
for (llvm::scc_iterator<CallGraph *> SCCI = llvm::scc_begin(&CG),
265265
SCCE = llvm::scc_end(&CG);
266266
SCCI != SCCE; ++SCCI) {
267-
if (!SCCI.hasLoop()) // We only care about cycles, not standalone nodes.
267+
if (!SCCI.hasCycle()) // We only care about cycles, not standalone nodes.
268268
continue;
269269
handleSCC(*SCCI);
270270
}

clang-tools-extra/clang-tidy/modernize/MakeSmartPtrCheck.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -68,17 +68,12 @@ bool MakeSmartPtrCheck::isLanguageVersionSupported(
6868
void MakeSmartPtrCheck::registerPPCallbacks(const SourceManager &SM,
6969
Preprocessor *PP,
7070
Preprocessor *ModuleExpanderPP) {
71-
if (isLanguageVersionSupported(getLangOpts())) {
7271
Inserter = std::make_unique<utils::IncludeInserter>(SM, getLangOpts(),
7372
IncludeStyle);
7473
PP->addPPCallbacks(Inserter->CreatePPCallbacks());
75-
}
7674
}
7775

7876
void MakeSmartPtrCheck::registerMatchers(ast_matchers::MatchFinder *Finder) {
79-
if (!isLanguageVersionSupported(getLangOpts()))
80-
return;
81-
8277
// Calling make_smart_ptr from within a member function of a type with a
8378
// private or protected constructor would be ill-formed.
8479
auto CanCallCtor = unless(has(ignoringImpCasts(

clang-tools-extra/clang-tidy/modernize/MakeSmartPtrCheck.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ class MakeSmartPtrCheck : public ClangTidyCheck {
4141
virtual SmartPtrTypeMatcher getSmartPointerTypeMatcher() const = 0;
4242

4343
/// Returns whether the C++ version is compatible with current check.
44-
virtual bool isLanguageVersionSupported(const LangOptions &LangOpts) const;
44+
bool isLanguageVersionSupported(const LangOptions &LangOpts) const override;
4545

4646
static const char PointerType[];
4747

clang-tools-extra/clang-tidy/modernize/PassByValueCheck.cpp

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,9 @@ AST_MATCHER(CXXRecordDecl, isMoveConstructible) {
4646
}
4747
} // namespace
4848

49-
static TypeMatcher constRefType() {
50-
return lValueReferenceType(pointee(isConstQualified()));
49+
static TypeMatcher notTemplateSpecConstRefType() {
50+
return lValueReferenceType(
51+
pointee(unless(templateSpecializationType()), isConstQualified()));
5152
}
5253

5354
static TypeMatcher nonConstValueType() {
@@ -145,16 +146,18 @@ void PassByValueCheck::registerMatchers(MatchFinder *Finder) {
145146
// ParenListExpr is generated instead of a CXXConstructExpr,
146147
// filtering out templates automatically for us.
147148
withInitializer(cxxConstructExpr(
148-
has(ignoringParenImpCasts(declRefExpr(to(
149-
parmVarDecl(
150-
hasType(qualType(
151-
// Match only const-ref or a non-const value
152-
// parameters. Rvalues and const-values
153-
// shouldn't be modified.
154-
ValuesOnly ? nonConstValueType()
155-
: anyOf(constRefType(),
156-
nonConstValueType()))))
157-
.bind("Param"))))),
149+
has(ignoringParenImpCasts(declRefExpr(
150+
to(parmVarDecl(
151+
hasType(qualType(
152+
// Match only const-ref or a non-const
153+
// value parameters. Rvalues,
154+
// TemplateSpecializationValues and
155+
// const-values shouldn't be modified.
156+
ValuesOnly
157+
? nonConstValueType()
158+
: anyOf(notTemplateSpecConstRefType(),
159+
nonConstValueType()))))
160+
.bind("Param"))))),
158161
hasDeclaration(cxxConstructorDecl(
159162
isCopyConstructor(), unless(isDeleted()),
160163
hasDeclContext(

clang-tools-extra/clang-tidy/utils/LexerUtils.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
//===----------------------------------------------------------------------===//
88

99
#include "LexerUtils.h"
10+
#include "clang/Basic/SourceManager.h"
1011

1112
namespace clang {
1213
namespace tidy {

0 commit comments

Comments
 (0)