@@ -64,10 +64,6 @@ ProcessResult Control::process(LLVMInstruction *ins)
6464 ret.next = buildThreadStop (ins);
6565 break ;
6666
67- case LLVMInstruction::Type::StopWithoutSync:
68- ret.next = buildStopWithoutSync (ins);
69- break ;
70-
7167 case LLVMInstruction::Type::InvalidateTarget:
7268 ret.next = buildInvalidateTarget (ins);
7369 break ;
@@ -345,23 +341,19 @@ LLVMInstruction *Control::buildEndLoop(LLVMInstruction *ins)
345341LLVMInstruction *Control::buildStop (LLVMInstruction *ins)
346342{
347343 m_utils.syncVariables ();
348- return buildStopWithoutSync (ins);
349- }
350-
351- LLVMInstruction *Control::buildThreadStop (LLVMInstruction *ins)
352- {
353- m_utils.syncVariables ();
354- m_builder.CreateBr (m_utils.endThreadBranch ());
355344
345+ m_builder.CreateBr (m_utils.endBranch ());
356346 llvm::BasicBlock *nextBranch = llvm::BasicBlock::Create (m_utils.llvmCtx (), " " , m_utils.function ());
357347 m_builder.SetInsertPoint (nextBranch);
358348
359349 return ins->next ;
360350}
361351
362- LLVMInstruction *Control::buildStopWithoutSync (LLVMInstruction *ins)
352+ LLVMInstruction *Control::buildThreadStop (LLVMInstruction *ins)
363353{
364- m_builder.CreateBr (m_utils.endBranch ());
354+ m_utils.syncVariables ();
355+ m_builder.CreateBr (m_utils.endThreadBranch ());
356+
365357 llvm::BasicBlock *nextBranch = llvm::BasicBlock::Create (m_utils.llvmCtx (), " " , m_utils.function ());
366358 m_builder.SetInsertPoint (nextBranch);
367359
0 commit comments