github.com/razvanm/vanadium-go-1.3@v0.0.0-20160721203343-4a65068e5915/src/cmd/gc/popt.h (about)

     1  // Copyright 2013 The Go Authors.  All rights reserved.
     2  // Use of this source code is governed by a BSD-style
     3  // license that can be found in the LICENSE file.
     4  
     5  typedef struct Flow Flow;
     6  typedef struct Graph Graph;
     7  
     8  struct Flow {
     9  	Prog*	prog;   	// actual instruction
    10  	Flow*	p1;     	// predecessors of this instruction: p1,
    11  	Flow*	p2;     	// and then p2 linked though p2link.
    12  	Flow*	p2link;
    13  	Flow*	s1;     	// successors of this instruction (at most two: s1 and s2).
    14  	Flow*	s2;
    15  	Flow*	link;   	// next instruction in function code
    16  	
    17  	int32	active;	// usable by client
    18  
    19  	int32	rpo;		// reverse post ordering
    20  	uint16	loop;		// x5 for every loop
    21  	uchar	refset;		// diagnostic generated
    22  };
    23  
    24  struct Graph
    25  {
    26  	Flow*	start;
    27  	int	num;
    28  	
    29  	// After calling flowrpo, rpo lists the flow nodes in reverse postorder,
    30  	// and each non-dead Flow node f has g->rpo[f->rpo] == f.
    31  	Flow**	rpo;
    32  };
    33  
    34  void	fixjmp(Prog*);
    35  Graph*	flowstart(Prog*, int);
    36  void	flowrpo(Graph*);
    37  void	flowend(Graph*);
    38  void	mergetemp(Prog*);
    39  void	nilopt(Prog*);
    40  int	noreturn(Prog*);
    41  int	regtyp(Addr*);
    42  int	sameaddr(Addr*, Addr*);
    43  int	smallindir(Addr*, Addr*);
    44  int	stackaddr(Addr*);
    45  Flow*	uniqp(Flow*);
    46  Flow*	uniqs(Flow*);