Skip to content

Commit b5c2289

Browse files
author
Alexander Batashev
committed
Merge remote-tracking branch 'origin/sycl' into private/abatashe/hide_private_api
* origin/sycl: (614 commits) [SYCL][Doc] Update prerequisites in GetStartedGuide (intel#1466) [SYCL][USM] Remove vestigial dead code (intel#1474) [SYCL-PTX] Fix __spirv_GroupAsyncCopy stride computation (intel#1451) [Driver][SYCL] Emit an error if c compilation is forced (intel#1438) [SYCL] Fix sycl-post-link when no split and symbols are requested. (intel#1454) [SYCL] Change priority of devices in default_selector (intel#1264) [CI] Update CODEOWNERS matching rules order (intel#1468) [SYCL] Share PFWG lambda object through shared memory (intel#1455) [CI] Fix CODEOWNERS file syntax (intel#1464) [SYCL][CUDA] Fix active context when creating base event (intel#1447) [SYCL] Diagnose implicit declaration of kernel function type (intel#1450) [BuildBot] Modify configure script (intel#1421) [SYCL] Resolve min/max conflict (intel#1339) [CI][BuildBot] Fix configure parameter to turn on/off assertions (intel#1449) [SYCL] XFAIL LIT test due to duplicate diagnostic [SYCL] Remove explicit sycl_device attribute requirement Apply more suggestions Apply suggestions Translate new set of Intel FPGA Loop Controls Translate Intel FPGA force_pow2_depth memory attribute ...
2 parents 5b8f6f4 + 5d0d034 commit b5c2289

File tree

1,913 files changed

+74037
-28421
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,913 files changed

+74037
-28421
lines changed

.github/CODEOWNERS

+10-10
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
1-
clang/ @erichkeane, @Fznamznon
1+
* @bader
22

3-
clang/**/Driver @mdtoguchi @AGindinson
3+
clang/ @erichkeane @Fznamznon
44

5-
llvm-spirv/ @AlexeySotkin, @AlexeySachkov
5+
clang/**/Driver @mdtoguchi @AGindinson
66

7-
opencl-aot/ @dm-vodopyanov, @AlexeySachkov, @romanovvlad
7+
llvm-spirv/ @AlexeySotkin @AlexeySachkov
88

9-
libdevice/ @asavonic, @vzakhari
9+
opencl-aot/ @dm-vodopyanov @AlexeySachkov @romanovvlad
1010

11-
sycl/doc/extensions/ @mkinsner, @jbrodman
11+
libdevice/ @asavonic @vzakhari
1212

13-
sycl/doc/ @pvchupin, @kbobrovs
13+
sycl/ @romanovvlad @bader
1414

15-
sycl/ @romanovvlad, @bader
15+
sycl/doc/ @pvchupin @kbobrovs
1616

17-
xpti/ @tovinkere, @andykaylor
17+
sycl/doc/extensions/ @mkinsner @jbrodman
1818

19-
* @bader
19+
xpti/ @tovinkere @andykaylor

.github/workflows/linux_post_commit.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
strategy:
1111
fail-fast: false
1212
matrix:
13-
config: ["Default", "SharedLibs", "Assertions"]
13+
config: ["Default", "SharedLibs", "NoAssertions"]
1414

1515
steps:
1616
- uses: actions/checkout@v2
@@ -28,14 +28,14 @@ jobs:
2828
SharedLibs)
2929
export ARGS="--shared-libs"
3030
;;
31-
Assertiosn)
32-
export ARGS="--assertions"
31+
NoAssertions)
32+
export ARGS="--no-assertions"
3333
;;
3434
esac
3535
mkdir -p $GITHUB_WORKSPACE/build
3636
cd $GITHUB_WORKSPACE/build
3737
python3 $GITHUB_WORKSPACE/src/buildbot/configure.py -w $GITHUB_WORKSPACE \
38-
-s $GITHUB_WORKSPACE/src -o $GITHUB_WORKSPACE/build -t Release --no-ocl $ARGS
38+
-s $GITHUB_WORKSPACE/src -o $GITHUB_WORKSPACE/build -t Release $ARGS
3939
- name: Compile
4040
run: |
4141
python3 $GITHUB_WORKSPACE/src/buildbot/compile.py -w $GITHUB_WORKSPACE \

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323

2424
# Nested build directory
2525
/build*
26+
!buildbot
2627

2728
#==============================================================================#
2829
# Explicit files to ignore (only matches one).

buildbot/configure.py

