Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/sycl' into private/abatashe/user…
Browse files Browse the repository at this point in the history
…_docs

* origin/sycl: (6482 commits)
  [SYCL][NFC] Clean formatting in Markdown documents (intel#1635)
  [SYCL][Doc] Remove obsolete parens from README (intel#1637)
  [SYCL] Fix failing ABI tests when LLVM_LIBDIR_SUFFIX is set (intel#1605)
  [SYCL] Fix warnings in libdevice (intel#1630)
  [SYCL][CUDA] Triage and clean LIT (intel#1620)
  [SYCL][NFC] Fix GCC 8 compilation warnings (intel#1631)
  [SYCL] Minor fixes in LowerWGScope
  [SYCL] PI: correct default interoperability plugin selection
  [SYCL] Add faster reduction implementations using atomic or/and intel::reduce() (intel#1615)
  [SYCL] Add sycl-ls utility for listing devices discovered/selected by SYCL RT (intel#1575)
  [SYCL] Fix getDeviceFromHandler declarations (intel#1626)
  [SPIR-V] Correct/improve declaration of SPIR-V builtins (intel#1519)
  [SYCL][USM] Improve USM allocator test and fix improper behavior. (intel#1538)
  [SYCL] Fix failing ABI LITs (intel#1622)
  [SYCL] Add support for MSVC internal math functions in device library (intel#1441)
  [SYCL] Add runtime library versioning (intel#1604)
  [SYCL] Check weak symbols in ABI dumps (intel#1609)
  [NFC][SYCL] Improve kernel metadata test (intel#1610)
  Revert "[SYCL] XFAIL LIT test due to duplicate diagnostic" (intel#1460)
  [SYCL] Move the reduction command group funcs out of handler.hpp (intel#1602)
  ...
  • Loading branch information
Alexander Batashev committed May 6, 2020
2 parents df3658b + b375b04 commit b952a76
Show file tree
Hide file tree
Showing 10,333 changed files with 506,131 additions and 161,026 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
12 changes: 12 additions & 0 deletions .arclint
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"linters": {
"clang-format": {
"type": "script-and-regex",
"script-and-regex.script": "utils/arcanist/clang-format.sh",
"script-and-regex.regex": "/^(?P<severity>[[:alpha:]]+)\n(?P<message>[^\n]+)\n(====|(?P<line>\\d),(?P<char>\\d)\n(?P<original>.*)>>>>\n(?P<replacement>.*)<<<<\n)$/s",
"include": [
"(\\.(cc|cpp|h)$)"
]
}
}
}
24 changes: 18 additions & 6 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,12 +77,25 @@ for more information.
- Create a personal fork of the project on GitHub
- For the DPC++ Compiler project, use **sycl** branch as baseline for your
changes. See [Get Started Guide](sycl/doc/GetStartedGuide.md).
- Prepare your patch (follow
[LLVM coding standards](https://llvm.org/docs/CodingStandards.html)).
[clang-format](https://clang.llvm.org/docs/ClangFormat.html) and [clang-tidy](
https://clang.llvm.org/extra/clang-tidy/) tools can be integrated into your
workflow to ensure formatting and stylistic compliance of your changes.
- Prepare your patch
- follow [LLVM coding standards](https://llvm.org/docs/CodingStandards.html)
- [clang-format](https://clang.llvm.org/docs/ClangFormat.html) and
[clang-tidy](https://clang.llvm.org/extra/clang-tidy/) tools can be
integrated into your workflow to ensure formatting and stylistic
compliance of your changes.
- use
```
./clang/tools/clang-format/git-clang-format `git merge-base origin/sycl HEAD`
```
to check the format of your current changes against the `origin/sycl`
branch.
- `-f` to also correct unstaged changes
- `--diff` to only print the diff without applying
- Build the project and run all tests.
- complete test suite: `python buildbot/check.py`
- sycl test suite `python buildbot/check.py -t test-sycl`
- run only "mytest" test `python buildbot/check.py -t test-sycl-mytest`
- if necessary, use `-o $LLVM_BUILD_DIR` to specify the llvm build directory
### Commit message
Expand Down Expand Up @@ -114,5 +127,4 @@ Project maintainers merge pull requests using one of the following options:
- [Create a merge commit] Used for LLVM pull-down PRs to preserve hashes of the
commits pulled from the LLVM community repository

*Other names and brands may be claimed as the property of others.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@ Intel staging area for llvm.org contribution.
Home for Intel LLVM-based projects:
- oneAPI Data Parallel C++ compiler - see **sycl** branch. More information on
oneAPI and DPC++ is available at
([https://www.oneapi.com/](https://www.oneapi.com/))
- [![Linux Post Commit Checks](https://github.com/intel/llvm/workflows/Linux%20Post%20Commit%20Checks/badge.svg)](https://github.com/intel/llvm/actions?query=workflow%3A%22Linux+Post+Commit+Checks%22) [![Generate Doxygen documentation](https://github.com/intel/llvm/workflows/Generate%20Doxygen%20documentation/badge.svg)](https://github.com/intel/llvm/actions?query=workflow%3A%22Generate+Doxygen+documentation%22)
[https://www.oneapi.com/](https://www.oneapi.com/)
- [![Linux Post Commit Checks](https://github.com/intel/llvm/workflows/Linux%20Post%20Commit%20Checks/badge.svg)](https://github.com/intel/llvm/actions?query=workflow%3A%22Linux+Post+Commit+Checks%22)
[![Generate Doxygen documentation](https://github.com/intel/llvm/workflows/Generate%20Doxygen%20documentation/badge.svg)](https://github.com/intel/llvm/actions?query=workflow%3A%22Generate+Doxygen+documentation%22)



Expand Down
3 changes: 2 additions & 1 deletion clang-tools-extra/clang-change-namespace/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
set(LLVM_LINK_COMPONENTS
support
FrontendOpenMP
Support
)

add_clang_library(clangChangeNamespace
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -832,7 +832,7 @@ void ChangeNamespaceTool::replaceQualifiedSymbolInDeclContext(
std::string AliasName = NamespaceAlias->getNameAsString();
std::string AliasQualifiedName =
NamespaceAlias->getQualifiedNameAsString();
// We only consider namespace aliases define in the global namepspace or
// We only consider namespace aliases define in the global namespace or
// in namespaces that are directly visible from the reference, i.e.
// ancestor of the `OldNs`. Note that declarations in ancestor namespaces
// but not visible in the new namespace is filtered out by
Expand Down
4 changes: 2 additions & 2 deletions clang-tools-extra/clang-change-namespace/ChangeNamespace.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ namespace change_namespace {
// reference needs to be fully-qualified, this adds a "::" prefix to the
// namespace specifiers unless the new namespace is the global namespace.
// For classes, only classes that are declared/defined in the given namespace in
// speficifed files will be moved: forward declarations will remain in the old
// specified files will be moved: forward declarations will remain in the old
// namespace.
// For example, changing "a" to "x":
// Old code:
Expand Down Expand Up @@ -138,7 +138,7 @@ class ChangeNamespaceTool : public ast_matchers::MatchFinder::MatchCallback {
llvm::Regex FilePatternRE;
// Information about moved namespaces grouped by file.
// Since we are modifying code in old namespaces (e.g. add namespace
// spedifiers) as well as moving them, we store information about namespaces
// specifiers) as well as moving them, we store information about namespaces
// to be moved and only move them after all modifications are finished (i.e.
// in `onEndOfTranslationUnit`).
std::map<std::string, std::vector<MoveNamespace>> MoveNamespaces;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/..)

set(LLVM_LINK_COMPONENTS
FrontendOpenMP
Support
)

Expand Down
1 change: 1 addition & 0 deletions clang-tools-extra/clang-doc/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
set(LLVM_LINK_COMPONENTS
support
BitstreamReader
FrontendOpenMP
)

add_clang_library(clangDoc
Expand Down
2 changes: 1 addition & 1 deletion clang-tools-extra/clang-doc/Generators.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ void Generator::addInfoToIndex(Index &Idx, const doc::Info *Info) {
// pointing.
auto It = std::find(I->Children.begin(), I->Children.end(), R.USR);
if (It != I->Children.end()) {
// If it is found, just change I to point the namespace refererence found.
// If it is found, just change I to point the namespace reference found.
I = &*It;
} else {
// If it is not found a new reference is created
Expand Down
6 changes: 3 additions & 3 deletions clang-tools-extra/clang-doc/Representation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ void Info::mergeBase(Info &&Other) {
// Unconditionally extend the description, since each decl may have a comment.
std::move(Other.Description.begin(), Other.Description.end(),
std::back_inserter(Description));
std::sort(Description.begin(), Description.end());
llvm::sort(Description);
auto Last = std::unique(Description.begin(), Description.end());
Description.erase(Last, Description.end());
}
Expand All @@ -202,7 +202,7 @@ void SymbolInfo::merge(SymbolInfo &&Other) {
DefLoc = std::move(Other.DefLoc);
// Unconditionally extend the list of locations, since we want all of them.
std::move(Other.Loc.begin(), Other.Loc.end(), std::back_inserter(Loc));
std::sort(Loc.begin(), Loc.end());
llvm::sort(Loc);
auto Last = std::unique(Loc.begin(), Loc.end());
Loc.erase(Last, Loc.end());
mergeBase(std::move(Other));
Expand Down Expand Up @@ -314,7 +314,7 @@ bool Index::operator<(const Index &Other) const {
}

void Index::sort() {
std::sort(Children.begin(), Children.end());
llvm::sort(Children);
for (auto &C : Children)
C.sort();
}
Expand Down
2 changes: 1 addition & 1 deletion clang-tools-extra/clang-doc/Serialize.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ populateParentNamespaces(llvm::SmallVector<Reference, 4> &Namespaces,
// <root>/A/B
//
// namespace A {
// namesapce B {
// namespace B {
//
// class C {};
//
Expand Down
2 changes: 1 addition & 1 deletion clang-tools-extra/clang-include-fixer/IncludeFixer.h
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ class IncludeFixerActionFactory : public clang::tooling::ToolAction {
};

/// Create replacements, which are generated by clang-format, for the
/// missing header and mising qualifiers insertions. The function uses the
/// missing header and missing qualifiers insertions. The function uses the
/// first header for insertion.
///
/// \param Code The source code.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class IncludeFixerContext {

/// The qualifiers of the scope in which SymbolIdentifier lookup
/// occurs. It is represented as a sequence of names and scope resolution
/// operatiors ::, ending with a scope resolution operator (e.g. a::b::).
/// operators ::, ending with a scope resolution operator (e.g. a::b::).
/// Empty if SymbolIdentifier is not in a specific scope.
std::string ScopedQualifiers;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ using find_all_symbols::SymbolAndSignals;
// related to the given source file.
static double similarityScore(llvm::StringRef FileName,
llvm::StringRef Header) {
// Compute the maximum number of common path segements between Header and
// Compute the maximum number of common path segments between Header and
// a suffix of FileName.
// We do not do a full longest common substring computation, as Header
// specifies the path we would directly #include, so we assume it is rooted
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
set(LLVM_LINK_COMPONENTS
Support
FrontendOpenMP
)

add_clang_library(findAllSymbols
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ void FindAllSymbols::registerMatchers(MatchFinder *MatchFinder) {
auto HasNSOrTUCtxMatcher =
hasDeclContext(anyOf(namespaceDecl(), translationUnitDecl()));

// We need seperate rules for C record types and C++ record types since some
// We need separate rules for C record types and C++ record types since some
// template related matchers are inapplicable on C record declarations.
//
// Matchers specific to C++ code.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
//===----------------------------------------------------------------------===//

#include "PathConfig.h"
#include "llvm/ADT/SmallString.h"
#include "llvm/Support/Path.h"

namespace clang {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def find_compilation_database(path):


def MergeSymbols(directory, args):
"""Merge all symbol files (yaml) in a given directaory into a single file."""
"""Merge all symbol files (yaml) in a given directory into a single file."""
invocation = [args.binary, '-merge-dir='+directory, args.saving_path]
subprocess.call(invocation)
print 'Merge is finished. Saving results in ' + args.saving_path
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ def main():
help='clang-include-fixer input format.')
parser.add_argument('-input', default='',
help='String to initialize the database.')
# Don't throw exception when parsing unknown arguements to make the script
# Don't throw exception when parsing unknown arguments to make the script
# work in neovim.
# Neovim (at least v0.2.1) somehow mangles the sys.argv in a weird way: it
# will pass additional arguments (e.g. "-c script_host.py") to sys.argv,
Expand Down
1 change: 1 addition & 0 deletions clang-tools-extra/clang-move/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
set(LLVM_LINK_COMPONENTS
support
FrontendOpenMP
)

add_clang_library(clangMove
Expand Down
8 changes: 4 additions & 4 deletions clang-tools-extra/clang-move/Move.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ class FindAllIncludes : public PPCallbacks {
ClangMoveTool *const MoveTool;
};

/// Add a declatration being moved to new.h/cc. Note that the declaration will
/// Add a declaration being moved to new.h/cc. Note that the declaration will
/// also be deleted in old.h/cc.
void MoveDeclFromOldFileToNewFile(ClangMoveTool *MoveTool, const NamedDecl *D) {
MoveTool->getMovedDecls().push_back(D);
Expand Down Expand Up @@ -453,7 +453,7 @@ createInsertedReplacements(const std::vector<std::string> &Includes,
}

// Return a set of all decls which are used/referenced by the given Decls.
// Specically, given a class member declaration, this method will return all
// Specifically, given a class member declaration, this method will return all
// decls which are used by the whole class.
llvm::DenseSet<const Decl *>
getUsedDecls(const HelperDeclRefGraph *RG,
Expand Down Expand Up @@ -767,7 +767,7 @@ void ClangMoveTool::removeDeclsInOldFiles() {
// FIXME: Minimize the include path like clang-include-fixer.
std::string IncludeNewH =
"#include \"" + Context->Spec.NewHeader + "\"\n";
// This replacment for inserting header will be cleaned up at the end.
// This replacement for inserting header will be cleaned up at the end.
auto Err = FileAndReplacements.second.add(
tooling::Replacement(FilePath, UINT_MAX, 0, IncludeNewH));
if (Err)
Expand Down Expand Up @@ -810,7 +810,7 @@ void ClangMoveTool::moveDeclsToNewFiles() {
std::vector<const NamedDecl *> ActualNewCCDecls;

// Filter out all unused helpers in NewCCDecls.
// We only move the used helpers (including transively used helpers) and the
// We only move the used helpers (including transitively used helpers) and the
// given symbols being moved.
for (const auto *D : NewCCDecls) {
if (llvm::is_contained(HelperDeclarations, D) &&
Expand Down
1 change: 1 addition & 0 deletions clang-tools-extra/clang-query/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
set(LLVM_LINK_COMPONENTS
lineeditor
support
FrontendOpenMP
)

add_clang_library(clangQuery
Expand Down
5 changes: 4 additions & 1 deletion clang-tools-extra/clang-reorder-fields/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
set(LLVM_LINK_COMPONENTS support)
set(LLVM_LINK_COMPONENTS
FrontendOpenMP
support
)

add_clang_library(clangReorderFields
ReorderFieldsAction.cpp
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ findMembersUsedInInitExpr(const CXXCtorInitializer *Initializer,

/// Reorders fields in the definition of a struct/class.
///
/// At the moment reodering of fields with
/// At the moment reordering of fields with
/// different accesses (public/protected/private) is not supported.
/// \returns true on success.
static bool reorderFieldsInDefinition(
Expand All @@ -133,7 +133,7 @@ static bool reorderFieldsInDefinition(
for (const auto *Field : Definition->fields()) {
const auto FieldIndex = Field->getFieldIndex();
if (Field->getAccess() != Fields[NewFieldsOrder[FieldIndex]]->getAccess()) {
llvm::errs() << "Currently reodering of fields with different accesses "
llvm::errs() << "Currently reordering of fields with different accesses "
"is not supported\n";
return false;
}
Expand Down
1 change: 1 addition & 0 deletions clang-tools-extra/clang-tidy/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
set(LLVM_LINK_COMPONENTS
FrontendOpenMP
Support
)

Expand Down
6 changes: 4 additions & 2 deletions clang-tools-extra/clang-tidy/ClangTidy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,9 @@ static void setStaticAnalyzerCheckerOpts(const ClangTidyOptions &Opts,
StringRef OptName(Opt.first);
if (!OptName.startswith(AnalyzerPrefix))
continue;
AnalyzerOptions->Config[OptName.substr(AnalyzerPrefix.size())] = Opt.second;
// Analyzer options are always local options so we can ignore priority.
AnalyzerOptions->Config[OptName.substr(AnalyzerPrefix.size())] =
Opt.second.Value;
}
}

Expand Down Expand Up @@ -454,7 +456,7 @@ std::vector<std::string> ClangTidyASTConsumerFactory::getCheckNames() {
CheckNames.push_back(AnalyzerCheckNamePrefix + AnalyzerCheck.first);
#endif // CLANG_ENABLE_STATIC_ANALYZER

std::sort(CheckNames.begin(), CheckNames.end());
llvm::sort(CheckNames);
return CheckNames;
}

Expand Down
Loading

0 comments on commit b952a76

Please sign in to comment.