File tree Expand file tree Collapse file tree 2 files changed +11
-7
lines changed
Expand file tree Collapse file tree 2 files changed +11
-7
lines changed Original file line number Diff line number Diff line change @@ -329,6 +329,10 @@ class OpenACCRoutineClauseEmitter final
329329 void VisitVectorClause (const OpenACCVectorClause &clause) {
330330 routineOp.addVector (builder.getContext (), lastDeviceTypeValues);
331331 }
332+
333+ void VisitNoHostClause (const OpenACCNoHostClause &clause) {
334+ routineOp.setNohost (/* attrValue=*/ true );
335+ }
332336};
333337} // namespace
334338
Original file line number Diff line number Diff line change 11// RUN: %clang_cc1 -fopenacc -Wno-openacc-self-if-potential-conflict -emit-cir -fclangir %s -o - | FileCheck %s
22
3- #pragma acc routine seq
3+ #pragma acc routine seq nohost
44void Func1 () {}
55
66void Func2 () {}
@@ -10,16 +10,16 @@ void Func2() {}
1010void Func3 () {}
1111
1212void Func4 () {}
13- #pragma acc routine(Func4) worker
13+ #pragma acc routine(Func4) worker nohost
1414
15- #pragma acc routine vector
15+ #pragma acc routine nohost vector
1616void Func5 () {}
1717
1818void Func6 () {}
19- #pragma acc routine(Func6) vector
19+ #pragma acc routine(Func6) nohost vector
2020
2121// CHECK: cir.func{{.*}} @[[F1_NAME:.*Func1[^\(]*]]({{.*}}){{.*}} attributes {acc.routine_info = #acc.routine_info<[@[[F1_R_NAME:.*]]]>}
22- // CHECK: acc.routine @[[F1_R_NAME]] func(@[[F1_NAME]]) seq
22+ // CHECK: acc.routine @[[F1_R_NAME]] func(@[[F1_NAME]]) seq nohost
2323
2424// CHECK: cir.func{{.*}} @[[F2_NAME:.*Func2[^\(]*]]({{.*}}){{.*}} attributes {acc.routine_info = #acc.routine_info<[@[[F2_R_NAME:.*]]]>}
2525
@@ -34,5 +34,5 @@ void Func6() {}
3434// CHECK: cir.func{{.*}} @[[F6_NAME:.*Func6[^\(]*]]({{.*}}){{.*}} attributes {acc.routine_info = #acc.routine_info<[@[[F6_R_NAME:.*]]]>}
3535
3636// CHECK: acc.routine @[[F2_R_NAME]] func(@[[F2_NAME]]) seq
37- // CHECK: acc.routine @[[F4_R_NAME]] func(@[[F4_NAME]]) worker
38- // CHECK: acc.routine @[[F6_R_NAME]] func(@[[F6_NAME]]) vector
37+ // CHECK: acc.routine @[[F4_R_NAME]] func(@[[F4_NAME]]) worker nohost
38+ // CHECK: acc.routine @[[F6_R_NAME]] func(@[[F6_NAME]]) vector nohost
You can’t perform that action at this time.
0 commit comments