Feb 27, 2009 9:35 AM
Very long compile times in -O2 for C++
Got this question over on the Linux on Power developerworks forum...
Running on sles 10 sp1, power 5 system, xlc ver 9.0 ...
http://www.ibm.com/developerworks/forums/thread.jspa?threadID=252961
date ; xlC_r -I./include -I../idl -O2 -g -q64 -qminimaltoc -qpic -D_REENTRANT -D_GNU_SOURCE -c ir.cc -o ir.o -qmaxmem=-1 ; date
which results in...
Thu Feb 26 17:50:13 CET 2009
1500-029: (W) WARNING: subprogram std::__destroy_aux<__gnu_cxx::__normal_iterator<ObjVar<CORBA::AbstractInterfaceDef> *,std::vector<ObjVar<CORBA::AbstractInterfaceDef>,std::allocator<ObjVar<CORBA::AbstractInterfaceDef> > > > >(__normal_iterator<ObjVar<CORBA::AbstractInterfaceDef> *,std::vector<ObjVar<CORBA::AbstractInterfaceDef>,std::allocator<ObjVar<CORBA::AbstractInterfaceDef> > > >, __normal_iterator<ObjVar<CORBA::AbstractInterfaceDef> *,std::vector<ObjVar<CORBA::AbstractInterfaceDef>,std::allocator<ObjVar<CORBA::AbstractInterfaceDef> > > >, __false_type) could not be inlined into std::_Destroy<__gnu_cxx::__normal_iterator<ObjVar<CORBA::AbstractInterfaceDef> *,std::vector<ObjVar<CORBA::AbstractInterfaceDef>,std::allocator<ObjVar<CORBA::AbstractInterfaceDef> > > > >(__normal_iterator<ObjVar<CORBA::AbstractInterfaceDef> *,std::vector<ObjVar<CORBA::AbstractInterfaceDef>,std::allocator<ObjVar<CORBA::AbstractInterfaceDef> > > >, __normal_iterator<ObjVar<CORBA::AbstractInterfaceDef> *,std::vector<ObjVar<CORBA::AbstractInterfaceDef>,std::allocator<ObjVar<CORBA::AbstractInterfaceDef> > > >).
1500-029: (W) WARNING: subprogram std::__destroy_aux<__gnu_cxx::__normal_iterator<ObjVar<CORBA::ExceptionDef> *,std::vector<ObjVar<CORBA::ExceptionDef>,std::allocator<ObjVar<CORBA::ExceptionDef> > > > >(__normal_iterator<ObjVar<CORBA::ExceptionDef> *,std::vector<ObjVar<CORBA::ExceptionDef>,std::allocator<ObjVar<CORBA::ExceptionDef> > > >, __normal_iterator<ObjVar<CORBA::ExceptionDef> *,std::vector<ObjVar<CORBA::ExceptionDef>,std::allocator<ObjVar<CORBA::ExceptionDef> > > >, __false_type) could not be inlined into std::vector<ObjVar<CORBA::ExceptionDef>,std::allocator<ObjVar<CORBA::ExceptionDef> > >::operator=(*const* vector<ObjVar<CORBA::ExceptionDef>,std::allocator<ObjVar<CORBA::ExceptionDef> > > &).
1500-029: (W) WARNING: subprogram std::__destroy_aux<__gnu_cxx::__normal_iterator<ObjVar<CORBA::LocalInterfaceDef> *,std::vector<ObjVar<CORBA::LocalInterfaceDef>,std::allocator<ObjVar<CORBA::LocalInterfaceDef> > > > >(__normal_iterator<ObjVar<CORBA::LocalInterfaceDef> *,std::vector<ObjVar<CORBA::LocalInterfaceDef>,std::allocator<ObjVar<CORBA::LocalInterfaceDef> > > >, __normal_iterator<ObjVar<CORBA::LocalInterfaceDef> *,std::vector<ObjVar<CORBA::LocalInterfaceDef>,std::allocator<ObjVar<CORBA::LocalInterfaceDef> > > >, __false_type) could not be inlined into std::_Destroy<__gnu_cxx::__normal_iterator<ObjVar<CORBA::LocalInterfaceDef> *,std::vector<ObjVar<CORBA::LocalInterfaceDef>,std::allocator<ObjVar<CORBA::LocalInterfaceDef> > > > >(__normal_iterator<ObjVar<CORBA::LocalInterfaceDef> *,std::vector<ObjVar<CORBA::LocalInterfaceDef>,std::allocator<ObjVar<CORBA::LocalInterfaceDef> > > >, __normal_iterator<ObjVar<CORBA::LocalInterfaceDef> *,std::vector<ObjVar<CORBA::LocalInterfaceDef>,std::allocator<ObjVar<CORBA::LocalInterfaceDef> > > >).
1500-029: (W) WARNING: subprogram std::__destroy_aux<__gnu_cxx::__normal_iterator<CORBA::Container::Description *,std::vector<CORBA::Container::Description,std::allocator<CORBA::Container::Description> > > >(__normal_iterator<CORBA::Container::Description *,std::vector<CORBA::Container::Description,std::allocator<CORBA::Container::Description> > >, __normal_iterator<CORBA::Container::Description *,std::vector<CORBA::Container::Description,std::allocator<CORBA::Container::Description> > >, __false_type) could not be inlined into std::_Destroy<__gnu_cxx::__normal_iterator<CORBA::Container::Description *,std::vector<CORBA::Container::Description,std::allocator<CORBA::Container::Description> > > >(__normal_iterator<CORBA::Container::Description *,std::vector<CORBA::Container::Description,std::allocator<CORBA::Container::Description> > >, __normal_iterator<CORBA::Container::Description *,std::vector<CORBA::Container::Description,std::allocator<CORBA::Container::Description> > >).
1500-029: (W) WARNING: subprogram std::__destroy_aux<__gnu_cxx::__normal_iterator<ObjVar<CORBA::ValueDef> *,std::vector<ObjVar<CORBA::ValueDef>,std::allocator<ObjVar<CORBA::ValueDef> > > > >(__normal_iterator<ObjVar<CORBA::ValueDef> *,std::vector<ObjVar<CORBA::ValueDef>,std::allocator<ObjVar<CORBA::ValueDef> > > >, __normal_iterator<ObjVar<CORBA::ValueDef> *,std::vector<ObjVar<CORBA::ValueDef>,std::allocator<ObjVar<CORBA::ValueDef> > > >, __false_type) could not be inlined into std::_Destroy<__gnu_cxx::__normal_iterator<ObjVar<CORBA::ValueDef> *,std::vector<ObjVar<CORBA::ValueDef>,std::allocator<ObjVar<CORBA::ValueDef> > > > >(__normal_iterator<ObjVar<CORBA::ValueDef> *,std::vector<ObjVar<CORBA::ValueDef>,std::allocator<ObjVar<CORBA::ValueDef> > > >, __normal_iterator<ObjVar<CORBA::ValueDef> *,std::vector<ObjVar<CORBA::ValueDef>,std::allocator<ObjVar<CORBA::ValueDef> > > >).
1500-029: (W) WARNING: subprogram std::__destroy_aux<__gnu_cxx::__normal_iterator<CORBA::String_var *,std::vector<CORBA::String_var,std::allocator<CORBA::String_var> > > >(__normal_iterator<CORBA::String_var *,std::vector<CORBA::String_var,std::allocator<CORBA::String_var> > >, __normal_iterator<CORBA::String_var *,std::vector<CORBA::String_var,std::allocator<CORBA::String_var> > >, __false_type) could not be inlined into std::_Destroy<__gnu_cxx::__normal_iterator<CORBA::String_var *,std::vector<CORBA::String_var,std::allocator<CORBA::String_var> > > >(__normal_iterator<CORBA::String_var *,std::vector<CORBA::String_var,std::allocator<CORBA::String_var> > >, __normal_iterator<CORBA::String_var *,std::vector<CORBA::String_var,std::allocator<CORBA::String_var> > >).
1500-029: (W) WARNING: subprogram std::__destroy_aux<__gnu_cxx::__normal_iterator<ObjVar<CORBA::InterfaceDef> *,std::vector<ObjVar<CORBA::InterfaceDef>,std::allocator<ObjVar<CORBA::InterfaceDef> > > > >(__normal_iterator<ObjVar<CORBA::InterfaceDef> *,std::vector<ObjVar<CORBA::InterfaceDef>,std::allocator<ObjVar<CORBA::InterfaceDef> > > >, __normal_iterator<ObjVar<CORBA::InterfaceDef> *,std::vector<ObjVar<CORBA::InterfaceDef>,std::allocator<ObjVar<CORBA::InterfaceDef> > > >, __false_type) could not be inlined into std::_Destroy<__gnu_cxx::__normal_iterator<ObjVar<CORBA::InterfaceDef> *,std::vector<ObjVar<CORBA::InterfaceDef>,std::allocator<ObjVar<CORBA::InterfaceDef> > > > >(__normal_iterator<ObjVar<CORBA::InterfaceDef> *,std::vector<ObjVar<CORBA::InterfaceDef>,std::allocator<ObjVar<CORBA::InterfaceDef> > > >, __normal_iterator<ObjVar<CORBA::InterfaceDef> *,std::vector<ObjVar<CORBA::InterfaceDef>,std::allocator<ObjVar<CORBA::InterfaceDef> > > >).
1500-029: (W) WARNING: subprogram std::__destroy_aux<__gnu_cxx::__normal_iterator<ObjVar<CORBA::ExceptionDef> *,std::vector<ObjVar<CORBA::ExceptionDef>,std::allocator<ObjVar<CORBA::ExceptionDef> > > > >(__normal_iterator<ObjVar<CORBA::ExceptionDef> *,std::vector<ObjVar<CORBA::ExceptionDef>,std::allocator<ObjVar<CORBA::ExceptionDef> > > >, __normal_iterator<ObjVar<CORBA::ExceptionDef> *,std::vector<ObjVar<CORBA::ExceptionDef>,std::allocator<ObjVar<CORBA::ExceptionDef> > > >, __false_type) could not be inlined into std::_Destroy<__gnu_cxx::__normal_iterator<ObjVar<CORBA::ExceptionDef> *,std::vector<ObjVar<CORBA::ExceptionDef>,std::allocator<ObjVar<CORBA::ExceptionDef> > > > >(__normal_iterator<ObjVar<CORBA::ExceptionDef> *,std::vector<ObjVar<CORBA::ExceptionDef>,std::allocator<ObjVar<CORBA::ExceptionDef> > > >, __normal_iterator<ObjVar<CORBA::ExceptionDef> *,std::vector<ObjVar<CORBA::ExceptionDef>,std::allocator<ObjVar<CORBA::ExceptionDef> > > >).
1500-029: (W) WARNING: subprogram std::__destroy_aux<__gnu_cxx::__normal_iterator<CORBA::Initializer *,std::vector<CORBA::Initializer,std::allocator<CORBA::Initializer> > > >(__normal_iterator<CORBA::Initializer *,std::vector<CORBA::Initializer,std::allocator<CORBA::Initializer> > >, __normal_iterator<CORBA::Initializer *,std::vector<CORBA::Initializer,std::allocator<CORBA::Initializer> > >, __false_type) could not be inlined into std::_Destroy<__gnu_cxx::__normal_iterator<CORBA::Initializer *,std::vector<CORBA::Initializer,std::allocator<CORBA::Initializer> > > >(__normal_iterator<CORBA::Initializer *,std::vector<CORBA::Initializer,std::allocator<CORBA::Initializer> > >, __normal_iterator<CORBA::Initializer *,std::vector<CORBA::Initializer,std::allocator<CORBA::Initializer> > >).
1501-201: (W) Maximum number of common component diagnostics, 10 has been exceeded.
Fri Feb 27 00:56:05 CET 2009
the original question on the post..
I don't understand why my source C++ code don't compile quickly in O2 optimization.
in O2 : 8 hours.
in O0 : 10 seconds.
What are the intrinsic option of O2 more than O0 ?
It's a source code that provide from the free library mico.
it's about 5000 lines.
I check with some options to suppress the inlining...
Running on sles 10 sp1, power 5 system, xlc ver 9.0 ...
http://www.ibm.com/developerworks/forums/thread.jspa?threadID=252961
date ; xlC_r -I./include -I../idl -O2 -g -q64 -qminimaltoc -qpic -D_REENTRANT -D_GNU_SOURCE -c ir.cc -o ir.o -qmaxmem=-1 ; date
which results in...
Thu Feb 26 17:50:13 CET 2009
1500-029: (W) WARNING: subprogram std::__destroy_aux<__gnu_cxx::__normal_iterator<ObjVar<CORBA::AbstractInterfaceDef> *,std::vector<ObjVar<CORBA::AbstractInterfaceDef>,std::allocator<ObjVar<CORBA::AbstractInterfaceDef> > > > >(__normal_iterator<ObjVar<CORBA::AbstractInterfaceDef> *,std::vector<ObjVar<CORBA::AbstractInterfaceDef>,std::allocator<ObjVar<CORBA::AbstractInterfaceDef> > > >, __normal_iterator<ObjVar<CORBA::AbstractInterfaceDef> *,std::vector<ObjVar<CORBA::AbstractInterfaceDef>,std::allocator<ObjVar<CORBA::AbstractInterfaceDef> > > >, __false_type) could not be inlined into std::_Destroy<__gnu_cxx::__normal_iterator<ObjVar<CORBA::AbstractInterfaceDef> *,std::vector<ObjVar<CORBA::AbstractInterfaceDef>,std::allocator<ObjVar<CORBA::AbstractInterfaceDef> > > > >(__normal_iterator<ObjVar<CORBA::AbstractInterfaceDef> *,std::vector<ObjVar<CORBA::AbstractInterfaceDef>,std::allocator<ObjVar<CORBA::AbstractInterfaceDef> > > >, __normal_iterator<ObjVar<CORBA::AbstractInterfaceDef> *,std::vector<ObjVar<CORBA::AbstractInterfaceDef>,std::allocator<ObjVar<CORBA::AbstractInterfaceDef> > > >).
1500-029: (W) WARNING: subprogram std::__destroy_aux<__gnu_cxx::__normal_iterator<ObjVar<CORBA::ExceptionDef> *,std::vector<ObjVar<CORBA::ExceptionDef>,std::allocator<ObjVar<CORBA::ExceptionDef> > > > >(__normal_iterator<ObjVar<CORBA::ExceptionDef> *,std::vector<ObjVar<CORBA::ExceptionDef>,std::allocator<ObjVar<CORBA::ExceptionDef> > > >, __normal_iterator<ObjVar<CORBA::ExceptionDef> *,std::vector<ObjVar<CORBA::ExceptionDef>,std::allocator<ObjVar<CORBA::ExceptionDef> > > >, __false_type) could not be inlined into std::vector<ObjVar<CORBA::ExceptionDef>,std::allocator<ObjVar<CORBA::ExceptionDef> > >::operator=(*const* vector<ObjVar<CORBA::ExceptionDef>,std::allocator<ObjVar<CORBA::ExceptionDef> > > &).
1500-029: (W) WARNING: subprogram std::__destroy_aux<__gnu_cxx::__normal_iterator<ObjVar<CORBA::LocalInterfaceDef> *,std::vector<ObjVar<CORBA::LocalInterfaceDef>,std::allocator<ObjVar<CORBA::LocalInterfaceDef> > > > >(__normal_iterator<ObjVar<CORBA::LocalInterfaceDef> *,std::vector<ObjVar<CORBA::LocalInterfaceDef>,std::allocator<ObjVar<CORBA::LocalInterfaceDef> > > >, __normal_iterator<ObjVar<CORBA::LocalInterfaceDef> *,std::vector<ObjVar<CORBA::LocalInterfaceDef>,std::allocator<ObjVar<CORBA::LocalInterfaceDef> > > >, __false_type) could not be inlined into std::_Destroy<__gnu_cxx::__normal_iterator<ObjVar<CORBA::LocalInterfaceDef> *,std::vector<ObjVar<CORBA::LocalInterfaceDef>,std::allocator<ObjVar<CORBA::LocalInterfaceDef> > > > >(__normal_iterator<ObjVar<CORBA::LocalInterfaceDef> *,std::vector<ObjVar<CORBA::LocalInterfaceDef>,std::allocator<ObjVar<CORBA::LocalInterfaceDef> > > >, __normal_iterator<ObjVar<CORBA::LocalInterfaceDef> *,std::vector<ObjVar<CORBA::LocalInterfaceDef>,std::allocator<ObjVar<CORBA::LocalInterfaceDef> > > >).
1500-029: (W) WARNING: subprogram std::__destroy_aux<__gnu_cxx::__normal_iterator<CORBA::Container::Description *,std::vector<CORBA::Container::Description,std::allocator<CORBA::Container::Description> > > >(__normal_iterator<CORBA::Container::Description *,std::vector<CORBA::Container::Description,std::allocator<CORBA::Container::Description> > >, __normal_iterator<CORBA::Container::Description *,std::vector<CORBA::Container::Description,std::allocator<CORBA::Container::Description> > >, __false_type) could not be inlined into std::_Destroy<__gnu_cxx::__normal_iterator<CORBA::Container::Description *,std::vector<CORBA::Container::Description,std::allocator<CORBA::Container::Description> > > >(__normal_iterator<CORBA::Container::Description *,std::vector<CORBA::Container::Description,std::allocator<CORBA::Container::Description> > >, __normal_iterator<CORBA::Container::Description *,std::vector<CORBA::Container::Description,std::allocator<CORBA::Container::Description> > >).
1500-029: (W) WARNING: subprogram std::__destroy_aux<__gnu_cxx::__normal_iterator<ObjVar<CORBA::ValueDef> *,std::vector<ObjVar<CORBA::ValueDef>,std::allocator<ObjVar<CORBA::ValueDef> > > > >(__normal_iterator<ObjVar<CORBA::ValueDef> *,std::vector<ObjVar<CORBA::ValueDef>,std::allocator<ObjVar<CORBA::ValueDef> > > >, __normal_iterator<ObjVar<CORBA::ValueDef> *,std::vector<ObjVar<CORBA::ValueDef>,std::allocator<ObjVar<CORBA::ValueDef> > > >, __false_type) could not be inlined into std::_Destroy<__gnu_cxx::__normal_iterator<ObjVar<CORBA::ValueDef> *,std::vector<ObjVar<CORBA::ValueDef>,std::allocator<ObjVar<CORBA::ValueDef> > > > >(__normal_iterator<ObjVar<CORBA::ValueDef> *,std::vector<ObjVar<CORBA::ValueDef>,std::allocator<ObjVar<CORBA::ValueDef> > > >, __normal_iterator<ObjVar<CORBA::ValueDef> *,std::vector<ObjVar<CORBA::ValueDef>,std::allocator<ObjVar<CORBA::ValueDef> > > >).
1500-029: (W) WARNING: subprogram std::__destroy_aux<__gnu_cxx::__normal_iterator<CORBA::String_var *,std::vector<CORBA::String_var,std::allocator<CORBA::String_var> > > >(__normal_iterator<CORBA::String_var *,std::vector<CORBA::String_var,std::allocator<CORBA::String_var> > >, __normal_iterator<CORBA::String_var *,std::vector<CORBA::String_var,std::allocator<CORBA::String_var> > >, __false_type) could not be inlined into std::_Destroy<__gnu_cxx::__normal_iterator<CORBA::String_var *,std::vector<CORBA::String_var,std::allocator<CORBA::String_var> > > >(__normal_iterator<CORBA::String_var *,std::vector<CORBA::String_var,std::allocator<CORBA::String_var> > >, __normal_iterator<CORBA::String_var *,std::vector<CORBA::String_var,std::allocator<CORBA::String_var> > >).
1500-029: (W) WARNING: subprogram std::__destroy_aux<__gnu_cxx::__normal_iterator<ObjVar<CORBA::InterfaceDef> *,std::vector<ObjVar<CORBA::InterfaceDef>,std::allocator<ObjVar<CORBA::InterfaceDef> > > > >(__normal_iterator<ObjVar<CORBA::InterfaceDef> *,std::vector<ObjVar<CORBA::InterfaceDef>,std::allocator<ObjVar<CORBA::InterfaceDef> > > >, __normal_iterator<ObjVar<CORBA::InterfaceDef> *,std::vector<ObjVar<CORBA::InterfaceDef>,std::allocator<ObjVar<CORBA::InterfaceDef> > > >, __false_type) could not be inlined into std::_Destroy<__gnu_cxx::__normal_iterator<ObjVar<CORBA::InterfaceDef> *,std::vector<ObjVar<CORBA::InterfaceDef>,std::allocator<ObjVar<CORBA::InterfaceDef> > > > >(__normal_iterator<ObjVar<CORBA::InterfaceDef> *,std::vector<ObjVar<CORBA::InterfaceDef>,std::allocator<ObjVar<CORBA::InterfaceDef> > > >, __normal_iterator<ObjVar<CORBA::InterfaceDef> *,std::vector<ObjVar<CORBA::InterfaceDef>,std::allocator<ObjVar<CORBA::InterfaceDef> > > >).
1500-029: (W) WARNING: subprogram std::__destroy_aux<__gnu_cxx::__normal_iterator<ObjVar<CORBA::ExceptionDef> *,std::vector<ObjVar<CORBA::ExceptionDef>,std::allocator<ObjVar<CORBA::ExceptionDef> > > > >(__normal_iterator<ObjVar<CORBA::ExceptionDef> *,std::vector<ObjVar<CORBA::ExceptionDef>,std::allocator<ObjVar<CORBA::ExceptionDef> > > >, __normal_iterator<ObjVar<CORBA::ExceptionDef> *,std::vector<ObjVar<CORBA::ExceptionDef>,std::allocator<ObjVar<CORBA::ExceptionDef> > > >, __false_type) could not be inlined into std::_Destroy<__gnu_cxx::__normal_iterator<ObjVar<CORBA::ExceptionDef> *,std::vector<ObjVar<CORBA::ExceptionDef>,std::allocator<ObjVar<CORBA::ExceptionDef> > > > >(__normal_iterator<ObjVar<CORBA::ExceptionDef> *,std::vector<ObjVar<CORBA::ExceptionDef>,std::allocator<ObjVar<CORBA::ExceptionDef> > > >, __normal_iterator<ObjVar<CORBA::ExceptionDef> *,std::vector<ObjVar<CORBA::ExceptionDef>,std::allocator<ObjVar<CORBA::ExceptionDef> > > >).
1500-029: (W) WARNING: subprogram std::__destroy_aux<__gnu_cxx::__normal_iterator<CORBA::Initializer *,std::vector<CORBA::Initializer,std::allocator<CORBA::Initializer> > > >(__normal_iterator<CORBA::Initializer *,std::vector<CORBA::Initializer,std::allocator<CORBA::Initializer> > >, __normal_iterator<CORBA::Initializer *,std::vector<CORBA::Initializer,std::allocator<CORBA::Initializer> > >, __false_type) could not be inlined into std::_Destroy<__gnu_cxx::__normal_iterator<CORBA::Initializer *,std::vector<CORBA::Initializer,std::allocator<CORBA::Initializer> > > >(__normal_iterator<CORBA::Initializer *,std::vector<CORBA::Initializer,std::allocator<CORBA::Initializer> > >, __normal_iterator<CORBA::Initializer *,std::vector<CORBA::Initializer,std::allocator<CORBA::Initializer> > >).
1501-201: (W) Maximum number of common component diagnostics, 10 has been exceeded.
Fri Feb 27 00:56:05 CET 2009
the original question on the post..
I don't understand why my source C++ code don't compile quickly in O2 optimization.
in O2 : 8 hours.
in O0 : 10 seconds.
What are the intrinsic option of O2 more than O0 ?
It's a source code that provide from the free library mico.
it's about 5000 lines.
I check with some options to suppress the inlining...
