@@ -153,7 +153,7 @@ std::shared_ptr<ExecutableCode> LLVMCodeBuilder::finalize()
153153 pushScopeLevel ();
154154
155155 // Execute recorded steps
156- for (const auto insPtr : m_instructionList ) {
156+ for (LLVMInstruction *insPtr = m_instructions. first (); insPtr; insPtr = insPtr-> next ) {
157157 const LLVMInstruction &step = *insPtr;
158158
159159 switch (step.type ) {
@@ -743,7 +743,7 @@ std::shared_ptr<ExecutableCode> LLVMCodeBuilder::finalize()
743743 LLVMVariablePtr &varPtr = m_variablePtrs[step.workVariable ];
744744 varPtr.changed = true ;
745745
746- const bool safe = isVarOrListTypeSafe (insPtr. get () , varPtr.type );
746+ const bool safe = isVarOrListTypeSafe (insPtr, varPtr.type );
747747
748748 // Initialize stack variable on first assignment
749749 if (!varPtr.onStack ) {
@@ -778,7 +778,7 @@ std::shared_ptr<ExecutableCode> LLVMCodeBuilder::finalize()
778778 assert (step.args .size () == 0 );
779779 LLVMVariablePtr &varPtr = m_variablePtrs[step.workVariable ];
780780
781- if (!isVarOrListTypeSafe (insPtr. get () , varPtr.type ))
781+ if (!isVarOrListTypeSafe (insPtr, varPtr.type ))
782782 varPtr.type = Compiler::StaticType::Unknown;
783783
784784 step.functionReturnReg ->value = varPtr.onStack && !(step.loopCondition && !m_warp) ? varPtr.stackPtr : varPtr.heapPtr ;
@@ -806,7 +806,7 @@ std::shared_ptr<ExecutableCode> LLVMCodeBuilder::finalize()
806806 const auto &arg = step.args [0 ];
807807 LLVMListPtr &listPtr = m_listPtrs[step.workList ];
808808
809- if (!isVarOrListTypeSafe (insPtr. get () , listPtr.type ))
809+ if (!isVarOrListTypeSafe (insPtr, listPtr.type ))
810810 listPtr.type = Compiler::StaticType::Unknown;
811811
812812 // Range check
@@ -846,7 +846,7 @@ std::shared_ptr<ExecutableCode> LLVMCodeBuilder::finalize()
846846 typeMap[&listPtr] = listPtr.type ;
847847 }
848848
849- if (!isVarOrListTypeSafe (insPtr. get () , listPtr.type ))
849+ if (!isVarOrListTypeSafe (insPtr, listPtr.type ))
850850 listPtr.type = Compiler::StaticType::Unknown;
851851
852852 // Check if enough space is allocated
@@ -894,7 +894,7 @@ std::shared_ptr<ExecutableCode> LLVMCodeBuilder::finalize()
894894 typeMap[&listPtr] = listPtr.type ;
895895 }
896896
897- if (!isVarOrListTypeSafe (insPtr. get () , listPtr.type ))
897+ if (!isVarOrListTypeSafe (insPtr, listPtr.type ))
898898 listPtr.type = Compiler::StaticType::Unknown;
899899
900900 llvm::Value *oldAllocatedSize = m_builder.CreateLoad (m_builder.getInt64Ty (), listPtr.allocatedSizePtr );
@@ -933,7 +933,7 @@ std::shared_ptr<ExecutableCode> LLVMCodeBuilder::finalize()
933933 Compiler::StaticType type = optimizeRegisterType (valueArg.second );
934934 LLVMListPtr &listPtr = m_listPtrs[step.workList ];
935935
936- if (!isVarOrListTypeSafe (insPtr. get () , listPtr.type ))
936+ if (!isVarOrListTypeSafe (insPtr, listPtr.type ))
937937 listPtr.type = Compiler::StaticType::Unknown;
938938
939939 // Range check
@@ -981,7 +981,7 @@ std::shared_ptr<ExecutableCode> LLVMCodeBuilder::finalize()
981981 const auto &arg = step.args [0 ];
982982 LLVMListPtr &listPtr = m_listPtrs[step.workList ];
983983
984- if (!isVarOrListTypeSafe (insPtr. get () , listPtr.type ))
984+ if (!isVarOrListTypeSafe (insPtr, listPtr.type ))
985985 listPtr.type = Compiler::StaticType::Unknown;
986986
987987 llvm::Value *min = llvm::ConstantFP::get (m_llvmCtx, llvm::APFloat (0.0 ));
@@ -1012,7 +1012,7 @@ std::shared_ptr<ExecutableCode> LLVMCodeBuilder::finalize()
10121012 const auto &arg = step.args [0 ];
10131013 LLVMListPtr &listPtr = m_listPtrs[step.workList ];
10141014
1015- if (!isVarOrListTypeSafe (insPtr. get () , listPtr.type ))
1015+ if (!isVarOrListTypeSafe (insPtr, listPtr.type ))
10161016 listPtr.type = Compiler::StaticType::Unknown;
10171017
10181018 step.functionReturnReg ->value = m_builder.CreateSIToFP (getListItemIndex (listPtr, arg.second ), m_builder.getDoubleTy ());
@@ -1024,7 +1024,7 @@ std::shared_ptr<ExecutableCode> LLVMCodeBuilder::finalize()
10241024 const auto &arg = step.args [0 ];
10251025 LLVMListPtr &listPtr = m_listPtrs[step.workList ];
10261026
1027- if (!isVarOrListTypeSafe (insPtr. get () , listPtr.type ))
1027+ if (!isVarOrListTypeSafe (insPtr, listPtr.type ))
10281028 listPtr.type = Compiler::StaticType::Unknown;
10291029
10301030 llvm::Value *index = getListItemIndex (listPtr, arg.second );
0 commit comments