Liu Haibin <[EMAIL PROTECTED]> writes:
> Can someone help me explain that why there's an REG_DEP_OUTPUT (write
> after write dependence) between jump_insn 547 and insn 82?
>
> (insn 82 543 478 3 (set (mem/s:SI (reg/f:SI 6 r6 [224]) [4 W S4 A32])
> (reg:SI 2 r2 [95])) 8 {movsi_internal} (insn_list 81 (nil))
> (expr_list:REG_DEAD (reg:SI 2 r2 [95])
> (nil)))
> (insn 478 82 547 3 (set (reg/f:SI 6 r6 [224])
> (plus:SI (reg/f:SI 6 r6 [224])
> (const_int 4 [0x4]))) 20 {addsi3} (insn_list:REG_DEP_ANTI
> 65 (insn_list:REG_DEP_ANTI 66 (insn_list:REG_DEP_ANTI 73
> (insn_list:REG_DEP_ANTI 80 (insn_list:REG_DEP_ANTI 82 (nil))))))
> (nil))
> (jump_insn 547 478 93 3 (set (pc)
> (if_then_else (ne:SI (reg/v:SI 7 r7 [orig:270 i ] [270])
> (const_int 0 [0x0]))
> (label_ref 88)
> (pc))) 61 {*cbranch} (insn_list 543
> (insn_list:REG_DEP_OUTPUT 82 (nil)))
> (expr_list:REG_BR_PROB (const_int 9844 [0x2674])
> (nil)))
The scheduler must not move the memory write after the conditional
jump. The dependency code models this by adding a REG_DEP_OUTPUT
dependency from any conditional jump to any memory write for which
there is no other dependency. See the JUMP_P code in
sched_analyze_insn.
Ian