+11-6
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ def do_configure(args):
2626
llvm_enable_projects = 'clang;llvm-spirv;sycl;opencl-aot;xpti;libdevice'
2727
libclc_targets_to_build = ''
2828
sycl_build_pi_cuda = 'OFF'
29+
sycl_werror = 'ON'
2930
llvm_enable_assertions = 'ON'
3031
llvm_enable_doxygen = 'OFF'
3132
llvm_enable_sphinx = 'OFF'
@@ -42,8 +43,11 @@ def do_configure(args):
4243
libclc_targets_to_build = 'nvptx64--;nvptx64--nvidiacl'
4344
sycl_build_pi_cuda = 'ON'
4445

45-
if args.assertions:
46-
llvm_enable_assertions = 'ON'
46+
if args.no_werror:
47+
sycl_werror = 'OFF'
48+
49+
if args.no_assertions:
50+
llvm_enable_assertions = 'OFF'
4751

4852
if args.docs:
4953
llvm_enable_doxygen = 'ON'
@@ -69,7 +73,7 @@ def do_configure(args):
6973
"-DLIBCLC_TARGETS_TO_BUILD={}".format(libclc_targets_to_build),
7074
"-DSYCL_BUILD_PI_CUDA={}".format(sycl_build_pi_cuda),
7175
"-DLLVM_BUILD_TOOLS=ON",
72-
"-DSYCL_ENABLE_WERROR=ON",
76+
"-DSYCL_ENABLE_WERROR={}".format(sycl_werror),
7377
"-DCMAKE_INSTALL_PREFIX={}".format(install_dir),
7478
"-DSYCL_INCLUDE_TESTS=ON", # Explicitly include all kinds of SYCL tests.
7579
"-DLLVM_ENABLE_DOXYGEN={}".format(llvm_enable_doxygen),
@@ -78,7 +82,7 @@ def do_configure(args):
7882
"-DSYCL_ENABLE_XPTI_TRACING=ON" # Explicitly turn on XPTI tracing
7983
]
8084

81-
if not args.no_ocl:
85+
if args.system_ocl:
8286
cmake_cmd.extend([
8387
"-DOpenCL_INCLUDE_DIR={}".format(ocl_header_dir),
8488
"-DOpenCL_LIBRARY={}".format(icd_loader_lib)])
@@ -118,9 +122,10 @@ def main():
118122
parser.add_argument("-t", "--build-type",
119123
metavar="BUILD_TYPE", required=True, help="build type, debug or release")
120124
parser.add_argument("--cuda", action='store_true', help="switch from OpenCL to CUDA")
121-
parser.add_argument("--assertions", action='store_true', help="build with assertions")
125+
parser.add_argument("--no-assertions", action='store_true', help="build without assertions")
122126
parser.add_argument("--docs", action='store_true', help="build Doxygen documentation")
123-
parser.add_argument("--no-ocl", action='store_true', help="download OpenCL deps via CMake")
127+
parser.add_argument("--system-ocl", action='store_true', help="use OpenCL deps from system (no download)")
128+
parser.add_argument("--no-werror", action='store_true', help="Don't treat warnings as errors")
124129
parser.add_argument("--shared-libs", action='store_true', help="Build shared libraries")
125130
parser.add_argument("--cmake-opt", action='append', help="Additional CMake option not configured via script parameters")
126131

clang-tools-extra/clang-apply-replacements/lib/Tooling/ApplyReplacements.cpp

