Skip to content

Commit

Permalink
Overwritten with: 2f0ca85 [AMDGPU] Use WQM Live Mask to Early Termina…
Browse files Browse the repository at this point in the history
…te Pixel Shaders

Based on upstream llvm : 529ecd1 [NPM] port -unify-loop-exits to NPM

Local changes since 1598ada:
2f0ca85 [AMDGPU] Use WQM Live Mask to Early Terminate Pixel Shaders
7028452 Merged master:529ecd19df1f into amd-gfx:6210b77c9d82
6210b77 Merged master:ec228fbfc0fc into amd-gfx:1b6104d6ec38
1b6104d Merged master:b78045c2ce2d into amd-gfx:9fd31e22f3e6
9fd31e2 Revert "[DAGCombiner][PowerPC] Remove isMulhCheaperThanMulShift TLI hook, Use isOperationLegalOrCustom directly instead."
7ee0c53 Merged master:ae3625d7526f into amd-gfx:2c7bdb1e17c8
2c7bdb1 Update expand-scalar-carry-out-select-user.ll
1085b47 Merged master:1d90e5304424 into amd-gfx:80dbad88ce20
80dbad8 Merged master:f2fd42098cfb into amd-gfx:64b7a5c063be
64b7a5c Merged master:a71a0d6d219a into amd-gfx:7e7f25793a94
7e7f257 Merged master:f402e682d0ef into amd-gfx:ba721ee79db8
ba721ee Merged master:094e9f4779eb into amd-gfx:bac148f43ef0
bac148f Merged master:7928d40c6b89 into amd-gfx:a32f1a47d4b7
a32f1a4 Merged master:98797a5fc06c into amd-gfx:b100493c9f39
b100493 Merged master:65e94cc946b0 into amd-gfx:44cc4ec6ae1c
44cc4ec Merged master:2a75e956e5ce into amd-gfx:9653dc41b75b
9653dc4 Merged master:53e92b4c0efc into amd-gfx:20722fb27f2e
20722fb Merged master:50cc9a0e6124 into amd-gfx:0438057f7745
0438057 Merged master:b93d74ac9c4e into amd-gfx:ceef23db0218
ceef23d Merged master:ae4fe1984f0e into amd-gfx:b9404d6baa28
b9404d6 Merged master:62a0ec1612bd into amd-gfx:428da186456d
428da18 Merged master:0538353b3be3 into amd-gfx:cefcd6abf519
cefcd6a Merged master:dc9713812355 into amd-gfx:97eda0c842bb
97eda0c Merged master:4ad459997e65 into amd-gfx:5efa00aba612
5efa00a Merged master:552c6c232872 into amd-gfx:28482ff9f121
28482ff Merged master:32f77eea2d0f into amd-gfx:a9377682fb5c
a937768 Merged master:7dff6b818b1c into amd-gfx:83a2798a92c7
83a2798 Merged master:952f43cb431c into amd-gfx:a3165bf1e7b8
a3165bf Merged master:ef0ab3cdfe20 into amd-gfx:01cf3095e4bb
01cf309 Merged master:55991b44b7f9 into amd-gfx:11d9db147428
11d9db1 Merged master:51ff04567b2f into amd-gfx:340537749c25
3405377 Merged master:3cfd9384bff4 into amd-gfx:4f03f357fef1
4f03f35 [AMDGPU] Remove calcSubRegIdx
bfa38bd Merged master:6771b98c4e4d into amd-gfx:8c6f592a80dc
8c6f592 Merged master:2bf423b0218c into amd-gfx:5fb0954ccdeb
5fb0954 Merged master:6754caa9bf21 into amd-gfx:d51eb44028f6
d51eb44 Merged master:67f189e93ce3 into amd-gfx:b2ae0114a629
b2ae011 Merged master:e9df9028a7ca into amd-gfx:dfd5c08faba1
dfd5c08 Merged master:09be7623e4e8 into amd-gfx:adbf4b157df9
adbf4b1 Merged master:88ce27c39c5e into amd-gfx:83b2caabc60f
83b2caa Merged master:196bee9648a9 into amd-gfx:2d673cddc23e
2d673cd Merged master:d8bb30c55180 into amd-gfx:a59fae97c89e
a59fae9 Merged master:a7b209a6d40d into amd-gfx:45250cd1b7e3
45250cd Merged master:220de1f32add into amd-gfx:e5f653eaa249
e5f653e Merged master:78ccb0359d8d into amd-gfx:5894e00a0f69
5894e00 Merged master:e7b4feea8e1b into amd-gfx:f99c1c4e1ba6
f99c1c4 Merged master:633f9fcb820b into amd-gfx:7af372bc8c89
7af372b Merged master:adfb5415010f into amd-gfx:b2b452e5a617
b2b452e Merged master:ef748583c24d into amd-gfx:ffaf4aaa460d
ffaf4aa Revert "[AMDGPU] Insert waterfall loops for divergent calls"
fca46d9 Merged master:7f2a641aad28 into amd-gfx:7d8613e27f8f
7d8613e Merged master:974ddb54c9ad into amd-gfx:50f1f527b5ee
50f1f52 Revert "[AMDGPU] Temporary fix to get previous intrinsic cost"
3a3234b Merged master:6bf25f45a9b6 into amd-gfx:19563a6be683

