Skip to content

Commit faf152a

Browse files
Merge branch 'sycl' into dbakhval-esimd-inlining
2 parents 6a257fe + 2a7a149 commit faf152a

File tree

5,031 files changed

+182460
-105090
lines changed

Some content is hidden

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

5,031 files changed

+182460
-105090
lines changed

.github/workflows/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Github action workflows should be stored in this directrory.

.github/workflows/linux_post_commit.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66
- sycl
77
jobs:
88
check:
9-
runs-on: ubuntu-latest
9+
runs-on: ubuntu-18.04
1010
strategy:
1111
fail-fast: false
1212
matrix:

.github/workflows/main-branch-sync.yml

Lines changed: 0 additions & 25 deletions
This file was deleted.

buildbot/dependency.conf

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ ocl_cpu_rt_ver=2020.11.11.0.04
44
# https://github.com/intel/llvm/releases/download/2020-WW45/win-oclcpuexp-2020.11.11.0.04_rel.zip
55
ocl_cpu_rt_ver_win=2020.11.11.0.04
66
# Same GPU driver supports Level Zero and OpenCL
7-
# https://github.com/intel/compute-runtime/releases/tag/21.07.19042
8-
ocl_gpu_rt_ver=21.07.19042
7+
# https://github.com/intel/compute-runtime/releases/tag/21.08.19096
8+
ocl_gpu_rt_ver=21.08.19096
99
# Same GPU driver supports Level Zero and OpenCL
1010
# https://downloadmirror.intel.com/30148/a08/igfx_win10_100.9168.zip
1111
ocl_gpu_rt_ver_win=27.20.100.9168
@@ -30,7 +30,7 @@ ocloc_ver_win=27.20.100.9168
3030
[DRIVER VERSIONS]
3131
cpu_driver_lin=2020.11.11.0.04
3232
cpu_driver_win=2020.11.11.0.04
33-
gpu_driver_lin=21.07.19042
33+
gpu_driver_lin=21.08.19096
3434
gpu_driver_win=27.20.100.9168
3535
fpga_driver_lin=2020.11.11.0.04
3636
fpga_driver_win=2020.11.11.0.04

buildbot/dependency.py

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -50,29 +50,34 @@ def do_dependency(args):
5050
ocl_header_dir = os.path.join(args.obj_dir, "OpenCL-Headers")
5151
if not os.path.isdir(ocl_header_dir):
5252
clone_cmd = ["git", "clone", "https://github.com/KhronosGroup/OpenCL-Headers",
53-
"OpenCL-Headers", "-b", "v2020.06.16"]
53+
"OpenCL-Headers", "-b", "master"]
5454
subprocess.check_call(clone_cmd, cwd=args.obj_dir)
5555
else:
5656
fetch_cmd = ["git", "pull", "--ff", "--ff-only", "origin"]
5757
subprocess.check_call(fetch_cmd, cwd=ocl_header_dir)
5858

59-
# Workaround to unblock CI until KhronosGroup/OpenCL-ICD-Loader/pull/124
60-
# is submitted
61-
checkout_cmd = ["git", "checkout", "d1b936b72b9610626ecab8a991cec18348fba047"]
59+
# Checkout fixed version to avoid unexpected issues coming from upstream
60+
# Specific version can be uplifted as soon as such need arise
61+
checkout_cmd = ["git", "checkout", "23710f1b99186065c1768fc3098ba681adc0f253"]
6262
subprocess.check_call(checkout_cmd, cwd=ocl_header_dir)
6363

6464
# fetch and build OpenCL ICD loader
6565
icd_loader_dir = os.path.join(args.obj_dir, "OpenCL-ICD-Loader")
6666
if not os.path.isdir(icd_loader_dir):
6767
clone_cmd = ["git", "clone",
6868
"https://github.com/KhronosGroup/OpenCL-ICD-Loader",
69-
"OpenCL-ICD-Loader", "-b", "v2020.06.16"]
69+
"OpenCL-ICD-Loader", "-b", "master"]
7070

7171
subprocess.check_call(clone_cmd, cwd=args.obj_dir)
7272
else:
7373
fetch_cmd = ["git", "pull", "--ff", "--ff-only", "origin"]
7474
subprocess.check_call(fetch_cmd, cwd=icd_loader_dir)
7575

