Matt Fowles <[EMAIL PROTECTED]> wrote:
> Leopold Toetsch wrote:

> Shortly after trying to go to bed last night [this morning], I realized
> a case (or class of cases) in which this would be broken.  I will try to
> hack at dealing with that later; however, I am still relatively new to
> this.  Is there a way to determine what things will get branched to and
> from what possible places?

First I'd like to say again, that I really like the patch and the
effort - and I know its hard to get into this kind of imcc internals.

The whole branch information starts in cfg.c:find_basic_blocks() and
build_cfg() where "struct Edge" is added, which connects all branch
targets with all branch sources. This is all complicated and currently
somehow broken due to register branches (jsr, invoke ...) where the
branch destination is not a label.

Examples of the usage of this info is e.g. in
optimizer.c:unused_label().

The next thing is just to get used to the debug output:

$ imcc -d 70 the.imc

writes CFG and optmizer info to stderr.

$ imcc -d 70 the.imc >the.log 2>&1

or such gets this into a file for bigger then non trivial programs.

[ Some technical side notes: please diff against the root of parrot (or
  one directory below, so that all patches can go in with either -p0 or
  -p1. And try to use an editor that somwhow conforms to the documented
  coding standards.

  And please write tests, many + 1 tests
  Thanks
]

> Thanks,
> Matt

leo

Reply via email to