------- Comment #4 from xinliangli at gmail dot com 2008-03-12 06:40 ------- (In reply to comment #3) > (In reply to comment #2) > > This model won't work well when -O4 (ipo) is in place. If instrumentation > > and > > annotation happens at the same phase in the compiler pipeline, I don't see a > > reason why such restriction is needed. > > Why do you think it will not work well with LTO?
At least it is tricky with cross module inlining happening for instrumented functions -- the inline instances should really updating counters in the original routines. Besides, this requirement will significantly slow down an instrumented compile for IPO. > > The instrumentation and annotation already happens at the same place which is > why the same options are required. Sounds like 'same options' is sufficient for that to happen, but not necessary. > They just happen after some inlining and > other early optimization to make sure the profiling does not get too slow. If the early optimizations always happen at -O1 and above, a more reasonable requirement is that instrumentation compile must be done at -O1 and above. Again, how much performance gain can be achieved with early optimization for instrumented binary (which is slow anyway)? David > > -- Pinski > -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35544