Skip to content

Commit 9ea5b97

Browse files
committed
[OpenMP][FIX] Invalidate the SPMDCompatibilityTracker explicitly
Before SPMDzation it was sufficient to add an incompatible instruction to the SPMDCompatibilityTracker. However, now adding instructions means they need guarding. As calls cannot be guarded in general we need to explicitly prevent SPMD mode. Reviewed By: jdoerfert Differential Revision: https://reviews.llvm.org/D115158
1 parent c94eb0f commit 9ea5b97

File tree

2 files changed

+1328
-1178
lines changed

2 files changed

+1328
-1178
lines changed

llvm/lib/Transforms/IPO/OpenMPOpt.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4010,6 +4010,7 @@ struct AAKernelInfoCallSite : AAKernelInfo {
40104010
break;
40114011
case OMPRTL___kmpc_omp_task:
40124012
// We do not look into tasks right now, just give up.
4013+
SPMDCompatibilityTracker.indicatePessimisticFixpoint();
40134014
SPMDCompatibilityTracker.insert(&CB);
40144015
ReachedUnknownParallelRegions.insert(&CB);
40154016
break;
@@ -4020,6 +4021,7 @@ struct AAKernelInfoCallSite : AAKernelInfo {
40204021
default:
40214022
// Unknown OpenMP runtime calls cannot be executed in SPMD-mode,
40224023
// generally. However, they do not hide parallel regions.
4024+
SPMDCompatibilityTracker.indicatePessimisticFixpoint();
40234025
SPMDCompatibilityTracker.insert(&CB);
40244026
break;
40254027
}
@@ -4079,6 +4081,7 @@ struct AAKernelInfoCallSite : AAKernelInfo {
40794081
SPMDCompatibilityTracker.insert(&CB);
40804082
break;
40814083
default:
4084+
SPMDCompatibilityTracker.indicatePessimisticFixpoint();
40824085
SPMDCompatibilityTracker.insert(&CB);
40834086
}
40844087

0 commit comments

Comments
 (0)