This is the mail archive of the gcc-patches@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]

Re: Patch: Support IA-64 speculation [4/5]


> Jan Hubicka wrote:
> >>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...
> 
> I will use the standard trick: swap the data between the current node 
> and the next one and remove the next.  To handle the last node we also 
> need to track the end of the LOG_LINKS for each insn - that's not too 
> difficult.

Won't it invalidate the log links pointers in INSN_DEPEND lists?

Honza
> 
> 
> Thanks,
> Maxim


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