[comp.compilers] Graph coloring, patents

preston@rice.edu (Preston Briggs) (11/15/89)

In article <1989Nov13.203034.1778@esegue.segue.boston.ma.us> I wrote:

>Do any of the IBM PC-class C compilers do global optimizations?
>Global constant propagation?  Graph coloring register allocation?

>[The Metaware compilers are reputed to do graph coloring, though it's a
>trick to make it work on something as asymmetrical as a 286.  Also, I wonder
>if one can do useful graph coloring without infringing IBM's patents. -John]

For graph coloring, you could get a license from IBM, though I'm not sure
about the fees (I recall they are based on a percentage of something, but
that's a rumor).  An alternative approach would be to use Chow's priority-
based scheme (unless it's been patented also); it's drastically different than
Chaitin's version.

I don't know which is more effective.  I suspect (with no evidence) that
Chow's method will be better on constrained machines (not many registers) and
Chaitin's better otherwise.  Neither seems worthwhile without some global
optimization to provide grist for the mill.

Preston Briggs
preston@titan.rice.edu

-- 
Send compilers articles to compilers@esegue.segue.boston.ma.us
{spdcc | ima | lotus}!esegue.  Meta-mail to compilers-request@esegue.
Please send responses to the author of the message, not the poster.

rfg@ics.UCI.EDU (Ron Guilmette) (11/16/89)

In article <1989Nov15.010209.11362@esegue.segue.boston.ma.us> Preston Briggs <preston@rice.edu> writes:
>I don't know which is more effective.  I suspect (with no evidence) that
>Chow's method will be better on constrained machines (not many registers) and
>Chaitin's better otherwise.  Neither seems worthwhile without some global
>optimization to provide grist for the mill.

Chow's method is always at least as good as Chaitin's graph coloring
(and sometimes better).  It is likely that it will only be significantly
better on machines *without* lots of registers.  That's because both of
these methods try to avoid spills.  If you have a zillion registers,
you never spill with either method, so they're equal in that case.

// rfg
-- 
Send compilers articles to compilers@esegue.segue.boston.ma.us
{spdcc | ima | lotus}!esegue.  Meta-mail to compilers-request@esegue.
Please send responses to the author of the message, not the poster.

pepers@cpsc.ucalgary.ca (Bradley Pepers) (11/28/89)

Could some people give me references for information on graph coloring (Chow's
method and anything else).

    Thanks....  Brad Pepers
[If someone has a bibliography on this, send it to compilers, too.  -John]
-- 
Send compilers articles to compilers@esegue.segue.boston.ma.us
{spdcc | ima | lotus}!esegue.  Meta-mail to compilers-request@esegue.
Please send responses to the author of the message, not the poster.