Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 12 additions & 12 deletions clang/include/clang/Basic/Attr.td
Original file line number Diff line number Diff line change
Expand Up @@ -539,9 +539,9 @@ class Attr {
// content. Eg) It parses 3 args, but semantically takes 4 args. Opts out of
// common attribute error checking.
bit HasCustomParsing = 0;
// Set to true if the attribute is a type attribute that has custom
// TreeTransform logic in order to handle template transformations.
bit HasCustomTypeTransform = 0;
// Set to true if the statement attribute is instantiation dependent and uses
// custom TreeTransform logic for template instantiation.
bit IsStmtDependent = 0;
// Set to true if all of the attribute's arguments should be parsed in an
// unevaluated context.
bit ParseArgumentsAsUnevaluated = 0;
Expand Down Expand Up @@ -1415,7 +1415,7 @@ def LoopUnrollHint : StmtAttr {
ErrorDiag, "'for', 'while', and 'do' statements">;
let Args = [ExprArgument<"UnrollHintExpr", /*opt*/1>];
let LangOpts = [SYCLIsDevice, SYCLIsHost];
let HasCustomTypeTransform = 1;
let IsStmtDependent = 1;
let AdditionalMembers = [{
std::string getDiagnosticName(const PrintingPolicy &Policy) const {
std::string ValueName;
Expand Down Expand Up @@ -1883,7 +1883,7 @@ def SYCLIntelFPGAIVDep : StmtAttr {
UnsignedArgument<"SafelenValue", /*opt*/1>
];
let LangOpts = [SYCLIsDevice, SilentlyIgnoreSYCLIsHost];
let HasCustomTypeTransform = 1;
let IsStmtDependent = 1;
let AdditionalMembers = [{
bool isDependent() const {
return (getSafelenExpr() &&
Expand Down Expand Up @@ -1928,7 +1928,7 @@ def SYCLIntelFPGAInitiationInterval : DeclOrStmtAttr {
"'for', 'while', 'do' statements, and functions">;
let Args = [ExprArgument<"IntervalExpr">];
let LangOpts = [SYCLIsDevice, SilentlyIgnoreSYCLIsHost];
let HasCustomTypeTransform = 1;
let IsStmtDependent = 1;
let Documentation = [SYCLIntelFPGAInitiationIntervalAttrDocs];
let SupportsNonconformingLambdaSyntax = 1;
}
Expand All @@ -1941,7 +1941,7 @@ def SYCLIntelFPGAMaxConcurrency : DeclOrStmtAttr {
"'for', 'while', 'do' statements, and functions">;
let Args = [ExprArgument<"NThreadsExpr">];
let LangOpts = [SYCLIsDevice, SilentlyIgnoreSYCLIsHost];
let HasCustomTypeTransform = 1;
let IsStmtDependent = 1;
let Documentation = [SYCLIntelFPGAMaxConcurrencyAttrDocs];
let SupportsNonconformingLambdaSyntax = 1;
}
Expand All @@ -1953,7 +1953,7 @@ def SYCLIntelFPGALoopCoalesce : StmtAttr {
ErrorDiag, "'for', 'while', and 'do' statements">;
let Args = [ExprArgument<"NExpr", /*opt*/1>];
let LangOpts = [SYCLIsDevice, SilentlyIgnoreSYCLIsHost];
let HasCustomTypeTransform = 1;
let IsStmtDependent = 1;
let Documentation = [SYCLIntelFPGALoopCoalesceAttrDocs];
}

Expand All @@ -1964,7 +1964,7 @@ def SYCLIntelFPGADisableLoopPipelining : DeclOrStmtAttr {
ErrorDiag,
"'for', 'while', 'do' statements, and functions">;
let LangOpts = [SYCLIsDevice, SilentlyIgnoreSYCLIsHost];
let HasCustomTypeTransform = 1;
let IsStmtDependent = 1;
let Documentation = [SYCLIntelFPGADisableLoopPipeliningAttrDocs];
let SupportsNonconformingLambdaSyntax = 1;
}
Expand All @@ -1985,7 +1985,7 @@ def SYCLIntelFPGAMaxInterleaving : StmtAttr {
ErrorDiag, "'for', 'while', and 'do' statements">;
let Args = [ExprArgument<"NExpr">];
let LangOpts = [SYCLIsDevice, SilentlyIgnoreSYCLIsHost];
let HasCustomTypeTransform = 1;
let IsStmtDependent = 1;
let Documentation = [SYCLIntelFPGAMaxInterleavingAttrDocs];
}
def : MutualExclusions<[SYCLIntelFPGADisableLoopPipelining,
Expand All @@ -1998,7 +1998,7 @@ def SYCLIntelFPGASpeculatedIterations : StmtAttr {
ErrorDiag, "'for', 'while', and 'do' statements">;
let Args = [ExprArgument<"NExpr">];
let LangOpts = [SYCLIsDevice, SilentlyIgnoreSYCLIsHost];
let HasCustomTypeTransform = 1;
let IsStmtDependent = 1;
let Documentation = [SYCLIntelFPGASpeculatedIterationsAttrDocs];
}
def : MutualExclusions<[SYCLIntelFPGADisableLoopPipelining,
Expand All @@ -2009,7 +2009,7 @@ def SYCLIntelFPGANofusion : StmtAttr {
let Subjects = SubjectList<[ForStmt, CXXForRangeStmt, WhileStmt, DoStmt],
ErrorDiag, "'for', 'while', and 'do' statements">;
let LangOpts = [SYCLIsDevice, SilentlyIgnoreSYCLIsHost];
let HasCustomTypeTransform = 1;
let IsStmtDependent = 1;
let Documentation = [SYCLIntelFPGANofusionAttrDocs];
}

Expand Down
2 changes: 1 addition & 1 deletion clang/utils/TableGen/ClangAttrEmitter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2896,7 +2896,7 @@ void EmitClangAttrList(RecordKeeper &Records, raw_ostream &OS) {
if (AttrHasPragmaSpelling(Attr))
PragmaAttrs.push_back(Attr);

if (Attr->getValueAsBit("HasCustomTypeTransform"))
if (Attr->getValueAsBit("IsStmtDependent"))
DependentStmtAttrs.push_back(Attr);

// Place it in the hierarchy.
Expand Down