Hi!
Before my patch the scheduler needed only the number of remaining
dependencies, hence it didn't actually removed anything from the
LOG_LINKS. My patch, on the contrary, has to analyze remaining
dependences and keep the list of them updated - that is what this
function do - finding the link between two instructions and moving it
>from the one list to another. Arguments (NEXT and INSN) come from the
level up, which is walking through the INSN_DEPEND list of the INSN.
This list basically has the same length as LOG_LINKS (here is quadratic
behavior) and contains instructions, which depend upon this one.
I think the best way to solve this problem is to store in the nodes of
INSN_DEPEND list pointers to the corresponding nodes of the LOG_LINKS so
that we won't have to walk through the entire LOG_LINKS searching for
the right node. This change will be small and affect only two places in
scheduler:
1. creation of the INSN_DEPEND lists.
2. the above function.
If this fix looks OK to you, please let me know and I'll write (and
post) the patch.
Yes, it seems fine to me, but how are you going to remove the item from
LOG_LINKS effectivly then? (it is single linked list).
I guess it is possible to deffer the actual removal for time you are
processing dependencies of the next instruction or something...