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]

New gcc hacker: problems with NOTE_LOOP RTL notes


Hello and many thanks to all of you,

I am a grad student working with modifying GCC to generate instrumented
code. Right now I'm trying to generate traces into the assembler for
when loops are entered, iterated, and ended. This seemed an easy hack to
place my code within the case statement found in final.c:
final_scan_insn and when I run with any optimization, this hack works
just fine. However, unoptimized code leaves the trace notes in very
wrong places, most notably the loop end notes are placed in between a
jmp and a label. ex.

        jmp     .L4
        # loop end
	# instrumentation code
        .p2align 4,,7
.L5:

Am I approaching this correctly by waiting until the final pass to
insert these trace instructions? Should I be trying to place these
instructions higher up in the RTL or should this work? Thank you for any
help you can provide.

Brett Boren
Graduate Research Assistant
University of Alabama in Huntsville
borenb@uah.edu 



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