Skip to content

Commit

Permalink
Overwritten with: 6f46063 Update llvm.amdgcn.waterfall.ll
Browse files Browse the repository at this point in the history
Based on upstream llvm : 1cab3bf [InstCombine] matchBSwapOrBitReverse - expose bswap/bitreverse matching flags.

Local changes since 1825096:
6f46063 Update llvm.amdgcn.waterfall.ll
89a5b55 Merged master:1cab3bf00461 into amd-gfx:b19d6f8966ea

Added AMD modification notices and removed some GPL files.

Change-Id: Iec872881c870fb3a7297ad302cf48e94e5852f67
  • Loading branch information
trenouf committed Oct 26, 2020
2 parents 1825096 + 6f46063 commit f7d2903
Show file tree
Hide file tree
Showing 884 changed files with 112,417 additions and 11,726 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,12 @@ class ExpandModularHeadersPPCallbacks::FileRecorder {
return;

// FIXME: Why is this happening? We might be losing contents here.
if (!ContentCache.getRawBuffer())
llvm::Optional<StringRef> Data = ContentCache.getBufferDataIfLoaded();
if (!Data)
return;

InMemoryFs.addFile(File->getName(), /*ModificationTime=*/0,
llvm::MemoryBuffer::getMemBufferCopy(
ContentCache.getRawBuffer()->getBuffer()));
llvm::MemoryBuffer::getMemBufferCopy(*Data));
// Remove the file from the set of necessary files.
FilesToRecord.erase(File);
}
Expand Down
3 changes: 3 additions & 0 deletions clang-tools-extra/clang-tidy/google/AvoidCStyleCastsCheck.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ namespace readability {
/// This check is similar to `-Wold-style-cast`, but it suggests automated fixes
/// in some cases. The reported locations should not be different from the
/// ones generated by `-Wold-style-cast`.
///
/// For the user-facing documentation see:
/// http://clang.llvm.org/extra/clang-tidy/checks/google-readability-casting.html
class AvoidCStyleCastsCheck : public ClangTidyCheck {
public:
AvoidCStyleCastsCheck(StringRef Name, ClangTidyContext *Context)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ namespace readability {

// Check for underscores in the names of googletest tests, per
// https://github.com/google/googletest/blob/master/googletest/docs/faq.md#why-should-test-suite-names-and-test-names-not-contain-underscore
///
/// For the user-facing documentation see:
/// http://clang.llvm.org/extra/clang-tidy/checks/google-readability-avoid-underscore-in-googletest-name.html
class AvoidUnderscoreInGoogletestNameCheck : public ClangTidyCheck {
public:
using ClangTidyCheck::ClangTidyCheck;
Expand Down
3 changes: 3 additions & 0 deletions clang-tools-extra/clang-tidy/google/DefaultArgumentsCheck.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ namespace google {
/// Checks that default parameters are not given for virtual methods.
///
/// See https://google.github.io/styleguide/cppguide.html#Default_Arguments
///
/// For the user-facing documentation see:
/// http://clang.llvm.org/extra/clang-tidy/checks/google-default-arguments.html
class DefaultArgumentsCheck : public ClangTidyCheck {
public:
DefaultArgumentsCheck(StringRef Name, ClangTidyContext *Context)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ namespace google {
/// Checks that all single-argument constructors are explicit.
///
/// See https://google.github.io/styleguide/cppguide.html#Explicit_Constructors
///
/// For the user-facing documentation see:
/// http://clang.llvm.org/extra/clang-tidy/checks/google-explicit-constructor.html
class ExplicitConstructorCheck : public ClangTidyCheck {
public:
ExplicitConstructorCheck(StringRef Name, ClangTidyContext *Context)
Expand Down
3 changes: 3 additions & 0 deletions clang-tools-extra/clang-tidy/google/ExplicitMakePairCheck.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ namespace build {
/// specified explicitly, and such use isn't intended in any case.
///
/// Corresponding cpplint.py check name: 'build/explicit_make_pair'.
///
/// For the user-facing documentation see:
/// http://clang.llvm.org/extra/clang-tidy/checks/google-build-explicit-make-pair.html
class ExplicitMakePairCheck : public ClangTidyCheck {
public:
ExplicitMakePairCheck(StringRef Name, ClangTidyContext *Context)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ namespace readability {
///
/// For extension-less header files, using an empty string or leaving an
/// empty string between ";" if there are other filename extensions.
///
/// For the user-facing documentation see:
/// http://clang.llvm.org/extra/clang-tidy/checks/google-global-names-in-headers.html
class GlobalNamesInHeadersCheck : public ClangTidyCheck {
public:
GlobalNamesInHeadersCheck(StringRef Name, ClangTidyContext *Context);
Expand Down
3 changes: 3 additions & 0 deletions clang-tools-extra/clang-tidy/google/IntegerTypesCheck.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ namespace runtime {
/// with `u?intXX(_t)?`.
///
/// Corresponding cpplint.py check: 'runtime/int'.
///
/// For the user-facing documentation see:
/// http://clang.llvm.org/extra/clang-tidy/checks/google-runtime-int.html
class IntegerTypesCheck : public ClangTidyCheck {
public:
IntegerTypesCheck(StringRef Name, ClangTidyContext *Context);
Expand Down
3 changes: 3 additions & 0 deletions clang-tools-extra/clang-tidy/google/OverloadedUnaryAndCheck.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ namespace runtime {
/// https://google.github.io/styleguide/cppguide.html#Operator_Overloading
///
/// Corresponding cpplint.py check name: 'runtime/operator'.
///
/// For the user-facing documentation see:
/// http://clang.llvm.org/extra/clang-tidy/checks/google-runtime-operator.html
class OverloadedUnaryAndCheck : public ClangTidyCheck {
public:
OverloadedUnaryAndCheck(StringRef Name, ClangTidyContext *Context)
Expand Down
3 changes: 3 additions & 0 deletions clang-tools-extra/clang-tidy/google/TodoCommentCheck.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ namespace readability {
/// Finds TODO comments without a username or bug number.
///
/// Corresponding cpplint.py check: 'readability/todo'
///
/// For the user-facing documentation see:
/// http://clang.llvm.org/extra/clang-tidy/checks/google-readability-todo.html
class TodoCommentCheck : public ClangTidyCheck {
public:
TodoCommentCheck(StringRef Name, ClangTidyContext *Context);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ namespace build {
/// https://google.github.io/styleguide/cppguide.html#Namespaces
///
/// Corresponding cpplint.py check name: 'build/namespaces'.
///
/// For the user-facing documentation see:
/// http://clang.llvm.org/extra/clang-tidy/checks/google-build-namespaces.html
class UnnamedNamespaceInHeaderCheck : public ClangTidyCheck {
public:
UnnamedNamespaceInHeaderCheck(StringRef Name, ClangTidyContext *Context);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ namespace build {
/// \endcode
///
/// Corresponding cpplint.py check name: `build/namespaces`.
///
/// For the user-facing documentation see:
/// https://clang.llvm.org/extra/clang-tidy/checks/google-build-using-namespace.html
class UsingNamespaceDirectiveCheck : public ClangTidyCheck {
public:
UsingNamespaceDirectiveCheck(StringRef Name, ClangTidyContext *Context)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,10 @@ void UnnecessaryCopyInitialization::registerMatchers(MatchFinder *Finder) {
declStmt(
has(varDecl(hasLocalStorage(),
hasType(qualType(
hasCanonicalType(
matchers::isExpensiveToCopy()),
hasCanonicalType(allOf(
matchers::isExpensiveToCopy(),
unless(hasDeclaration(namedDecl(
hasName("::std::function")))))),
unless(hasDeclaration(namedDecl(
matchers::matchesAnyListedName(
AllowedTypes)))))),
Expand Down
8 changes: 8 additions & 0 deletions clang-tools-extra/clangd/Selection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -605,6 +605,10 @@ class SelectionVisitor : public RecursiveASTVisitor<SelectionVisitor> {
bool canSafelySkipNode(const DynTypedNode &N) {
SourceRange S = N.getSourceRange();
if (auto *TL = N.get<TypeLoc>()) {
// FIXME: TypeLoc::getBeginLoc()/getEndLoc() are pretty fragile
// heuristics. We should consider only pruning critical TypeLoc nodes, to
// be more robust.

// DeclTypeTypeLoc::getSourceRange() is incomplete, which would lead to
// failing
// to descend into the child expression.
Expand All @@ -616,6 +620,10 @@ class SelectionVisitor : public RecursiveASTVisitor<SelectionVisitor> {
// rid of this patch.
if (auto DT = TL->getAs<DecltypeTypeLoc>())
S.setEnd(DT.getUnderlyingExpr()->getEndLoc());
// AttributedTypeLoc may point to the attribute's range, NOT the modified
// type's range.
if (auto AT = TL->getAs<AttributedTypeLoc>())
S = AT.getModifiedLoc().getSourceRange();
}
if (!SelChecker.mayHit(S)) {
dlog("{1}skip: {0}", printNodeToString(N, PrintPolicy), indent());
Expand Down
18 changes: 11 additions & 7 deletions clang-tools-extra/clangd/index/remote/Client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
#include "marshalling/Marshalling.h"
#include "support/Logger.h"
#include "support/Trace.h"
#include "clang/Basic/Version.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/Support/Error.h"

Expand All @@ -28,7 +29,8 @@ namespace {
class IndexClient : public clangd::SymbolIndex {
template <typename RequestT, typename ReplyT>
using StreamingCall = std::unique_ptr<grpc::ClientReader<ReplyT>> (
remote::SymbolIndex::Stub::*)(grpc::ClientContext *, const RequestT &);
remote::v1::SymbolIndex::Stub::*)(grpc::ClientContext *,
const RequestT &);

template <typename RequestT, typename ReplyT, typename ClangdRequestT,
typename CallbackT>
Expand All @@ -40,6 +42,7 @@ class IndexClient : public clangd::SymbolIndex {
const auto RPCRequest = ProtobufMarshaller->toProtobuf(Request);
SPAN_ATTACH(Tracer, "Request", RPCRequest.DebugString());
grpc::ClientContext Context;
Context.AddMetadata("version", clang::getClangToolFullVersion("clangd"));
std::chrono::system_clock::time_point Deadline =
std::chrono::system_clock::now() + DeadlineWaitingTime;
Context.set_deadline(Deadline);
Expand Down Expand Up @@ -73,7 +76,7 @@ class IndexClient : public clangd::SymbolIndex {
IndexClient(
std::shared_ptr<grpc::Channel> Channel, llvm::StringRef ProjectRoot,
std::chrono::milliseconds DeadlineTime = std::chrono::milliseconds(1000))
: Stub(remote::SymbolIndex::NewStub(Channel)),
: Stub(remote::v1::SymbolIndex::NewStub(Channel)),
ProtobufMarshaller(new Marshaller(/*RemoteIndexRoot=*/"",
/*LocalIndexRoot=*/ProjectRoot)),
DeadlineWaitingTime(DeadlineTime) {
Expand All @@ -82,25 +85,26 @@ class IndexClient : public clangd::SymbolIndex {

void lookup(const clangd::LookupRequest &Request,
llvm::function_ref<void(const clangd::Symbol &)> Callback) const {
streamRPC(Request, &remote::SymbolIndex::Stub::Lookup, Callback);
streamRPC(Request, &remote::v1::SymbolIndex::Stub::Lookup, Callback);
}

bool
fuzzyFind(const clangd::FuzzyFindRequest &Request,
llvm::function_ref<void(const clangd::Symbol &)> Callback) const {
return streamRPC(Request, &remote::SymbolIndex::Stub::FuzzyFind, Callback);
return streamRPC(Request, &remote::v1::SymbolIndex::Stub::FuzzyFind,
Callback);
}

bool refs(const clangd::RefsRequest &Request,
llvm::function_ref<void(const clangd::Ref &)> Callback) const {
return streamRPC(Request, &remote::SymbolIndex::Stub::Refs, Callback);
return streamRPC(Request, &remote::v1::SymbolIndex::Stub::Refs, Callback);
}

void
relations(const clangd::RelationsRequest &Request,
llvm::function_ref<void(const SymbolID &, const clangd::Symbol &)>
Callback) const {
streamRPC(Request, &remote::SymbolIndex::Stub::Relations,
streamRPC(Request, &remote::v1::SymbolIndex::Stub::Relations,
// Unpack protobuf Relation.
[&](std::pair<SymbolID, clangd::Symbol> SubjectAndObject) {
Callback(SubjectAndObject.first, SubjectAndObject.second);
Expand All @@ -112,7 +116,7 @@ class IndexClient : public clangd::SymbolIndex {
size_t estimateMemoryUsage() const { return 0; }

private:
std::unique_ptr<remote::SymbolIndex::Stub> Stub;
std::unique_ptr<remote::v1::SymbolIndex::Stub> Stub;
std::unique_ptr<Marshaller> ProtobufMarshaller;
// Each request will be terminated if it takes too long.
std::chrono::milliseconds DeadlineWaitingTime;
Expand Down
2 changes: 1 addition & 1 deletion clang-tools-extra/clangd/index/remote/Index.proto
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

syntax = "proto3";

package clang.clangd.remote;
package clang.clangd.remote.v1;

// Semantics of SymbolIndex match clangd::SymbolIndex with all required
// structures corresponding to their clangd::* counterparts.
Expand Down
Loading

0 comments on commit f7d2903

Please sign in to comment.