@@ -443,8 +443,12 @@ void saveFCallState(G4_Kernel* kernel, savedFCallStates& savedFCallState)
443
443
// the IR can be reused for another kernel rather than
444
444
// recompiling.
445
445
// 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++ )
447
449
{
450
+ G4_BB* curBB = (*bb_it);
451
+
448
452
if ( curBB->size () > 0 && curBB->isEndWithFCall () )
449
453
{
450
454
// Save state for this fcall
@@ -538,8 +542,8 @@ void restoreFCallState(G4_Kernel* kernel, savedFCallStates& savedFCallState)
538
542
539
543
G4_Kernel* Get_Resolved_Compilation_Unit ( common_isa_header header, std::list<G4_Kernel*> compilation_units, int idx )
540
544
{
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++ )
543
547
{
544
548
if ( (*k)->fg .builder ->getCUnitId () == (header.num_kernels + idx) && (*k)->fg .builder ->getIsKernel () == false )
545
549
{
@@ -692,7 +696,7 @@ void Stitch_Compiled_Units( common_isa_header header, std::list<G4_Kernel*>& com
692
696
}
693
697
694
698
// 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 )
696
700
{
697
701
G4_Kernel* callee = Get_Resolved_Compilation_Unit ( header, compilation_units, (*it) );
698
702
@@ -835,17 +839,17 @@ int CISA_IR_Builder::Compile( const char* nameInput)
835
839
836
840
savedFCallStates savedFCallState;
837
841
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 () ;
840
844
kernel_it++)
841
845
{
842
846
VISAKernelImpl* kernel = (*kernel_it);
843
847
844
848
saveFCallState (kernel->getKernel (), savedFCallState);
845
849
}
846
850
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 () ;
849
853
func_it++ )
850
854
{
851
855
VISAKernelImpl* function = (*func_it);
@@ -1037,8 +1041,8 @@ int CISA_IR_Builder::CreateVISAFileVar(VISA_FileVar *& decl, char *varName, unsi
1037
1041
if ( IS_GEN_BOTH_PATH )
1038
1042
{
1039
1043
// 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 () ;
1042
1046
it++ )
1043
1047
{
1044
1048
VISAKernelImpl* kernel = (*it);
0 commit comments