Leopold Toetsch wrote:
4.2) Basic blocks, life span of symbols inside these blocks and loop detection.
Baisc block generation depends on two items: * labels - a possible branch target * branching opcodes
Detection of branching opcodes depends currently in a not too obvious way[1] on directives in ops/*.ops like:
goto NEXT() # no branch, just execute next instruction
goto ADDRESS(next) # a branch
Now all find_global and find_lex opcodes *did* use goto ADDRESS(next). This might be some relict of experiments with exceptions. These opcodes might branch elsewhere, if an exception had occured. But its not a branch.
I've change these opcodes to use goto NEXT() and excluded PARROT_JUMP_ENEXT from considering this opcode as a branch.
This fix should vastly improve PIR programs that make heavy use of find_lex or find_global opcodes (hello Dan).
Hello indeed! Yeah, I make a near-insane use of find_global, as a way to avoid huge numbers of .local declarations. This patch took care of the double-spill error and a few of the out of memory errors for too-complex source. I think I'm down to five forms that don't compile because they're too nasty for parrot, which is better than it's been. (I've been tweaking the compiler some as I go along as well to try and simplify things, so there have been wins there too)
--
Dan
--------------------------------------it's like this------------------- Dan Sugalski even samurai [EMAIL PROTECTED] have teddy bears and even teddy bears get drunk