@@ -3188,34 +3188,6 @@ struct AAKernelInfoFunction : AAKernelInfo {
3188
3188
->setDebugLoc (DL);
3189
3189
};
3190
3190
3191
- auto &AllocSharedRFI = OMPInfoCache.RFIs [OMPRTL___kmpc_alloc_shared];
3192
- SmallPtrSet<BasicBlock *, 8 > Visited;
3193
- for (Instruction *GuardedI : SPMDCompatibilityTracker) {
3194
- BasicBlock *BB = GuardedI->getParent ();
3195
- if (!Visited.insert (BB).second )
3196
- continue ;
3197
-
3198
- SmallVector<std::pair<Instruction *, Instruction *>> Reorders;
3199
- Instruction *LastEffect = nullptr ;
3200
- BasicBlock::reverse_iterator IP = BB->rbegin (), IPEnd = BB->rend ();
3201
- while (++IP != IPEnd) {
3202
- if (!IP->mayHaveSideEffects () && !IP->mayReadFromMemory ())
3203
- continue ;
3204
- Instruction *I = &*IP;
3205
- if (OpenMPOpt::getCallIfRegularCall (*I, &AllocSharedRFI))
3206
- continue ;
3207
- if (!I->user_empty () || !SPMDCompatibilityTracker.contains (I)) {
3208
- LastEffect = nullptr ;
3209
- continue ;
3210
- }
3211
- if (LastEffect)
3212
- Reorders.push_back ({I, LastEffect});
3213
- LastEffect = &*IP;
3214
- }
3215
- for (auto &Reorder : Reorders)
3216
- Reorder.first ->moveBefore (Reorder.second );
3217
- }
3218
-
3219
3191
SmallVector<std::pair<Instruction *, Instruction *>, 4 > GuardedRegions;
3220
3192
3221
3193
for (Instruction *GuardedI : SPMDCompatibilityTracker) {
@@ -4270,6 +4242,7 @@ void OpenMPOpt::registerAAs(bool IsModulePass) {
4270
4242
DepClassTy::NONE, /* ForceUpdate */ false ,
4271
4243
/* UpdateAfterInit */ false );
4272
4244
4245
+
4273
4246
registerFoldRuntimeCall (OMPRTL___kmpc_is_generic_main_thread_id);
4274
4247
registerFoldRuntimeCall (OMPRTL___kmpc_is_spmd_exec_mode);
4275
4248
registerFoldRuntimeCall (OMPRTL___kmpc_parallel_level);
0 commit comments