Interesting. I did a little more research, and checked out a fresh
CVS tree. I did nothing more than insert a conflict checker into
reg_alloc.c That is, whatever pre-colored registers have been
assigned to symbols, I verify that none of them are conflicting.
Guess what I got?
make[1]: Leaving directory `/usr/home/coffman/dev/parrot/parrot/docs'
./parrot -o runtime/parrot/library/Data/Dumper/Base.pbc
runtime/parrot/library/Data/Dumper/Base.imc
********** <<< added new here
node 1 = defname(S) is colored 5 and neighbor 9 = S5(S) is colored 5
parrot: imcc/reg_alloc.c:200: imc_reg_alloc: Assertion `r->color==-1
|| r->color != unit->reglist[y]->color' failed.
make: *** [runtime/parrot/library/Data/Dumper/Base.pbc] Aborted
The routine you mentioned, allocate_wanted_regs() doesn't assign
wanted regs if in conflict, but as far as I can tell, there's no check
on the integrity of precolored nodes. Not quite sure what the correct
behaviour is for allocator, when it's given conflicts.
I saw 'K' compounded key somewhere, but don't know what it is. I know
reg_alloc.c pretty well though. Offhand I'd say it's not handled in
reg_alloc. Maybe it should be?
~Bill
On Fri, 12 Nov 2004 10:26:51 +0100, Leopold Toetsch <[EMAIL PROTECTED]> wrote:
> Bill Coffman wrote:
> > Hello,
> > * I have the below failed tests. I haven't looked into these. Can
> > someone tell me if the tests are broken, or is my allocator broken. I
> > know they don't fail for the current cvs code (as of yesterday).
> >
> > Failed Test Stat Wstat Total Fail Failed List of Failed
> > -------------------------------------------------------------------------------
> > t/library/dumper.t 13 3328 13 13 100.00% 1-13
> > t/op/gc.t 1 256 18 1 5.56% 13
> > t/pmc/sub.t 1 256 78 1 1.28% 78
>
> These errors look remarkable the same, when I turn on OPT_SUB that is,
> when allocate_wanted_regs() is used. And this code did miss registers
> sets like 'K' (compound keys).
>
> Changing imcc/reg_alloc.c:890 to:
>
> if (r->color >= 0 || r->want_regno == -1 || strchr("ISPN", r->set
> == 0))
>
> did fix this flaw.
>
> leo
>
>