Because deps_analyze_insn only analyzes data deps but no control deps. Control deps are included by add_branch_dependences. Without the chain_to_prev_insn in the end of add_branch_dependences, jmp will be control dependent on every previous insn in the same bb, and the cmp and jmp group could still be scheduled apart since they will not be put in ready list at the same time.
On Tue, Sep 10, 2013 at 4:44 AM, Alexander Monakov <amona...@ispras.ru> wrote: > > > On Fri, 6 Sep 2013, Wei Mi wrote: > >> SCHED_GROUP works after I add chain_to_prev_insn after >> add_branch_dependences, in order to chain control dependences to prev >> insn for sched group. > > chain_to_prev_insn is done in the end of deps_analyze_insn, why is that not > sufficient? > > Alexander