This is the mail archive of the gcc@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: Bug in ra-colorize.c:merge_moves?



Um, look again. You've *decreased* the possibility of graph colorization in this example. The colorability of a graph is *not* related to the number of webs, it's related to the number of conflicts. web1 is now live *longer*, and thus, conflicts with more webs than it did before.

Please point in which place.

Sure.




It now conflicts with everything in the ...'s, *decreasing* colorability.

May be you misunderstand me ? web1-real-stack-slot is a memory slot. Please point in which place I have *decreased* the possibility of graph colorization.

Yes, but unless you've made symbol_refs of some new symbol to represent the stack space you are using, they are still based off a register (in this case, the stack register).
This register now conflicts with the webin *all* of the ...'s
Before, each new web would conflict with a single ...



To put it in symbolic terms, let's number the ...'s.


i2  use web1-real-stack-slot
...[1]
i3  use web1-real-stack-slot
...[2]
i4  use web1-real-stack-slot
...[3]
 you now have:

web1-real-stack-slot's base register conflicts with all webs in 1, 2, and 3.
Let's say each ... has 3 unique webs in it.
Your way now has 6-9 webs (depending on when the base register dies).


Before, we had:
We generate spill insns:

i21 def web11 web1-pseudo-spill-slot
i2  use web11
...
i31 def web12 web1-pseudo-spill-slot
i3  use web12
...
i41 def web13 web1-pseudo-spill-slot
i4  use web13

Here, given the same parameters, we have: 0-3 webs conflicting with web11 0-3 webs conflicting with web12 0-3 webs conflicting with web13

The colorability of each of these is quite different.

In the first case, you can't color any of the webs with web1-real-stack-slot's base register. That means 6 -9 webs can't use that color
In the second case, web11, web12, and web13 can each be assigned a different color, and 0-3 webs conflicting with it can't use that color.


IE in the first case, if our stack register is hard reg 3, 6-9 webs can't use hard reg 3.
In the second case, if we choose different colors for each pseudo-spill slot, say hard regs 4, 5, and 6, 0-3 webs can't use reg 4, 0-3 webs can't use reg 5, and 0-3 webs can't use reg 6.


This is usually much more colorable, and in the worst case, as colorable.
In the case the registers all only had 3 open, 6-9 webs now can't be colored.
before, if all the registers only had 3 open, only 0-3 webs can't be colored.


--Dan


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