Hi All, Our project is to optimize instruction scheduling in gcc by detecting structural hazards. We looked at the current dfa implementation(gen-automata.c and insn-automata.c). We are trying to come up with a test case for the same, a scenario wherein one of the instructions is stalled due to the resource being used by some other instruction. However, we are unable to do so.
1. We wrote a C program - doing - floating point multiplications, divisions and additions. However in both the files - 'progname.s' file and 'progname.c.190r.sched2' file, the instructions were scheduled for execution in sequential order. We couldn't find a way to detect a stall, by looking at the assembly code generated. Question: How do we detect that a stall has occurred if execution is being carried out in a particular sequence? Also we would like to know of a tool, which given a 'progname.s' file, gives details of the execution time of each instruction and the clock cycle in which stall will occur, if execution is carried out in this sequence. 2. We saw that integer operations were already being performed during compilation. Hence we were left with only floating point operations to be looked into for structural hazards. Question: Once a stall is detected in case of floating point unit being used currently by some other instruction, which instruction can be scheduled in so as to avoid this stall(since integer operations are performed at compile time and floating point units are being used)? Target machine architecture: 686 Working on: Intel Pentium Dual Core processor Thanking you, Dhiraj -- View this message in context: http://www.nabble.com/help-on---writing-a-testcase-to-detect-structural-hazard-in-gcc-tp26098843p26098843.html Sent from the gcc - Dev mailing list archive at Nabble.com.