Skip to content

Make Intel attributes consistent with clang attributes. #3022

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jan 14, 2021
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
15 changes: 0 additions & 15 deletions clang/include/clang/Basic/Attr.td
Original file line number Diff line number Diff line change
Expand Up @@ -1149,7 +1149,6 @@ def SYCLDevice : InheritableAttr {
let Subjects = SubjectList<[Function]>;
let LangOpts = [SYCLIsDevice];
let Documentation = [SYCLDeviceDocs];
let PragmaAttributeSupport = 0;
}

def SYCLKernel : InheritableAttr {
Expand All @@ -1167,7 +1166,6 @@ def SYCLSimd : InheritableAttr {
let Subjects = SubjectList<[Function]>;
let LangOpts = [SYCLExplicitSIMD];
let Documentation = [SYCLSimdDocs];
let PragmaAttributeSupport = 0;
}

// Available in SYCL explicit SIMD extension. Binds a file scope private
Expand All @@ -1180,7 +1178,6 @@ def SYCLRegisterNum : InheritableAttr {
// for the host device as well
let LangOpts = [SYCLExplicitSIMD];
let Documentation = [SYCLRegisterNumDocs];
let PragmaAttributeSupport = 0;
}

// Used to mark ESIMD kernel pointer parameters originating from accessors.
Expand All @@ -1190,7 +1187,6 @@ def SYCLSimdAccessorPtr : InheritableAttr {
let Subjects = SubjectList<[ParmVar]>;
let LangOpts = [SYCLExplicitSIMD];
let Documentation = [SYCLSimdAccessorPtrDocs];
let PragmaAttributeSupport = 0;
}

def SYCLScope : Attr {
Expand Down Expand Up @@ -1219,7 +1215,6 @@ def SYCLDeviceIndirectlyCallable : InheritableAttr {
let Subjects = SubjectList<[Function]>;
let LangOpts = [SYCLIsDevice];
let Documentation = [SYCLDeviceIndirectlyCallableDocs];
let PragmaAttributeSupport = 0;
}

def SYCLIntelBufferLocation : InheritableAttr {
Expand All @@ -1244,7 +1239,6 @@ def SYCLIntelKernelArgsRestrict : InheritableAttr {
let LangOpts = [ SYCLIsDevice, SYCLIsHost ];
let Documentation = [ SYCLIntelKernelArgsRestrictDocs ];
let SimpleHandler = 1;
let PragmaAttributeSupport = 0;
}

def SYCLIntelNumSimdWorkItems : InheritableAttr {
Expand All @@ -1254,7 +1248,6 @@ def SYCLIntelNumSimdWorkItems : InheritableAttr {
let LangOpts = [SYCLIsDevice, SYCLIsHost];
let Subjects = SubjectList<[Function], ErrorDiag>;
let Documentation = [SYCLIntelNumSimdWorkItemsAttrDocs];
let PragmaAttributeSupport = 0;
}

def SYCLIntelUseStallEnableClusters : InheritableAttr {
Expand All @@ -1267,7 +1260,6 @@ def SYCLIntelUseStallEnableClusters : InheritableAttr {
}
}];
let Documentation = [SYCLIntelUseStallEnableClustersAttrDocs];
let PragmaAttributeSupport = 0;
}

def SYCLIntelSchedulerTargetFmaxMhz : InheritableAttr {
Expand All @@ -1277,7 +1269,6 @@ def SYCLIntelSchedulerTargetFmaxMhz : InheritableAttr {
let LangOpts = [SYCLIsDevice, SYCLIsHost];
let Subjects = SubjectList<[Function], ErrorDiag>;
let Documentation = [SYCLIntelSchedulerTargetFmaxMhzAttrDocs];
let PragmaAttributeSupport = 0;
let AdditionalMembers = [{
static unsigned getMinValue() {
return 0;
Expand All @@ -1286,7 +1277,6 @@ def SYCLIntelSchedulerTargetFmaxMhz : InheritableAttr {
return 1024*1024;
}
}];

}

def SYCLIntelMaxWorkGroupSize : InheritableAttr {
Expand All @@ -1297,7 +1287,6 @@ def SYCLIntelMaxWorkGroupSize : InheritableAttr {
ExprArgument<"ZDim">];
let LangOpts = [SYCLIsDevice, SYCLIsHost];
let Subjects = SubjectList<[Function], ErrorDiag>;
let PragmaAttributeSupport = 0;
let AdditionalMembers = [{
ArrayRef<const Expr *> dimensions() const {
return {getXDim(), getYDim(), getZDim()};
Expand All @@ -1322,7 +1311,6 @@ def SYCLIntelMaxGlobalWorkDim : InheritableAttr {
let LangOpts = [SYCLIsDevice, SYCLIsHost];
let Subjects = SubjectList<[Function], ErrorDiag>;
let Documentation = [SYCLIntelMaxGlobalWorkDimAttrDocs];
let PragmaAttributeSupport = 0;
}

def SYCLIntelNoGlobalWorkOffset : InheritableAttr {
Expand All @@ -1332,7 +1320,6 @@ def SYCLIntelNoGlobalWorkOffset : InheritableAttr {
let LangOpts = [SYCLIsDevice, SYCLIsHost];
let Subjects = SubjectList<[Function], ErrorDiag>;
let Documentation = [SYCLIntelNoGlobalWorkOffsetAttrDocs];
let PragmaAttributeSupport = 0;
}

def SYCLIntelLoopFuse : InheritableAttr {
Expand Down Expand Up @@ -1413,7 +1400,6 @@ def IntelReqdSubGroupSize: InheritableAttr {
let Subjects = SubjectList<[Function, CXXMethod], ErrorDiag>;
let Documentation = [IntelReqdSubGroupSizeDocs];
let LangOpts = [OpenCL, SYCLIsDevice, SYCLIsHost];
let PragmaAttributeSupport = 0;
}

// This attribute is both a type attribute, and a declaration attribute (for
Expand Down Expand Up @@ -2133,7 +2119,6 @@ def SYCLIntelPipeIO : Attr {
let LangOpts = [SYCLIsDevice, SYCLIsHost];
let Subjects = SubjectList<[Var]>;
let Documentation = [SYCLIntelPipeIOAttrDocs];
let PragmaAttributeSupport = 0;
}

// Variadic integral arguments.
Expand Down
13 changes: 13 additions & 0 deletions clang/test/Misc/pragma-attribute-supported-attributes-list.test
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@
// CHECK-NEXT: IBAction (SubjectMatchRule_objc_method_is_instance)
// CHECK-NEXT: IFunc (SubjectMatchRule_function)
// CHECK-NEXT: InitPriority (SubjectMatchRule_variable)
// CHECK-NEXT: IntelReqdSubGroupSize (SubjectMatchRule_function, SubjectMatchRule_function_is_member)
// CHECK-NEXT: InternalLinkage (SubjectMatchRule_variable, SubjectMatchRule_function, SubjectMatchRule_record)
// CHECK-NEXT: LTOVisibilityPublic (SubjectMatchRule_record)
// CHECK-NEXT: Leaf (SubjectMatchRule_function)
Expand Down Expand Up @@ -145,7 +146,19 @@
// CHECK-NEXT: ReturnTypestate (SubjectMatchRule_function, SubjectMatchRule_variable_is_parameter)
// CHECK-NEXT: ReturnsNonNull (SubjectMatchRule_objc_method, SubjectMatchRule_function)
// CHECK-NEXT: ReturnsTwice (SubjectMatchRule_function)
// CHECK-NEXT: SYCLDevice (SubjectMatchRule_function)
// CHECK-NEXT: SYCLDeviceIndirectlyCallable (SubjectMatchRule_function)
// CHECK-NEXT: SYCLIntelKernelArgsRestrict (SubjectMatchRule_function)
// CHECK-NEXT: SYCLIntelLoopFuse (SubjectMatchRule_function)
// CHECK-NEXT: SYCLIntelMaxGlobalWorkDim (SubjectMatchRule_function)
// CHECK-NEXT: SYCLIntelMaxWorkGroupSize (SubjectMatchRule_function)
// CHECK-NEXT: SYCLIntelNoGlobalWorkOffset (SubjectMatchRule_function)
// CHECK-NEXT: SYCLIntelNumSimdWorkItems (SubjectMatchRule_function)
// CHECK-NEXT: SYCLIntelPipeIO (SubjectMatchRule_variable)
// CHECK-NEXT: SYCLIntelSchedulerTargetFmaxMhz (SubjectMatchRule_function)
// CHECK-NEXT: SYCLIntelUseStallEnableClusters (SubjectMatchRule_function)
// CHECK-NEXT: SYCLRegisterNum (SubjectMatchRule_variable_is_global)
// CHECK-NEXT: SYCLSimd (SubjectMatchRule_function)
// CHECK-NEXT: ScopedLockable (SubjectMatchRule_record)
// CHECK-NEXT: Section (SubjectMatchRule_function, SubjectMatchRule_variable_is_global, SubjectMatchRule_objc_method, SubjectMatchRule_objc_property)
// CHECK-NEXT: SetTypestate (SubjectMatchRule_function_is_member)
Expand Down