+15-7
Original file line numberDiff line numberDiff line change
@@ -143,18 +143,26 @@ groupReplacements(const TUReplacements &TUs, const TUDiagnostics &TUDs,
143143
llvm::DenseMap<const FileEntry *, std::vector<tooling::Replacement>>
144144
GroupedReplacements;
145145

146-
// Deduplicate identical replacements in diagnostics.
146+
// Deduplicate identical replacements in diagnostics unless they are from the
147+
// same TU.
147148
// FIXME: Find an efficient way to deduplicate on diagnostics level.
148-
llvm::DenseMap<const FileEntry *, std::set<tooling::Replacement>>
149+
llvm::DenseMap<const FileEntry *,
150+
std::map<tooling::Replacement,
151+
const tooling::TranslationUnitDiagnostics *>>
149152
DiagReplacements;
150153

151-
auto AddToGroup = [&](const tooling::Replacement &R, bool FromDiag) {
154+
auto AddToGroup = [&](const tooling::Replacement &R,
155+
const tooling::TranslationUnitDiagnostics *SourceTU) {
152156
// Use the file manager to deduplicate paths. FileEntries are
153157
// automatically canonicalized.
154158
if (auto Entry = SM.getFileManager().getFile(R.getFilePath())) {
155-
if (FromDiag) {
159+
if (SourceTU) {
156160
auto &Replaces = DiagReplacements[*Entry];
157-
if (!Replaces.insert(R).second)
161+
auto It = Replaces.find(R);
162+
if (It == Replaces.end())
163+
Replaces.emplace(R, SourceTU);
164+
else if (It->second != SourceTU)
165+
// This replacement is a duplicate of one suggested by another TU.
158166
return;
159167
}
160168
GroupedReplacements[*Entry].push_back(R);
@@ -166,14 +174,14 @@ groupReplacements(const TUReplacements &TUs, const TUDiagnostics &TUDs,
166174

167175
for (const auto &TU : TUs)
168176
for (const tooling::Replacement &R : TU.Replacements)
169-
AddToGroup(R, false);
177+
AddToGroup(R, nullptr);
170178

171179
for (const auto &TU : TUDs)
172180
for (const auto &D : TU.Diagnostics)
173181
if (const auto *ChoosenFix = tooling::selectFirstFix(D)) {
174182
for (const auto &Fix : *ChoosenFix)
175183
for (const tooling::Replacement &R : Fix.second)
176-
AddToGroup(R, true);
184+
AddToGroup(R, &TU);
177185
}
178186

179187
// Sort replacements per file to keep consistent behavior when

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

+33-33
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,16 @@
1515
namespace clang {
1616
namespace tidy {
1717

18-
// This anchor is used to force the linker to link the CERTModule.
19-
extern volatile int CERTModuleAnchorSource;
20-
static int LLVM_ATTRIBUTE_UNUSED CERTModuleAnchorDestination =
21-
CERTModuleAnchorSource;
22-
2318
// This anchor is used to force the linker to link the AbseilModule.
2419
extern volatile int AbseilModuleAnchorSource;
2520
static int LLVM_ATTRIBUTE_UNUSED AbseilModuleAnchorDestination =
2621
AbseilModuleAnchorSource;
2722

23+
// This anchor is used to force the linker to link the AndroidModule.
24+
extern volatile int AndroidModuleAnchorSource;
25+
static int LLVM_ATTRIBUTE_UNUSED AndroidModuleAnchorDestination =
26+
AndroidModuleAnchorSource;
27+
2828
// This anchor is used to force the linker to link the BoostModule.
2929
extern volatile int BoostModuleAnchorSource;
3030
static int LLVM_ATTRIBUTE_UNUSED BoostModuleAnchorDestination =
@@ -35,20 +35,10 @@ extern volatile int BugproneModuleAnchorSource;
3535
static int LLVM_ATTRIBUTE_UNUSED BugproneModuleAnchorDestination =
3636
BugproneModuleAnchorSource;
3737

38-
// This anchor is used to force the linker to link the LinuxKernelModule.
39-
extern volatile int LinuxKernelModuleAnchorSource;
40-
static int LLVM_ATTRIBUTE_UNUSED LinuxKernelModuleAnchorDestination =
41-
LinuxKernelModuleAnchorSource;
42-
43-
// This anchor is used to force the linker to link the LLVMModule.
44-
extern volatile int LLVMModuleAnchorSource;
45-
static int LLVM_ATTRIBUTE_UNUSED LLVMModuleAnchorDestination =
46-
LLVMModuleAnchorSource;
47-
48-
// This anchor is used to force the linker to link the LLVMLibcModule.
49-
extern volatile int LLVMLibcModuleAnchorSource;
50-
static int LLVM_ATTRIBUTE_UNUSED LLVMLibcModuleAnchorDestination =
51-
LLVMLibcModuleAnchorSource;
38+
// This anchor is used to force the linker to link the CERTModule.
39+
extern volatile int CERTModuleAnchorSource;
40+
static int LLVM_ATTRIBUTE_UNUSED CERTModuleAnchorDestination =
41+
CERTModuleAnchorSource;
5242

5343
// This anchor is used to force the linker to link the CppCoreGuidelinesModule.
5444
extern volatile int CppCoreGuidelinesModuleAnchorSource;
@@ -70,10 +60,25 @@ extern volatile int GoogleModuleAnchorSource;
7060
static int LLVM_ATTRIBUTE_UNUSED GoogleModuleAnchorDestination =
7161
GoogleModuleAnchorSource;
7262

73-
// This anchor is used to force the linker to link the AndroidModule.
74-
extern volatile int AndroidModuleAnchorSource;
75-
static int LLVM_ATTRIBUTE_UNUSED AndroidModuleAnchorDestination =
76-
AndroidModuleAnchorSource;
63+
// This anchor is used to force the linker to link the HICPPModule.
64+
extern volatile int HICPPModuleAnchorSource;
65+
static int LLVM_ATTRIBUTE_UNUSED HICPPModuleAnchorDestination =
66+
HICPPModuleAnchorSource;
67+
68+
// This anchor is used to force the linker to link the LinuxKernelModule.
69+
extern volatile int LinuxKernelModuleAnchorSource;
70+
static int LLVM_ATTRIBUTE_UNUSED LinuxKernelModuleAnchorDestination =
71+
LinuxKernelModuleAnchorSource;
72+
73+
// This anchor is used to force the linker to link the LLVMModule.
74+
extern volatile int LLVMModuleAnchorSource;
75+
static int LLVM_ATTRIBUTE_UNUSED LLVMModuleAnchorDestination =
76+
LLVMModuleAnchorSource;
77+
78+
// This anchor is used to force the linker to link the LLVMLibcModule.
79+
extern volatile int LLVMLibcModuleAnchorSource;
80+
static int LLVM_ATTRIBUTE_UNUSED LLVMLibcModuleAnchorDestination =
81+
LLVMLibcModuleAnchorSource;
7782

7883
// This anchor is used to force the linker to link the MiscModule.
7984
extern volatile int MiscModuleAnchorSource;
@@ -93,6 +98,11 @@ static int LLVM_ATTRIBUTE_UNUSED MPIModuleAnchorDestination =
9398
MPIModuleAnchorSource;
9499
#endif
95100

101+
// This anchor is used to force the linker to link the ObjCModule.
102+
extern volatile int ObjCModuleAnchorSource;
103+
static int LLVM_ATTRIBUTE_UNUSED ObjCModuleAnchorDestination =
104+
ObjCModuleAnchorSource;
105+
96106
// This anchor is used to force the linker to link the OpenMPModule.
97107
extern volatile int OpenMPModuleAnchorSource;
98108
static int LLVM_ATTRIBUTE_UNUSED OpenMPModuleAnchorDestination =
@@ -113,16 +123,6 @@ extern volatile int ReadabilityModuleAnchorSource;
113123
static int LLVM_ATTRIBUTE_UNUSED ReadabilityModuleAnchorDestination =
114124
ReadabilityModuleAnchorSource;
115125

116-
// This anchor is used to force the linker to link the ObjCModule.
117-
extern volatile int ObjCModuleAnchorSource;
118-
static int LLVM_ATTRIBUTE_UNUSED ObjCModuleAnchorDestination =
119-
ObjCModuleAnchorSource;
120-
121-
// This anchor is used to force the linker to link the HICPPModule.
122-
extern volatile int HICPPModuleAnchorSource;
123-
static int LLVM_ATTRIBUTE_UNUSED HICPPModuleAnchorDestination =
124-
HICPPModuleAnchorSource;
125-
126126
// This anchor is used to force the linker to link the ZirconModule.
127127
extern volatile int ZirconModuleAnchorSource;
128128
static int LLVM_ATTRIBUTE_UNUSED ZirconModuleAnchorDestination =

clang-tools-extra/clang-tidy/bugprone/BugproneTidyModule.cpp

+3
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141
#include "SignedCharMisuseCheck.h"
4242
#include "SizeofContainerCheck.h"
4343
#include "SizeofExpressionCheck.h"
44+
#include "SpuriouslyWakeUpFunctionsCheck.h"
4445
#include "StringConstructorCheck.h"
4546
#include "StringIntegerAssignmentCheck.h"
4647
#include "StringLiteralWithEmbeddedNulCheck.h"
@@ -133,6 +134,8 @@ class BugproneModule : public ClangTidyModule {
133134
"bugprone-sizeof-container");
134135
CheckFactories.registerCheck<SizeofExpressionCheck>(
135136
"bugprone-sizeof-expression");
137+
CheckFactories.registerCheck<SpuriouslyWakeUpFunctionsCheck>(
138+
"bugprone-spuriously-wake-up-functions");
136139
CheckFactories.registerCheck<StringConstructorCheck>(
137140
"bugprone-string-constructor");
138141
CheckFactories.registerCheck<StringIntegerAssignmentCheck>(

clang-tools-extra/clang-tidy/bugprone/CMakeLists.txt

+1
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ add_clang_library(clangTidyBugproneModule
3333
SignedCharMisuseCheck.cpp
3434
SizeofContainerCheck.cpp
3535
SizeofExpressionCheck.cpp
36+
SpuriouslyWakeUpFunctionsCheck.cpp
3637
StringConstructorCheck.cpp
3738
StringIntegerAssignmentCheck.cpp
3839
StringLiteralWithEmbeddedNulCheck.cpp

0 commit comments

Comments
 (0)