Hello,

> Of course, instead of clock(), I'd like to use a non-intrusive
> mechanism. However, my research on this topic didn't lead to anything
> but perfsuite, which doesn't work very well for me (should it?).
> 
> So here are the questions
> 
> - how can I actually insert the code (I need to do this during the
> loop-unrolling phase, when the code is already in RTL form)?

that is a bit difficult; you will run into all sorts of problems,
especially if you will want to emit new calls.  It would be simpler
to emit the measurement code on gimple (see e.g. value-prof.c where
something similar is done), although it would then also be nontrivial
to match the loops to those found also on RTL.  In some older versions
of gcc (I think 4.0) we used to have value profiling on RTL, you may
check that to see how we used to do that.

Zdenek

Reply via email to