Skip to content

Commit 07201f5

Browse files
authored
[SYCL][FPGA] Remove deprecation message for intel::disable_loop_pipelining attribute (#6404)
#6254 added the fpga_pipeline attribute and deprecated the intel::disable_loop_pipelining attribute. While this was in the pipeline, the internal decision was made to switch to properties rather than attributes for this type of thing. At this point, internal request is that (at a minimum) the deprecation message for intel::disable_loop_pipelining be removed, as we no longer plan to deprecate it. Optionally the intel::fpga_pipeline attribute can be removed from the frontend as well. Signed-off-by: Soumi Manna <[email protected]>
1 parent 5331441 commit 07201f5

File tree

3 files changed

+45
-16
lines changed

3 files changed

+45
-16
lines changed

clang/include/clang/Basic/AttrDocs.td

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3294,9 +3294,6 @@ function, or in conjunction with ``max_interleaving``,
32943294
``speculated_iterations``, ``max_concurrency``, ``initiation_interval``,
32953295
or ``ivdep``.
32963296

3297-
The ``[[intel::disable_loop_pipelining]]`` attribute spelling is a deprecated
3298-
synonym for ``[[[intel::fpga_pipeline]]`` and will be removed in the future.
3299-
33003297
.. code-block:: c++
33013298

33023299
void foo() {

clang/lib/Sema/SemaDeclAttr.cpp

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -364,14 +364,6 @@ void Sema::CheckDeprecatedSYCLAttributeSpelling(const ParsedAttr &A,
364364
Diag(A.getLoc(), diag::ext_sycl_2020_attr_spelling) << A;
365365
return;
366366
}
367-
368-
// Deprecate [[intel::disable_loop_pipelining]] attribute spelling in favor
369-
// of the SYCL FPGA attribute spelling [[intel::fpga_pipeline]].
370-
if (A.hasScope() && A.getScopeName()->isStr("intel") &&
371-
A.getAttrName()->isStr("disable_loop_pipelining")) {
372-
DiagnoseDeprecatedAttribute(A, "intel", "fpga_pipeline");
373-
return;
374-
}
375367
}
376368

377369
/// Check if IdxExpr is a valid parameter index for a function or

clang/test/SemaSYCL/intel-fpga-loops.cpp

Lines changed: 45 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,9 @@ void boo() {
134134
void goo() {
135135
int a[10];
136136
// no diagnostics are expected
137+
[[intel::disable_loop_pipelining]] for (int i = 0; i != 10; ++i)
138+
a[i] = 0;
139+
// no diagnostics are expected
137140
[[intel::fpga_pipeline]] for (int i = 0; i != 10; ++i)
138141
a[i] = 0;
139142
// no diagnostics are expected
@@ -269,6 +272,10 @@ void zoo() {
269272
[[intel::max_concurrency(2)]]
270273
[[intel::initiation_interval(2)]] for (int i = 0; i != 10; ++i)
271274
a[i] = 0;
275+
[[intel::disable_loop_pipelining]]
276+
// expected-error@+1 {{duplicate Intel FPGA loop attribute 'disable_loop_pipelining'}}
277+
[[intel::disable_loop_pipelining]] for (int i = 0; i != 10; ++i)
278+
a[i] = 0;
272279
[[intel::fpga_pipeline]]
273280
// expected-error@+1 {{duplicate Intel FPGA loop attribute 'fpga_pipeline'}}
274281
[[intel::fpga_pipeline]] for (int i = 0; i != 10; ++i)
@@ -355,23 +362,52 @@ void zoo() {
355362
// Test for Intel FPGA loop attributes compatibility
356363
void loop_attrs_compatibility() {
357364
int a[10];
365+
// no diagnostics are expected
366+
[[intel::disable_loop_pipelining]] [[intel::loop_coalesce]] for (int i = 0; i != 10; ++i)
367+
a[i] = 0;
368+
// no diagnostics are expected
358369
[[intel::fpga_pipeline]] [[intel::loop_coalesce]] for (int i = 0; i != 10; ++i)
359370
a[i] = 0;
360-
// expected-error@+4 {{'max_interleaving' and 'disable_loop_pipelining' attributes are not compatible}}
371+
// expected-error@+2 {{'max_interleaving' and 'disable_loop_pipelining' attributes are not compatible}}
361372
// expected-note@+1 {{conflicting attribute is here}}
362-
[[intel::disable_loop_pipelining]] // expected-warning {{attribute 'intel::disable_loop_pipelining' is deprecated}} \
363-
// expected-note {{did you mean to use 'intel::fpga_pipeline' instead?}}
364-
[[intel::max_interleaving(0)]] for (int i = 0; i != 10; ++i)
373+
[[intel::disable_loop_pipelining]] [[intel::max_interleaving(0)]] for (int i = 0; i != 10; ++i)
374+
a[i] = 0;
375+
// expected-error@+2 {{'max_concurrency' and 'disable_loop_pipelining' attributes are not compatible}}
376+
// expected-note@+1 {{conflicting attribute is here}}
377+
[[intel::disable_loop_pipelining]] [[intel::max_concurrency(0)]] for (int i = 0; i != 10; ++i)
378+
a[i] = 0;
379+
// expected-error@+2 {{'disable_loop_pipelining' and 'speculated_iterations' attributes are not compatible}}
380+
// expected-note@+1 {{conflicting attribute is here}}
381+
[[intel::speculated_iterations(0)]] [[intel::disable_loop_pipelining]] for (int i = 0; i != 10; ++i)
365382
a[i] = 0;
366-
367383
// expected-error@+2 {{'fpga_pipeline' and 'speculated_iterations' attributes are not compatible}}
368384
// expected-note@+1 {{conflicting attribute is here}}
369385
[[intel::speculated_iterations(0)]] [[intel::fpga_pipeline]] for (int i = 0; i != 10; ++i)
370386
a[i] = 0;
387+
// expected-error@+2 {{'disable_loop_pipelining' and 'initiation_interval' attributes are not compatible}}
388+
// expected-note@+1 {{conflicting attribute is here}}
389+
[[intel::initiation_interval(10)]] [[intel::disable_loop_pipelining]] for (int i = 0; i != 10; ++i)
390+
a[i] = 0;
391+
// expected-error@+2 {{'ivdep' and 'disable_loop_pipelining' attributes are not compatible}}
392+
// expected-note@+1 {{conflicting attribute is here}}
393+
[[intel::disable_loop_pipelining]] [[intel::ivdep]] for (int i = 0; i != 10; ++i)
394+
a[i] = 0;
371395
// expected-error@+2 {{'fpga_pipeline' and 'initiation_interval' attributes are not compatible}}
372396
// expected-note@+1 {{conflicting attribute is here}}
373397
[[intel::initiation_interval(10)]] [[intel::fpga_pipeline]] for (int i = 0; i != 10; ++i)
374398
a[i] = 0;
399+
// no diagnostics are expected
400+
[[intel::disable_loop_pipelining]] [[intel::nofusion]] for (int i = 0; i != 10; ++i)
401+
a[i] = 0;
402+
// no diagnostics are expected
403+
[[intel::disable_loop_pipelining]] [[intel::loop_count_avg(8)]] for (int i = 0; i != 10; ++i)
404+
a[i] = 0;
405+
[[intel::loop_count_min(8)]] for (int i = 0; i != 10; ++i)
406+
a[i] = 0;
407+
[[intel::loop_count_max(8)]] for (int i = 0; i != 10; ++i)
408+
a[i] = 0;
409+
[[intel::loop_count(8)]] for (int i = 0; i != 10; ++i)
410+
a[i] = 0;
375411

376412
// no diagnostics are expected
377413
[[intel::fpga_pipeline]] [[intel::loop_coalesce]] for (int i = 0; i != 10; ++i)
@@ -406,6 +442,10 @@ void loop_attrs_compatibility() {
406442
// expected-note@+1 {{conflicting attribute is here}}
407443
[[intel::ivdep]] [[intel::fpga_pipeline]] for (int i = 0; i != 10; ++i)
408444
a[i] = 0;
445+
446+
// no diagnostics are expected
447+
[[intel::disable_loop_pipelining]] [[intel::fpga_pipeline]] for (int i = 0; i != 10; ++i)
448+
a[i] = 0;
409449
}
410450

411451
template<int A, int B, int C>

0 commit comments

Comments
 (0)