Added AMD modification notices and removed some GPL files.

Change-Id: I3482a129caffaceec6c74743834c57d3378162e5
  • Loading branch information
trenouf committed Oct 22, 2020
2 parents 1598ada + 2f0ca85 commit 145729e
Show file tree
Hide file tree
Showing 3,119 changed files with 92,220 additions and 42,684 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
4 changes: 0 additions & 4 deletions clang-tools-extra/clang-change-namespace/ChangeNamespace.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -324,10 +324,6 @@ bool conflictInNamespace(const ASTContext &AST, llvm::StringRef QualifiedSymbol,
return false;
}

AST_MATCHER(EnumDecl, isScoped) {
return Node.isScoped();
}

bool isTemplateParameter(TypeLoc Type) {
while (!Type.isNull()) {
if (Type.getTypeLocClass() == TypeLoc::SubstTemplateTypeParm)
Expand Down
18 changes: 2 additions & 16 deletions clang-tools-extra/clang-tidy/ClangTidyDiagnosticConsumer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -305,22 +305,8 @@ static bool IsNOLINTFound(StringRef NolintDirectiveText, StringRef Line,

static llvm::Optional<StringRef> getBuffer(const SourceManager &SM, FileID File,
bool AllowIO) {
// This is similar to the implementation of SourceManager::getBufferData(),
// but uses ContentCache::getRawBuffer() rather than getBuffer() if
// AllowIO=false, to avoid triggering file I/O if the file contents aren't
// already mapped.
bool CharDataInvalid = false;
const SrcMgr::SLocEntry &Entry = SM.getSLocEntry(File, &CharDataInvalid);
if (CharDataInvalid || !Entry.isFile())
return llvm::None;
const SrcMgr::ContentCache *Cache = Entry.getFile().getContentCache();
const llvm::MemoryBuffer *Buffer =
AllowIO ? Cache->getBuffer(SM.getDiagnostics(), SM.getFileManager(),
SourceLocation(), &CharDataInvalid)
: Cache->getRawBuffer();
if (!Buffer || CharDataInvalid)
return llvm::None;
return Buffer->getBuffer();
return AllowIO ? SM.getBufferDataOrNone(File)
: SM.getBufferDataIfLoaded(File);
}

static bool LineIsMarkedWithNOLINT(const SourceManager &SM, SourceLocation Loc,
Expand Down
4 changes: 2 additions & 2 deletions clang-tools-extra/clang-tidy/ClangTidyOptions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,14 @@ template <> struct MappingTraits<FileFilter> {
IO.mapRequired("name", File.Name);
IO.mapOptional("lines", File.LineRanges);
}
static StringRef validate(IO &io, FileFilter &File) {
static std::string validate(IO &io, FileFilter &File) {
if (File.Name.empty())
return "No file name specified";
for (const FileFilter::LineRange &Range : File.LineRanges) {
if (Range.first <= 0 || Range.second <= 0)
return "Invalid line range";
}
return StringRef();
return "";
}
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ AST_MATCHER(clang::VarDecl, hasConstantDeclaration) {
if (Init && !Init->isValueDependent()) {
if (Node.isConstexpr())
return true;
return Node.checkInitIsICE();
return Node.evaluateValue();
}
return false;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,10 @@ void SuspiciousSemicolonCheck::check(const MatchFinder::MatchResult &Result) {

SourceLocation LocEnd = Semicolon->getEndLoc();
FileID FID = SM.getFileID(LocEnd);
const llvm::MemoryBuffer *Buffer = SM.getBuffer(FID, LocEnd);
llvm::MemoryBufferRef Buffer = SM.getBufferOrFake(FID, LocEnd);
Lexer Lexer(SM.getLocForStartOfFile(FID), Ctxt.getLangOpts(),
Buffer->getBufferStart(), SM.getCharacterData(LocEnd) + 1,
Buffer->getBufferEnd());
Buffer.getBufferStart(), SM.getCharacterData(LocEnd) + 1,
Buffer.getBufferEnd());
if (Lexer.LexFromRawLexer(Token))
return;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,23 +85,21 @@ struct DenseMapInfo<
clang::tidy::cppcoreguidelines::SpecialMemberFunctionsCheck::ClassDefId;

static inline ClassDefId getEmptyKey() {
return ClassDefId(
clang::SourceLocation::getFromRawEncoding(static_cast<unsigned>(-1)),
"EMPTY");
return ClassDefId(DenseMapInfo<clang::SourceLocation>::getEmptyKey(),
"EMPTY");
}

static inline ClassDefId getTombstoneKey() {
return ClassDefId(
clang::SourceLocation::getFromRawEncoding(static_cast<unsigned>(-2)),
"TOMBSTONE");
return ClassDefId(DenseMapInfo<clang::SourceLocation>::getTombstoneKey(),
"TOMBSTONE");
}

static unsigned getHashValue(ClassDefId Val) {
assert(Val != getEmptyKey() && "Cannot hash the empty key!");
assert(Val != getTombstoneKey() && "Cannot hash the tombstone key!");

std::hash<ClassDefId::second_type> SecondHash;
return Val.first.getRawEncoding() + SecondHash(Val.second);
return Val.first.getHashValue() + SecondHash(Val.second);
}

static bool isEqual(const ClassDefId &LHS, const ClassDefId &RHS) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -298,8 +298,7 @@ void UpgradeGoogletestCaseCheck::check(const MatchFinder::MatchResult &Result) {
}

if (IsInInstantiation) {
if (MatchedTemplateLocations.count(
ReplacementRange.getBegin().getRawEncoding()) == 0) {
if (MatchedTemplateLocations.count(ReplacementRange.getBegin()) == 0) {
// For each location matched in a template instantiation, we check if
// the location can also be found in `MatchedTemplateLocations`. If it
// is not found, that means the expression did not create a match
Expand All @@ -313,8 +312,7 @@ void UpgradeGoogletestCaseCheck::check(const MatchFinder::MatchResult &Result) {
if (IsInTemplate) {
// We gather source locations from template matches not in template
// instantiations for future matches.
MatchedTemplateLocations.insert(
ReplacementRange.getBegin().getRawEncoding());
MatchedTemplateLocations.insert(ReplacementRange.getBegin());
}

if (!AddFix) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class UpgradeGoogletestCaseCheck : public ClangTidyCheck {
void check(const ast_matchers::MatchFinder::MatchResult &Result) override;

private:
llvm::DenseSet<unsigned> MatchedTemplateLocations;
llvm::DenseSet<SourceLocation> MatchedTemplateLocations;
};

} // namespace google
Expand Down
10 changes: 5 additions & 5 deletions clang-tools-extra/clang-tidy/misc/RedundantExpressionCheck.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -794,14 +794,14 @@ static bool areExprsFromDifferentMacros(const Expr *LhsExpr,
SM.getDecomposedLoc(SM.getExpansionLoc(Lsr.getBegin()));
std::pair<FileID, unsigned> RsrLocInfo =
SM.getDecomposedLoc(SM.getExpansionLoc(Rsr.getBegin()));
const llvm::MemoryBuffer *MB = SM.getBuffer(LsrLocInfo.first);
llvm::MemoryBufferRef MB = SM.getBufferOrFake(LsrLocInfo.first);

const char *LTokenPos = MB->getBufferStart() + LsrLocInfo.second;
const char *RTokenPos = MB->getBufferStart() + RsrLocInfo.second;
const char *LTokenPos = MB.getBufferStart() + LsrLocInfo.second;
const char *RTokenPos = MB.getBufferStart() + RsrLocInfo.second;
Lexer LRawLex(SM.getLocForStartOfFile(LsrLocInfo.first), LO,
MB->getBufferStart(), LTokenPos, MB->getBufferEnd());
MB.getBufferStart(), LTokenPos, MB.getBufferEnd());
Lexer RRawLex(SM.getLocForStartOfFile(RsrLocInfo.first), LO,
MB->getBufferStart(), RTokenPos, MB->getBufferEnd());
MB.getBufferStart(), RTokenPos, MB.getBufferEnd());

Token LTok, RTok;
do { // Compare the expressions token-by-token.
Expand Down
3 changes: 2 additions & 1 deletion clang-tools-extra/clang-tidy/misc/StaticAssertCheck.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,8 @@ SourceLocation StaticAssertCheck::getLastParenLoc(const ASTContext *ASTCtx,
const LangOptions &Opts = ASTCtx->getLangOpts();
const SourceManager &SM = ASTCtx->getSourceManager();

const llvm::MemoryBuffer *Buffer = SM.getBuffer(SM.getFileID(AssertLoc));
llvm::Optional<llvm::MemoryBufferRef> Buffer =
SM.getBufferOrNone(SM.getFileID(AssertLoc));
if (!Buffer)
return SourceLocation();

Expand Down
Loading

0 comments on commit 145729e

Please sign in to comment.