harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mikhail Fursov" <mike.fur...@gmail.com>
Subject Re: [drlvm][jit] Internal testing framework for Jitrino.OPT compiler
Date Fri, 27 Oct 2006 12:02:11 GMT
On 27 Oct 2006 18:43:46 +0700, Egor Pasko <egor.pasko@gmail.com> wrote:
>
> void ControlFlowGraph::removeNode(Nodes::iterator pos, bool erase) {
>      Node* node = *pos;
>
> -    assert(node!=entryNode);
> +       if (node == entryNode) {
> +               entryNode=NULL;
> +       }
>      if (node == returnNode) {
>          returnNode = NULL;
>      } else if(node == unwindNode) {
>          unwindNode = NULL;
>      } else  if (node == exitNode) {
> -        assert(0);
>          exitNode = NULL;
>      }
>

I think this is OK. A control flow graph instance is created without any
nodes, so why not to allow to clean it up? This fuctionality is used in
jitrino testing framework: it cleans CFG before a test, setup UR template,
runs the test, and restores original CFG.

-- 
Mikhail Fursov

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message