76+
# Checkout fixed version to avoid unexpected issues coming from upstream
77+
# Specific version can be uplifted as soon as such need arise
78+
checkout_cmd = ["git", "checkout", "5f8249691ec8c25775789498951f8e9eb62c201d"]
79+
subprocess.check_call(checkout_cmd, cwd=icd_loader_dir)
80+
7681
icd_build_dir = os.path.join(icd_loader_dir, "build")
7782
if os.path.isdir(icd_build_dir):
7883
shutil.rmtree(icd_build_dir)
@@ -119,4 +124,3 @@ def main():
119124
ret = main()
120125
exit_code = 0 if ret else 1
121126
sys.exit(exit_code)
122-

clang-tools-extra/clang-change-namespace/tool/ClangChangeNamespace.cpp

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,13 @@ llvm::ErrorOr<std::vector<std::string>> GetAllowedSymbolPatterns() {
9999

100100
int main(int argc, const char **argv) {
101101
llvm::sys::PrintStackTraceOnErrorSignal(argv[0]);
102-
tooling::CommonOptionsParser OptionsParser(argc, argv,
103-
ChangeNamespaceCategory);
102+
auto ExpectedParser =
103+
tooling::CommonOptionsParser::create(argc, argv, ChangeNamespaceCategory);
104+
if (!ExpectedParser) {
105+
llvm::errs() << ExpectedParser.takeError();
106+
return 1;
107+
}
108+
tooling::CommonOptionsParser &OptionsParser = ExpectedParser.get();
104109
const auto &Files = OptionsParser.getSourcePathList();
105110
tooling::RefactoringTool Tool(OptionsParser.getCompilations(), Files);
106111
llvm::ErrorOr<std::vector<std::string>> AllowedPatterns =

clang-tools-extra/clang-include-fixer/SymbolIndexManager.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,7 @@ SymbolIndexManager::search(llvm::StringRef Identifier,
149149
rank(MatchedSymbols, FileName);
150150
// Strip signals, they are no longer needed.
151151
std::vector<SymbolInfo> Res;
152+
Res.reserve(MatchedSymbols.size());
152153
for (auto &SymAndSig : MatchedSymbols)
153154
Res.push_back(std::move(SymAndSig.Symbol));
154155
return Res;

clang-tools-extra/clang-include-fixer/find-all-symbols/tool/FindAllSymbolsMain.cpp

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,14 @@ bool Merge(llvm::StringRef MergeDir, llvm::StringRef OutputFile) {
128128
} // namespace find_all_symbols
129129

130130
int main(int argc, const char **argv) {
131-
CommonOptionsParser OptionsParser(argc, argv, FindAllSymbolsCategory);
131+
auto ExpectedParser =
132+
CommonOptionsParser::create(argc, argv, FindAllSymbolsCategory);
133+
if (!ExpectedParser) {
134+
llvm::errs() << ExpectedParser.takeError();
135+
return 1;
136+
}
137+
138+
CommonOptionsParser &OptionsParser = ExpectedParser.get();
132139
ClangTool Tool(OptionsParser.getCompilations(),
133140
OptionsParser.getSourcePathList());
134141

clang-tools-extra/clang-include-fixer/tool/ClangIncludeFixer.cpp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,13 @@ void writeToJson(llvm::raw_ostream &OS, const IncludeFixerContext& Context) {
263263
}
264264

265265
int includeFixerMain(int argc, const char **argv) {
266-
tooling::CommonOptionsParser options(argc, argv, IncludeFixerCategory);
266+
auto ExpectedParser =
267+
tooling::CommonOptionsParser::create(argc, argv, IncludeFixerCategory);
268+
if (!ExpectedParser) {
269+
llvm::errs() << ExpectedParser.takeError();
270+
return 1;
271+
}
272+
tooling::CommonOptionsParser &options = ExpectedParser.get();
267273
tooling::ClangTool tool(options.getCompilations(),
268274
options.getSourcePathList());
269275

clang-tools-extra/clang-move/tool/ClangMove.cpp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,13 @@ cl::opt<bool> DumpDecls(
9595

9696
int main(int argc, const char **argv) {
9797
llvm::sys::PrintStackTraceOnErrorSignal(argv[0]);
98-
tooling::CommonOptionsParser OptionsParser(argc, argv, ClangMoveCategory);
98+
auto ExpectedParser =
99+
tooling::CommonOptionsParser::create(argc, argv, ClangMoveCategory);
100+
if (!ExpectedParser) {
101+
llvm::errs() << ExpectedParser.takeError();
102+
return 1;
103+
}
104+
tooling::CommonOptionsParser &OptionsParser = ExpectedParser.get();
99105

100106
if (OldDependOnNew && NewDependOnOld) {
101107
llvm::errs() << "Provide either --old_depend_on_new or "

clang-tools-extra/clang-reorder-fields/tool/ClangReorderFields.cpp

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,14 @@ static cl::opt<bool> Inplace("i", cl::desc("Overwrite edited files."),
5050
const char Usage[] = "A tool to reorder fields in C/C++ structs/classes.\n";
5151

5252
int main(int argc, const char **argv) {
53-
tooling::CommonOptionsParser OP(argc, argv, ClangReorderFieldsCategory,
54-
Usage);
53+
auto ExpectedParser = tooling::CommonOptionsParser::create(
54+
argc, argv, ClangReorderFieldsCategory, cl::OneOrMore, Usage);
55+
if (!ExpectedParser) {
56+
llvm::errs() << ExpectedParser.takeError();
57+
return 1;
58+
}
59+
60+
tooling::CommonOptionsParser &OP = ExpectedParser.get();
5561

5662
auto Files = OP.getSourcePathList();
5763
tooling::RefactoringTool Tool(OP.getCompilations(), Files);

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ class AnalyzerDiagnosticConsumer : public ento::PathDiagnosticConsumer {
6767
AnalyzerDiagnosticConsumer(ClangTidyContext &Context) : Context(Context) {}
6868

6969
void FlushDiagnosticsImpl(std::vector<const ento::PathDiagnostic *> &Diags,
70-
FilesMade *filesMade) override {
70+
FilesMade *FilesMade) override {
7171
for (const ento::PathDiagnostic *PD : Diags) {
7272
SmallString<64> CheckName(AnalyzerCheckNamePrefix);
7373
CheckName += PD->getCheckerName();
@@ -186,7 +186,7 @@ class ErrorReporter {
186186
reportNote(Note);
187187
}
188188

189-
void Finish() {
189+
void finish() {
190190
if (ApplyFixes && TotalFixes > 0) {
191191
Rewriter Rewrite(SourceMgr, LangOpts);
192192
for (const auto &FileAndReplacements : FileReplacements) {
@@ -596,7 +596,7 @@ void handleErrors(llvm::ArrayRef<ClangTidyError> Errors,
596596
// Return to the initial directory to correctly resolve next Error.
597597
FileSystem.setCurrentWorkingDirectory(InitialWorkingDir.get());
598598
}
599-
Reporter.Finish();
599+
Reporter.finish();
600600
WarningsAsErrorsCount += Reporter.getWarningsAsErrorsCount();
601601
}
602602

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

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,6 @@
3737
using namespace clang;
3838
using namespace tidy;
3939

40-
#ifdef LLVM_CLANG_AST_ATTR_H
41-
//#error
42-
#endif
43-
4440
namespace {
4541
class ClangTidyDiagnosticRenderer : public DiagnosticRenderer {
4642
public:

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ template <> struct MappingTraits<FileFilter> {
4747
IO.mapRequired("name", File.Name);
4848
IO.mapOptional("lines", File.LineRanges);
4949
}
50-
static std::string validate(IO &io, FileFilter &File) {
50+
static std::string validate(IO &Io, FileFilter &File) {
5151
if (File.Name.empty())
5252
return "No file name specified";
5353
for (const FileFilter::LineRange &Range : File.LineRanges) {

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ void ExpandModularHeadersPPCallbacks::handleModuleFile(
125125
Recorder->addNecessaryFile(IF.getFile());
126126
});
127127
// Recursively handle all transitively imported modules.
128-
for (auto Import : MF->Imports)
128+
for (auto *Import : MF->Imports)
129129
handleModuleFile(Import);
130130
}
131131

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ using namespace tidy;
1414

1515
// Returns true if GlobList starts with the negative indicator ('-'), removes it
1616
// from the GlobList.
17-
static bool ConsumeNegativeIndicator(StringRef &GlobList) {
17+
static bool consumeNegativeIndicator(StringRef &GlobList) {
1818
GlobList = GlobList.trim(" \r\n");
1919
if (GlobList.startswith("-")) {
2020
GlobList = GlobList.substr(1);
@@ -25,7 +25,7 @@ static bool ConsumeNegativeIndicator(StringRef &GlobList) {
2525

2626
// Converts first glob from the comma-separated list of globs to Regex and
2727
// removes it and the trailing comma from the GlobList.
28-
static llvm::Regex ConsumeGlob(StringRef &GlobList) {
28+
static llvm::Regex consumeGlob(StringRef &GlobList) {
2929
StringRef UntrimmedGlob = GlobList.substr(0, GlobList.find(','));
3030
StringRef Glob = UntrimmedGlob.trim(' ');
3131
GlobList = GlobList.substr(UntrimmedGlob.size() + 1);
@@ -46,8 +46,8 @@ GlobList::GlobList(StringRef Globs) {
4646
Items.reserve(Globs.count(',') + 1);
4747
do {
4848
GlobListItem Item;
49-
Item.IsPositive = !ConsumeNegativeIndicator(Globs);
50-
Item.Regex = ConsumeGlob(Globs);
49+
Item.IsPositive = !consumeNegativeIndicator(Globs);
50+
Item.Regex = consumeGlob(Globs);
5151
Items.push_back(std::move(Item));
5252
} while (!Globs.empty());
5353
}

clang-tools-extra/clang-tidy/abseil/DurationDivisionCheck.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@ namespace abseil {
1717

1818
using namespace clang::ast_matchers;
1919

20-
void DurationDivisionCheck::registerMatchers(MatchFinder *finder) {
20+
void DurationDivisionCheck::registerMatchers(MatchFinder *Finder) {
2121
const auto DurationExpr =
2222
expr(hasType(cxxRecordDecl(hasName("::absl::Duration"))));
23-
finder->addMatcher(
23+
Finder->addMatcher(
2424
traverse(TK_AsIs,
2525
implicitCastExpr(
2626
hasSourceExpression(ignoringParenCasts(
@@ -35,8 +35,8 @@ void DurationDivisionCheck::registerMatchers(MatchFinder *finder) {
3535
this);
3636
}
3737

38-
void DurationDivisionCheck::check(const MatchFinder::MatchResult &result) {
39-
const auto *OpCall = result.Nodes.getNodeAs<CXXOperatorCallExpr>("OpCall");
38+
void DurationDivisionCheck::check(const MatchFinder::MatchResult &Result) {
39+
const auto *OpCall = Result.Nodes.getNodeAs<CXXOperatorCallExpr>("OpCall");
4040
diag(OpCall->getOperatorLoc(),
4141
"operator/ on absl::Duration objects performs integer division; "
4242
"did you mean to use FDivDuration()?")
@@ -47,8 +47,8 @@ void DurationDivisionCheck::check(const MatchFinder::MatchResult &result) {
4747
", ")
4848
<< FixItHint::CreateInsertion(
4949
Lexer::getLocForEndOfToken(
50-
result.SourceManager->getSpellingLoc(OpCall->getEndLoc()), 0,
51-
*result.SourceManager, result.Context->getLangOpts()),
50+
Result.SourceManager->getSpellingLoc(OpCall->getEndLoc()), 0,
51+
*Result.SourceManager, Result.Context->getLangOpts()),
5252
")");
5353
}
5454

clang-tools-extra/clang-tidy/abseil/DurationFactoryFloatCheck.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ namespace tidy {
2020
namespace abseil {
2121

2222
// Returns `true` if `Range` is inside a macro definition.
23-
static bool InsideMacroDefinition(const MatchFinder::MatchResult &Result,
23+
static bool insideMacroDefinition(const MatchFinder::MatchResult &Result,
2424
SourceRange Range) {
2525
return !clang::Lexer::makeFileCharRange(
2626
clang::CharSourceRange::getCharRange(Range),
@@ -46,7 +46,7 @@ void DurationFactoryFloatCheck::check(const MatchFinder::MatchResult &Result) {
4646
const auto *MatchedCall = Result.Nodes.getNodeAs<CallExpr>("call");
4747

4848
// Don't try and replace things inside of macro definitions.
49-
if (InsideMacroDefinition(Result, MatchedCall->getSourceRange()))
49+
if (insideMacroDefinition(Result, MatchedCall->getSourceRange()))
5050
return;
5151

5252
const Expr *Arg = MatchedCall->getArg(0)->IgnoreImpCasts();

clang-tools-extra/clang-tidy/abseil/DurationFactoryScaleCheck.cpp

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ getScaleForFactory(llvm::StringRef FactoryName) {
3535

3636
// Given either an integer or float literal, return its value.
3737
// One and only one of `IntLit` and `FloatLit` should be provided.
38-
static double GetValue(const IntegerLiteral *IntLit,
38+
static double getValue(const IntegerLiteral *IntLit,
3939
const FloatingLiteral *FloatLit) {
4040
if (IntLit)
4141
return IntLit->getValue().getLimitedValue();
@@ -48,7 +48,7 @@ static double GetValue(const IntegerLiteral *IntLit,
4848
// would produce a new scale. If so, return a tuple containing the new scale
4949
// and a suitable Multiplier for that scale, otherwise `None`.
5050
static llvm::Optional<std::tuple<DurationScale, double>>
51-
GetNewScaleSingleStep(DurationScale OldScale, double Multiplier) {
51+
getNewScaleSingleStep(DurationScale OldScale, double Multiplier) {
5252
switch (OldScale) {
5353
case DurationScale::Hours:
5454
if (Multiplier <= 1.0 / 60.0)
@@ -94,17 +94,17 @@ GetNewScaleSingleStep(DurationScale OldScale, double Multiplier) {
9494

9595
// Given the scale of a duration and a `Multiplier`, determine if `Multiplier`
9696
// would produce a new scale. If so, return it, otherwise `None`.
97-
static llvm::Optional<DurationScale> GetNewScale(DurationScale OldScale,
97+
static llvm::Optional<DurationScale> getNewScale(DurationScale OldScale,
9898
double Multiplier) {
9999
while (Multiplier != 1.0) {
100-
llvm::Optional<std::tuple<DurationScale, double>> result =
101-
GetNewScaleSingleStep(OldScale, Multiplier);
102-
if (!result)
100+
llvm::Optional<std::tuple<DurationScale, double>> Result =
101+
getNewScaleSingleStep(OldScale, Multiplier);
102+
if (!Result)
103103
break;
104-
if (std::get<1>(*result) == 1.0)
105-
return std::get<0>(*result);
106-
Multiplier = std::get<1>(*result);
107-
OldScale = std::get<0>(*result);
104+
if (std::get<1>(*Result) == 1.0)
105+
return std::get<0>(*Result);
106+
Multiplier = std::get<1>(*Result);
107+
OldScale = std::get<0>(*Result);
108108
}
109109

110110
return llvm::None;
@@ -173,7 +173,7 @@ void DurationFactoryScaleCheck::check(const MatchFinder::MatchResult &Result) {
173173
const auto *IntLit = llvm::dyn_cast<IntegerLiteral>(MultBinOp->getLHS());
174174
const auto *FloatLit = llvm::dyn_cast<FloatingLiteral>(MultBinOp->getLHS());
175175
if (IntLit || FloatLit) {
176-
NewScale = GetNewScale(Scale, GetValue(IntLit, FloatLit));
176+
NewScale = getNewScale(Scale, getValue(IntLit, FloatLit));
177177
if (NewScale)
178178
Remainder = MultBinOp->getRHS();
179179
}
@@ -183,7 +183,7 @@ void DurationFactoryScaleCheck::check(const MatchFinder::MatchResult &Result) {
183183
IntLit = llvm::dyn_cast<IntegerLiteral>(MultBinOp->getRHS());
184184
FloatLit = llvm::dyn_cast<FloatingLiteral>(MultBinOp->getRHS());
185185
if (IntLit || FloatLit) {
186-
NewScale = GetNewScale(Scale, GetValue(IntLit, FloatLit));
186+
NewScale = getNewScale(Scale, getValue(IntLit, FloatLit));
187187
if (NewScale)
188188
Remainder = MultBinOp->getLHS();
189189
}
@@ -195,7 +195,7 @@ void DurationFactoryScaleCheck::check(const MatchFinder::MatchResult &Result) {
195195
const auto *FloatLit = llvm::dyn_cast<FloatingLiteral>(DivBinOp->getRHS());
196196

197197
llvm::Optional<DurationScale> NewScale =
198-
GetNewScale(Scale, 1.0 / FloatLit->getValueAsApproximateDouble());
198+
getNewScale(Scale, 1.0 / FloatLit->getValueAsApproximateDouble());
199199
if (NewScale) {
200200
const Expr *Remainder = DivBinOp->getLHS();
201201

0 commit comments

Comments
 (0)