File tree Expand file tree Collapse file tree 3 files changed +14
-0
lines changed
Expand file tree Collapse file tree 3 files changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -81,6 +81,7 @@ LLVMInstruction *Procedures::buildCallProcedure(LLVMInstruction *ins)
8181 }
8282
8383 m_utils.reloadVariables (m_utils.targetVariables ());
84+ m_utils.reloadLists ();
8485 return ins->next ;
8586}
8687
Original file line number Diff line number Diff line change @@ -329,6 +329,17 @@ void LLVMBuildUtils::reloadVariables(llvm::Value *targetVariables)
329329 }
330330}
331331
332+ void LLVMBuildUtils::reloadLists ()
333+ {
334+ // Load list size info
335+ if (m_warp) {
336+ for (auto &[list, listPtr] : m_listPtrs) {
337+ llvm::Value *size = m_builder.CreateLoad (m_builder.getInt64Ty (), listPtr.sizePtr );
338+ m_builder.CreateStore (size, listPtr.size );
339+ }
340+ }
341+ }
342+
332343void LLVMBuildUtils::pushScopeLevel ()
333344{
334345 m_stringHeap.push_back ({});
@@ -1256,6 +1267,7 @@ void LLVMBuildUtils::createSuspend()
12561267 syncVariables (m_targetVariables);
12571268 m_coroutine->createSuspend ();
12581269 reloadVariables (m_targetVariables);
1270+ reloadLists ();
12591271
12601272 if (m_warpArg) {
12611273 m_builder.CreateBr (nextBranch);
Original file line number Diff line number Diff line change @@ -63,6 +63,7 @@ class LLVMBuildUtils
6363
6464 void syncVariables (llvm::Value *targetVariables);
6565 void reloadVariables (llvm::Value *targetVariables);
66+ void reloadLists ();
6667
6768 void pushScopeLevel ();
6869 void popScopeLevel ();
You can’t perform that action at this time.
0 commit comments