This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: How to make use of instruction scheduling to improve performance?


"吴曦" <wu.andrew.xi@gmail.com> writes:

> I am working on gcc 4.1.1 and itanium2 architecture. I instrumented
> each ld and st instruction in final_scan_insn() by looking at the insn
> template (These instrumentations are used to do some security checks).
> These instrumentations incur high performance overhead when running
> specint benchmarks. However, these instrumentations contain high
> dependencies between instructions so that I want to use instruction
> scheduling to improve the performance.
>     In the current implementation, the instrumentations are emitted as
> assembly instructions (not insns). What should I do to make use of the
> instruction scheduler?

If I understand your description, you are adding instrumentation code,
and you want to expose that code to the scheduler.  What you need to
do in that case is to add the code as RTL instructions before the
scheduling pass runs.  You will need to figure out the RTL which will
do what you want.  Then you will need to insert it around the
instructions which you want to instrument.  You will probably want to
do this right before the second scheduling pass.  You will probably
need to write a new RTL pass which walks the insns and adds the
instrumentation.

Ian


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]