@@ -443,8 +443,12 @@ void saveFCallState(G4_Kernel* kernel, savedFCallStates& savedFCallState)
443443 // the IR can be reused for another kernel rather than
444444 // recompiling.
445445 // kernel points to a stackcall function.
446- for (auto curBB : kernel->fg .BBs )
446+ for ( BB_LIST_ITER bb_it = kernel->fg .BBs .begin ();
447+ bb_it != kernel->fg .BBs .end ();
448+ bb_it++ )
447449 {
450+ G4_BB* curBB = (*bb_it);
451+
448452 if ( curBB->size () > 0 && curBB->isEndWithFCall () )
449453 {
450454 // Save state for this fcall
@@ -538,8 +542,8 @@ void restoreFCallState(G4_Kernel* kernel, savedFCallStates& savedFCallState)
538542
539543G4_Kernel* Get_Resolved_Compilation_Unit ( common_isa_header header, std::list<G4_Kernel*> compilation_units, int idx )
540544{
541- for ( std::list<G4_Kernel*>::iterator k = compilation_units.begin (), c_end = compilation_units. end () ;
542- k != c_end ; k++ )
545+ for ( std::list<G4_Kernel*>::iterator k = compilation_units.begin ();
546+ k != compilation_units. end () ; k++ )
543547 {
544548 if ( (*k)->fg .builder ->getCUnitId () == (header.num_kernels + idx) && (*k)->fg .builder ->getIsKernel () == false )
545549 {
@@ -692,7 +696,7 @@ void Stitch_Compiled_Units( common_isa_header header, std::list<G4_Kernel*>& com
692696 }
693697
694698 // Append declarations and color attributes from all callees to kernel
695- for (auto it = callee_index.begin (), ciEnd = callee_index.end (); it != ciEnd; ++it)
699+ for (auto it = callee_index.begin (); it ! = callee_index.end (); ++it )
696700 {
697701 G4_Kernel* callee = Get_Resolved_Compilation_Unit ( header, compilation_units, (*it) );
698702
@@ -835,17 +839,17 @@ int CISA_IR_Builder::Compile( const char* nameInput)
835839
836840 savedFCallStates savedFCallState;
837841
838- for (std::list<VISAKernelImpl*>::iterator kernel_it = kernels.begin (), kend = kernels. end () ;
839- kernel_it != kend ;
842+ for (std::list<VISAKernelImpl*>::iterator kernel_it = kernels.begin ();
843+ kernel_it != kernels. end () ;
840844 kernel_it++)
841845 {
842846 VISAKernelImpl* kernel = (*kernel_it);
843847
844848 saveFCallState (kernel->getKernel (), savedFCallState);
845849 }
846850
847- for ( std::list<VISAKernelImpl*>::iterator func_it = functions.begin (), fend = functions. end () ;
848- func_it != fend ;
851+ for ( std::list<VISAKernelImpl*>::iterator func_it = functions.begin ();
852+ func_it != functions. end () ;
849853 func_it++ )
850854 {
851855 VISAKernelImpl* function = (*func_it);
@@ -1037,8 +1041,8 @@ int CISA_IR_Builder::CreateVISAFileVar(VISA_FileVar *& decl, char *varName, unsi
10371041 if ( IS_GEN_BOTH_PATH )
10381042 {
10391043 // Append file var to all kernel/function objects in CISA_IR_Builder
1040- for ( std::list<VISAKernelImpl*>::iterator it = m_kernels.begin (), kend = m_kernels. end () ;
1041- it != kend ;
1044+ for ( std::list<VISAKernelImpl*>::iterator it = m_kernels.begin ();
1045+ it != m_kernels. end () ;
10421046 it++ )
10431047 {
10441048 VISAKernelImpl* kernel = (*it);
0 commit comments