Skip to content

Commit

Permalink
[SYCL][FPGA][NFC] Update disable_loop_pipelining attribute (#5080)
Browse files Browse the repository at this point in the history
This patch simplifies support for disable_loop_pipelining attribute by setting SimpleHandler = 1 in Attr.td instead of using static handler function in SemaDeclAttr.cpp file. This behavior is more consistent and aligns with other community attributes.

No functionality or tests change with the improvement.

Signed-off-by: Soumi Manna <[email protected]>
  • Loading branch information
smanna12 authored Dec 4, 2021
1 parent 5ce99b8 commit 3b1ba34
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 10 deletions.
1 change: 1 addition & 0 deletions clang/include/clang/Basic/Attr.td
Original file line number Diff line number Diff line change
Expand Up @@ -2024,6 +2024,7 @@ def SYCLIntelFPGADisableLoopPipelining : DeclOrStmtAttr {
let IsStmtDependent = 1;
let Documentation = [SYCLIntelFPGADisableLoopPipeliningAttrDocs];
let SupportsNonconformingLambdaSyntax = 1;
let SimpleHandler = 1;
}
def : MutualExclusions<[SYCLIntelFPGAInitiationInterval,
SYCLIntelFPGADisableLoopPipelining]>;
Expand Down
10 changes: 0 additions & 10 deletions clang/lib/Sema/SemaDeclAttr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3566,13 +3566,6 @@ static void handleSYCLIntelUseStallEnableClustersAttr(Sema &S, Decl *D,
SYCLIntelUseStallEnableClustersAttr(S.Context, A));
}

// Handles disable_loop_pipelining attribute.
static void handleSYCLIntelFPGADisableLoopPipeliningAttr(Sema &S, Decl *D,
const ParsedAttr &A) {
D->addAttr(::new (S.Context)
SYCLIntelFPGADisableLoopPipeliningAttr(S.Context, A));
}

// Handles initiation_interval attribute.
void Sema::AddSYCLIntelFPGAInitiationIntervalAttr(Decl *D,
const AttributeCommonInfo &CI,
Expand Down Expand Up @@ -9976,9 +9969,6 @@ static void ProcessDeclAttribute(Sema &S, Scope *scope, Decl *D,
case ParsedAttr::AT_SYCLIntelLoopFuse:
handleSYCLIntelLoopFuseAttr(S, D, AL);
break;
case ParsedAttr::AT_SYCLIntelFPGADisableLoopPipelining:
handleSYCLIntelFPGADisableLoopPipeliningAttr(S, D, AL);
break;
case ParsedAttr::AT_SYCLIntelFPGAInitiationInterval:
handleSYCLIntelFPGAInitiationIntervalAttr(S, D, AL);
break;
Expand Down

0 comments on commit 3b1ba34

Please sign in to comment.