basicblocks: also consider back references
authorBernhard Urban <lewurm@gmail.com>
Tue, 17 Apr 2012 21:57:31 +0000 (23:57 +0200)
committerBernhard Urban <lewurm@gmail.com>
Tue, 17 Apr 2012 21:57:31 +0000 (23:57 +0200)
commitfdc2d9026667ed62abc086eac2049b79e19c9967
tree72faf42a3e2aa13e157f937b7af696642b0f43fd
parent8fef0c0cd0b24e62261cdc3a63106853373b6faf
basicblocks: also consider back references

as we just iterate the instruction stream when generating basicblocks, we need
extra handling for back references.
the solution adds a further pass, which marks targets of jumps (actually it
marks the instruction right *before* the target)

kudos @ tests/Fac.java for being a useful testcase :-)
Mate/BasicBlocks.hs
Mate/MethodPool.hs
Mate/X86CodeGen.hs