This concludes for now this experiment. It works, but to do it right, it should go in the direction Angel Faus has mentioned. Also calling conventions have to be done before, to get the data flow right.
With the -Oj option a mininal CFG section is created in the packfile, which is used by parrots JIT code, to get sections and register mappings. This is significantly faster then current's jit optimizer, which has a relatively high impact on program load times.
The JIT loader looks at the packfile now, and uses either method to generate information needed for actually producing bytecode.


Further included:
- some CFG hacks to figure out info about subroutines
- implemented the in the comment mentioned optimization in the
  register interference code
- implement read/write semantics of pusx/popx/clearx/saveall/restoreall
- some bugfixes WRT memory handling of SymRegs/life_info
- improved default_dump for pdump
- removed unused warnings in jit.c, all -O3 unitialized warnings in imcc

leo

PS
$ imcc -O1j  primes.pasm
Elapsed time: 3.485836

$ ./primes      # -O3 gcc 2.95.2
Elapsed time: 3.643756

$ imcc -O1 -j  primes.pasm
Elapsed time: 3.884460

$ make test IMCC="languages/imcc/imcc -O1j"
succeeds, except for t/op/interp_2, where the trace output is different due to inserted register load/store ops. For the nci stuff -Oj gets disabled internally.




Reply via email to