aa
com.cliffc.aa.node.FunNode Class Reference
Inheritance diagram for com.cliffc.aa.node.FunNode:
[legend]
Collaboration diagram for com.cliffc.aa.node.FunNode:
[legend]

Public Member Functions

 FunNode (NewNode.NewPrimNode prim)
 
 FunNode (PrimNode prim)
 
 FunNode (String[] flds, Type[] ts)
 
Node add_def (Node n)
 
void add_flow_def_extra (Node chg)
 
void add_flow_extra (Type old)
 
void add_flow_use_extra (Node chg)
 
void add_reduce_extra ()
 
TypeMem all_live ()
 
void bind (String tok)
 
Node copy (boolean copy_edges)
 
void del (int idx)
 
Node do_flow ()
 
Node do_grow ()
 
Node do_mono ()
 
Node do_reduce ()
 
String dump (int max)
 
String dump (int max, boolean prims, boolean plive)
 
String dumprpo (boolean prims, boolean plive)
 
boolean equals (Object o)
 
ErrMsg err (boolean fast)
 
Node find (int uid)
 
FunPtrNode fptr ()
 
Node get_mem_writer ()
 
int hashCode ()
 
Node ideal_grow ()
 
Node ideal_inline (boolean check_progress)
 
Node ideal_mono ()
 
Node ideal_reduce ()
 
Node in (int i)
 
Node init1 ()
 
Node insert (int idx, Node n)
 
void insert (Node nnn)
 
Node is_copy (int idx)
 
boolean is_dead ()
 
boolean is_forward_ref ()
 
boolean is_mem ()
 
boolean is_multi_head ()
 
boolean is_prim ()
 
Node kill ()
 
int len ()
 
TypeMem live (GVNGCM.Mode opt_mode)
 
TypeMem live_use (GVNGCM.Mode opt_mode, Node def)
 
boolean live_uses ()
 
final int more_flow (boolean lifting)
 
final boolean more_ideal (VBitSet bs)
 
String name (boolean debug)
 
int nargs ()
 
TV2 new_tvar (String alloc_site)
 
boolean noinline ()
 
byte op_prec ()
 
ParmNode parm (int idx)
 
Node[] parms ()
 
Node pop ()
 
Node remove (int idx)
 
void replace (Node old, Node nnn)
 
RetNode ret ()
 
void set_dead ()
 
Node set_def (int idx, Node n)
 
void set_nongens (TV2[] nongens)
 
Type sharptr (Node mem)
 
boolean should_con (Type t)
 
String str ()
 
Node subsume (Node nnn)
 
String toString ()
 
TV2 tvar ()
 
TV2 tvar (int x)
 
void unelock ()
 
boolean unify (boolean test)
 
Type val (int idx)
 
Type value (GVNGCM.Mode opt_mode)
 
final void walk_initype (GVNGCM gvn, VBitSet bs)
 
void walk_opt (VBitSet visit)
 
void walkerr_def (HashSet< ErrMsg > errs, VBitSet bs)
 
Node xliv (GVNGCM.Mode opt_mode)
 
String xstr ()
 
Type xval ()
 

Static Public Member Functions

static Node con (Type t)
 
static FunNode find_fidx (int fidx)
 
static void init0 ()
 
static SB names (BitsFun fidxs, SB sb, boolean debug)
 
static void reset ()
 
static void reset_to_init0 ()
 
static void roll_back_CNT ()
 

Public Attributes

String _bal_close
 
Ary< Node_defs
 
boolean _elock
 
int _fidx
 
byte _keep
 
TypeMem _live
 
String _name
 
final byte _op_prec
 
TypeFunSig _sig
 
final boolean _thunk_rhs
 
int _uid
 
Ary< Node_uses
 
Type _val
 

Static Public Attributes

static int _INIT0_CNT
 
static int _must_inline
 
static final ConcurrentHashMap< Node, NodeVALS = new ConcurrentHashMap<>()
 

Package Functions

 FunNode (String name)
 
 FunNode (String name, TypeFunSig sig, int op_prec, boolean thunk_rhs)
 
Node _elock ()
 
boolean check_solo_mem_writer (Node memw)
 
BitsAlias escapees ()
 
int fidx ()
 
Type formal (int idx)
 
boolean has_unknown_callers ()
 
boolean is_CFG ()
 
Node is_pure_call ()
 
public< N extends Node > N keep ()
 
public< N extends Node > N keep (int d)
 
String name ()
 
int newuid ()
 
void set_is_copy ()
 
Node stacked_region ()
 
public< N extends Node > N unhook ()
 
public< N extends Node > N unkeep ()
 
public< N extends Node > N unkeep (int d)
 
void unwire (int idx)
 
Node walk_dom_last (Predicate< Node > P)
 

Static Package Functions

 [static initializer]
 
static String name (String name, String bal, int fidx, int op_prec, boolean fref, boolean debug)
 

Package Attributes

final byte _op
 
TV2 _tvar
 

Static Package Attributes

static Ary< FunNodeFUNS = new Ary<>(new FunNode[]{null,})
 
static final byte OP_CALL = 1
 
static final byte OP_CALLEPI = 2
 
static final byte OP_CAST = 3
 
static final byte OP_CON = 4
 
static final byte OP_CONTYPE = 5
 
static final byte OP_CPROJ = 6
 
static final byte OP_DEFMEM = 7
 
static final byte OP_ERR = 8
 
static final byte OP_FP2DISP =10
 
static final byte OP_FRESH = 9
 
static final byte OP_FUN =11
 
static final byte OP_FUNPTR =12
 
static final byte OP_IF =13
 
static final byte OP_JOIN =14
 
static final byte OP_LOAD =15
 
static final byte OP_LOOP =16
 
static final byte OP_MAX =36
 
static final byte OP_NAME =17
 
static final byte OP_NEWARY =19
 
static final byte OP_NEWOBJ =18
 
static final byte OP_NEWSTR =20
 
static final byte OP_PARM =21
 
static final byte OP_PHI =22
 
static final byte OP_PRIM =23
 
static final byte OP_PROJ =24
 
static final byte OP_REGION =25
 
static final byte OP_RET =26
 
static final byte OP_SCOPE =27
 
static final byte OP_SPLIT =28
 
static final byte OP_START =29
 
static final byte OP_STMEM =30
 
static final byte OP_STORE =31
 
static final byte OP_THRET =32
 
static final byte OP_THUNK =33
 
static final byte OP_TYPE =34
 
static final byte OP_UNR =35
 

Private Member Functions

 FunNode (String name, TypeFunSig sig, int op_prec, boolean thunk_rhs, int fidx)
 
Node _do_reduce ()
 
void adderr (HashSet< ErrMsg > errs)
 
boolean check_callers ()
 
boolean check_vals ()
 
SB dump (int d, SB sb, boolean plive)
 
SB dump (int d, SB sb, int max, VBitSet bs, boolean prims, boolean plive)
 
void dump (int d, SB sb, VBitSet bs, boolean plive)
 
Node find (int uid, VBitSet bs)
 
Ary< Nodefind_body (RetNode ret)
 
Type[] find_type_split (Node[] parms)
 
int find_type_split_index (Node[] parms)
 
boolean is_multi_tail ()
 
FunNode make_new_fun (RetNode ret, TypeTuple new_formals)
 
Node merge (Node x)
 
int more_flow (boolean lifting, int errs)
 
void postorder (Ary< Node > nodes, VBitSet bs)
 
void split_callers (RetNode oldret, FunNode fun, Ary< Node > body, int path)
 
int split_size (Ary< Node > body, Node[] parms)
 
TypeTuple type_special (Node[] parms)
 
Node unuse (Node old)
 

Static Private Member Functions

static void _header (FunNode fun, SB sb)
 
static boolean bad_mem_use (Node n, TypeObj to)
 
static String name (int fidx, boolean debug)
 

Private Attributes

byte _cnt_size_inlines
 
TV2[] _nongens
 

Static Private Attributes

static int CNT =1
 
static final VBitSet FLOW_VISIT = new VBitSet()
 
static final VBitSet LIVE = new VBitSet()
 
static final String[] STRS = new String[] { null, "Call", "CallEpi", "Cast", "Con", "ConType", "CProj", "DefMem", "Err", "Fresh", "FP2Disp", "Fun", "FunPtr", "If", "Join", "Load", "Loop", "Name", "NewObj", "NewAry", "NewStr", "Parm", "Phi", "Prim", "Proj", "Region", "Return", "Scope","Split", "Start", "StartMem", "Store", "Thret", "Thunk", "Type", "Unresolved" }
 

Detailed Description

Definition at line 58 of file FunNode.java.

Constructor & Destructor Documentation

◆ FunNode() [1/6]

com.cliffc.aa.node.FunNode.FunNode ( PrimNode  prim)

Definition at line 78 of file FunNode.java.

78 { this(prim._name,prim._sig,prim._op_prec,prim._thunk_rhs); }

References com.cliffc.aa.node.PrimNode._name, com.cliffc.aa.node.PrimNode._op_prec, com.cliffc.aa.node.PrimNode._sig, and com.cliffc.aa.node.PrimNode._thunk_rhs.

Referenced by com.cliffc.aa.node.FunNode.make_new_fun().

Here is the caller graph for this function:

◆ FunNode() [2/6]

com.cliffc.aa.node.FunNode.FunNode ( NewNode.NewPrimNode  prim)

Definition at line 79 of file FunNode.java.

79 { this(prim._name,prim._sig,prim._op_prec,false); }

◆ FunNode() [3/6]

com.cliffc.aa.node.FunNode.FunNode ( String[]  flds,
Type[]  ts 
)

Definition at line 81 of file FunNode.java.

81 { this(null,TypeFunSig.make(flds,TypeTuple.make_args(ts),TypeTuple.RET),-1,false); }

References com.cliffc.aa.type.TypeFunSig.make(), com.cliffc.aa.type.TypeTuple.make_args(), and com.cliffc.aa.type.TypeTuple.RET.

Here is the call graph for this function:

◆ FunNode() [4/6]

com.cliffc.aa.node.FunNode.FunNode ( String  name)
package

Definition at line 83 of file FunNode.java.

References com.cliffc.aa.node.Node.add_def(), com.cliffc.aa.Env.ALL_CTRL, com.cliffc.aa.type.TypeFunSig.make(), com.cliffc.aa.node.FunNode.name(), com.cliffc.aa.type.TypeTuple.NO_ARGS, and com.cliffc.aa.type.TypeTuple.RET.

Here is the call graph for this function:

◆ FunNode() [5/6]

com.cliffc.aa.node.FunNode.FunNode ( String  name,
TypeFunSig  sig,
int  op_prec,
boolean  thunk_rhs 
)
package

Definition at line 85 of file FunNode.java.

85 { this(name,sig,op_prec,thunk_rhs,BitsFun.new_fidx()); }

References com.cliffc.aa.node.FunNode.name(), com.cliffc.aa.type.BitsFun.new_fidx(), and com.cliffc.aa.node.Node.op_prec().

Here is the call graph for this function:

◆ FunNode() [6/6]

com.cliffc.aa.node.FunNode.FunNode ( String  name,
TypeFunSig  sig,
int  op_prec,
boolean  thunk_rhs,
int  fidx 
)
private

Definition at line 87 of file FunNode.java.

87  {
88  super(OP_FUN);
89  _name = name;
90  _fidx = fidx;
91  _sig = sig;
92  _op_prec = (byte)op_prec;
93  _thunk_rhs = thunk_rhs;
94  FUNS.setX(fidx(),this); // Track FunNode by fidx; assert single-bit fidxs
95  keep(); // Always keep, until RetNode is constructed
96  }

References com.cliffc.aa.node.FunNode._fidx, com.cliffc.aa.node.FunNode._name, com.cliffc.aa.node.FunNode._op_prec, com.cliffc.aa.node.FunNode._sig, com.cliffc.aa.node.FunNode._thunk_rhs, com.cliffc.aa.node.FunNode.fidx(), com.cliffc.aa.node.FunNode.FUNS, com.cliffc.aa.node.Node.keep(), com.cliffc.aa.node.FunNode.name(), com.cliffc.aa.node.Node.OP_FUN, and com.cliffc.aa.node.Node.op_prec().

Here is the call graph for this function:

Member Function Documentation

◆ [static initializer]()

com.cliffc.aa.node.Node.[static initializer]
staticpackageinherited

◆ _do_reduce()

Node com.cliffc.aa.node.Node._do_reduce ( )
privateinherited

Definition at line 570 of file Node.java.

570  {
571  // Replace with a constant, if possible
572  if( should_con(_val) )
573  return con(_val);
574 
575  // Try CSE
576  if( !_elock ) { // Not in VALS
577  Node x = VALS.get(this); // Try VALS
578  if( x != null ) // Hit
579  return merge(x); // Graph replace with x
580  }
581 
582  // Try general ideal call
583  Node x = ideal_reduce(); // Try the general reduction
584  if( x != null )
585  return merge(x); // Graph replace with x
586 
587  return null; // No change
588  }

References com.cliffc.aa.node.Node._elock, com.cliffc.aa.node.Node._val, com.cliffc.aa.node.Node.con(), com.cliffc.aa.node.Node.ideal_reduce(), com.cliffc.aa.node.Node.merge(), com.cliffc.aa.node.Node.should_con(), and com.cliffc.aa.node.Node.VALS.

Referenced by com.cliffc.aa.node.Node.do_reduce().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ _elock()

Node com.cliffc.aa.node.Node._elock ( )
packageinherited

Definition at line 137 of file Node.java.

137  { // No assert version, used for new nodes
138  assert check_vals(); // elock & VALs match
139  if( !_elock && VALS.get(this)==null ) { _elock = true; VALS.put(this,this); }
140  return this;
141  }

References com.cliffc.aa.node.Node._elock, com.cliffc.aa.node.Node.check_vals(), and com.cliffc.aa.node.Node.VALS.

Here is the call graph for this function:

◆ _header()

static void com.cliffc.aa.node.Node._header ( FunNode  fun,
SB  sb 
)
staticprivateinherited

Definition at line 380 of file Node.java.

380  {
381  sb.p("============ ").p(fun==null?"null":fun.name()).p(" ============").nl();
382  }

References com.cliffc.aa.node.FunNode.name(), com.cliffc.aa.util.SB.nl(), and com.cliffc.aa.util.SB.p().

Referenced by com.cliffc.aa.node.Node.dumprpo().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ add_def()

Node com.cliffc.aa.node.Node.add_def ( Node  n)
inherited

Definition at line 152 of file Node.java.

152 { unelock(); _defs.add(n); if( n!=null ) n._uses.add(this); return this; }

References com.cliffc.aa.node.Node._defs, com.cliffc.aa.node.Node._uses, and com.cliffc.aa.node.Node.unelock().

Referenced by com.cliffc.aa.node.MemJoinNode.add_alias_above(), com.cliffc.aa.node.MemJoinNode.add_alias_below(), com.cliffc.aa.node.UnresolvedNode.add_def_unresolved(), com.cliffc.aa.node.NewObjNode.add_fun(), com.cliffc.aa.node.MemPrimNode.ReadPrimNode.as_fun(), com.cliffc.aa.node.MemPrimNode.WritePrimNode.as_fun(), com.cliffc.aa.node.PrimNode.as_fun(), com.cliffc.aa.node.NewNode< T extends TypeObj< T >.NewPrimNode< TypeAry >.as_fun(), com.cliffc.aa.node.TestNodeSmall.check(), com.cliffc.aa.node.MemJoinNode.combine_splits(), com.cliffc.aa.node.IntrinsicNode.convertTypeName(), com.cliffc.aa.node.IntrinsicNode.convertTypeNameStruct(), com.cliffc.aa.node.Node.copy(), com.cliffc.aa.node.ConTypeNode.def_fref(), com.cliffc.aa.Parse.do_exit(), com.cliffc.aa.Parse.func(), com.cliffc.aa.node.FunNode.FunNode(), com.cliffc.aa.node.AssertNode.ideal_grow(), com.cliffc.aa.node.LoadNode.ideal_grow(), com.cliffc.aa.node.UnresolvedNode.ideal_reduce(), com.cliffc.aa.node.CallEpiNode.ideal_reduce(), com.cliffc.aa.node.CallNode.ideal_reduce(), com.cliffc.aa.node.DefMemNode.make_mem(), com.cliffc.aa.Parse.merge_exits(), com.cliffc.aa.node.ScopeNode.ScopeNode(), com.cliffc.aa.node.CallEpiNode.set_is_copy(), com.cliffc.aa.node.FunNode.split_callers(), com.cliffc.aa.node.RegionNode.stacked_region(), com.cliffc.aa.node.RetNode.tail_recursive(), com.cliffc.aa.node.TestNode.test1monotonic_prim(), com.cliffc.aa.node.TestNodeSmall.testRecursiveDisplay(), com.cliffc.aa.node.CallEpiNode.wire0(), and com.cliffc.aa.node.CallEpiNode.wire1().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ add_flow_def_extra()

void com.cliffc.aa.node.RegionNode.add_flow_def_extra ( Node  chg)
inherited

Reimplemented from com.cliffc.aa.node.Node.

Definition at line 70 of file RegionNode.java.

70  {
71  if( chg.is_CFG() ) { // If losing an extra CFG user
72  for( Node use : _uses )
73  if( use._op == OP_REGION ) // Then stacked regions can fold
74  Env.GVN.add_reduce(use); // Put lower region of stack on worklist
75  if( this instanceof FunNode && ((FunNode)this).ret()==null )
76  Env.GVN.add_reduce(this);
77  }
78  }

References com.cliffc.aa.node.Node._uses, com.cliffc.aa.GVNGCM.add_reduce(), com.cliffc.aa.Env.GVN, com.cliffc.aa.node.Node.is_CFG(), and com.cliffc.aa.node.Node.OP_REGION.

Here is the call graph for this function:

◆ add_flow_extra()

void com.cliffc.aa.node.Node.add_flow_extra ( Type  old)
inherited

Reimplemented in com.cliffc.aa.node.CallNode, com.cliffc.aa.node.FunPtrNode, com.cliffc.aa.node.StoreNode, com.cliffc.aa.node.CastNode, and com.cliffc.aa.node.FreshNode.

Definition at line 513 of file Node.java.

513 { }

Referenced by com.cliffc.aa.node.Node.do_flow(), and com.cliffc.aa.GVNGCM.gcp().

Here is the caller graph for this function:

◆ add_flow_use_extra()

void com.cliffc.aa.node.RegionNode.add_flow_use_extra ( Node  chg)
inherited

Reimplemented from com.cliffc.aa.node.Node.

Definition at line 131 of file RegionNode.java.

131  {
132  Env.GVN.add_reduce(this);
133  for( Node phi : _uses )
134  if( phi instanceof PhiNode ) {
135  Env.GVN.add_flow(phi);
136  Env.GVN.add_flow_defs(phi); // Inputs to Phi change liveness
137  }
138  }

References com.cliffc.aa.node.Node._uses, com.cliffc.aa.GVNGCM.add_flow(), com.cliffc.aa.GVNGCM.add_flow_defs(), com.cliffc.aa.GVNGCM.add_reduce(), and com.cliffc.aa.Env.GVN.

Here is the call graph for this function:

◆ add_reduce_extra()

void com.cliffc.aa.node.Node.add_reduce_extra ( )
inherited

Reimplemented in com.cliffc.aa.node.CallNode, com.cliffc.aa.node.StoreNode, com.cliffc.aa.node.NewNode< T extends TypeObj< T >, and com.cliffc.aa.node.MemSplitNode.

Definition at line 517 of file Node.java.

517 { }

Referenced by com.cliffc.aa.node.Node.do_reduce().

Here is the caller graph for this function:

◆ adderr()

void com.cliffc.aa.node.Node.adderr ( HashSet< ErrMsg errs)
privateinherited

Definition at line 789 of file Node.java.

789  {
790  ErrMsg msg = err(false);
791  if( msg==null ) return;
792  msg._order = errs.size();
793  errs.add(msg);
794  }

References com.cliffc.aa.node.Node.ErrMsg._order, and com.cliffc.aa.node.Node.err().

Referenced by com.cliffc.aa.node.Node.walkerr_def().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ all_live()

TypeMem com.cliffc.aa.node.RegionNode.all_live ( )
inherited

Reimplemented from com.cliffc.aa.node.Node.

Definition at line 140 of file RegionNode.java.

140 { return TypeMem.ALIVE; }

References com.cliffc.aa.type.TypeMem.ALIVE.

◆ bad_mem_use()

static boolean com.cliffc.aa.node.FunNode.bad_mem_use ( Node  n,
TypeObj  to 
)
staticprivate

Definition at line 407 of file FunNode.java.

407  {
408  for( Node use : n._uses ) {
409  switch( use._op ) {
410  case OP_NEWOBJ: break; // Field use is like store.value use
411  case OP_IF: break; // Zero check is ok
412  case OP_CAST: // Cast propagates check
413  case OP_FRESH: // No value change
414  if( bad_mem_use(use, to) ) return true;
415  break;
416  case OP_LOAD:
417  if( !(to instanceof TypeStruct) ||
418  ((LoadNode)use).find((TypeStruct)to)== -1 )
419  return true; // Did not find field
420  break;
421  case OP_STORE:
422  if( ((StoreNode)use).rez()==n) break; // Storing as value is ok
423  if( !(to instanceof TypeStruct) || // Address needs to find field
424  ((StoreNode)use).find((TypeStruct)to)== -1 )
425  return true; // Did not find field
426  break;
427  case OP_CALL: break; // Argument pass-thru probably needs to check formals
428  case OP_RET: break; // Return pass-thru should be ok
429  case OP_NEWSTR:
430  TypeFunSig sig = ((NewStrNode)use)._sig;
431  Type formal = sig._formals.at(use._defs.find(n)-2);
432  if( !TypeMemPtr.OOP0.dual().isa(formal) )
433  return true;
434  break;
435  case OP_NAME: break; // Pointer to a nameable struct
436  case OP_PRIM:
437  if( use instanceof PrimNode.EQ_OOP ) break;
438  if( use instanceof PrimNode.NE_OOP ) break;
439  if( use instanceof MemPrimNode.LValueLength ) break;
440  if( use instanceof MemPrimNode.LValueRead )
441  if( ((MemPrimNode)use).idx() == n ) return true; // Use as index is broken
442  else break; // Use for array base is fine
443  if( use instanceof MemPrimNode.LValueWrite || use instanceof MemPrimNode.LValueWriteFinal )
444  if( ((MemPrimNode)use).idx() == n ) return true; // Use as index is broken
445  else break; // Use for array base or value is fine
446  if( use instanceof PrimNode.MulF64 ) return true;
447  if( use instanceof PrimNode.MulI64 ) return true;
448  if( use instanceof PrimNode.AndI64 ) return true;
449  if( use instanceof PrimNode.EQ_F64 ) return true;
450  if( use instanceof PrimNode.EQ_I64 ) return true;
451  throw unimpl();
452  default: throw unimpl();
453  }
454  }
455  return false;
456  }

References com.cliffc.aa.node.Node._defs, com.cliffc.aa.type.TypeFunSig._formals, com.cliffc.aa.node.Node._op, com.cliffc.aa.node.Node._uses, com.cliffc.aa.type.TypeTuple.at(), com.cliffc.aa.type.Type< T extends Type< T >.dual(), com.cliffc.aa.node.Node.find(), com.cliffc.aa.node.FunNode.formal(), com.cliffc.aa.type.TypeMemPtr.OOP0, com.cliffc.aa.node.Node.OP_CALL, com.cliffc.aa.node.Node.OP_CAST, com.cliffc.aa.node.Node.OP_FRESH, com.cliffc.aa.node.Node.OP_IF, com.cliffc.aa.node.Node.OP_LOAD, com.cliffc.aa.node.Node.OP_NAME, com.cliffc.aa.node.Node.OP_NEWOBJ, com.cliffc.aa.node.Node.OP_NEWSTR, com.cliffc.aa.node.Node.OP_PRIM, com.cliffc.aa.node.Node.OP_RET, and com.cliffc.aa.node.Node.OP_STORE.

Referenced by com.cliffc.aa.node.FunNode.find_type_split().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ bind()

void com.cliffc.aa.node.FunNode.bind ( String  tok)

Definition at line 172 of file FunNode.java.

172  {
173  if( _name==null ) _name = tok;
174  if( !_name.equals(tok) ) // Attempt to double-bind
175  _name = _name+":"+tok;
176  }

References com.cliffc.aa.node.FunNode._name.

Referenced by com.cliffc.aa.node.FunPtrNode.bind().

Here is the caller graph for this function:

◆ check_callers()

boolean com.cliffc.aa.node.FunNode.check_callers ( )
private

Definition at line 311 of file FunNode.java.

311  {
312  // No dead input paths
313  for( int i=1; i<_defs._len; i++ ) if( val(i)==Type.XCTRL && !in(i).is_prim() ) return false;
314  // Gather the ParmNodes and the RetNode. Ignore other (control) uses
315  Node ret=null;
316  for( Node use : _uses )
317  if( use instanceof RetNode ) {
318  if( ret!=null && ret!=use ) return false;
319  ret = use;
320  }
321  return true;
322  }

References com.cliffc.aa.node.Node._defs, com.cliffc.aa.node.Node._uses, com.cliffc.aa.node.Node.in(), com.cliffc.aa.node.Node.is_prim(), com.cliffc.aa.node.FunNode.ret(), com.cliffc.aa.node.Node.val(), and com.cliffc.aa.type.Type< T extends Type< T >.XCTRL.

Referenced by com.cliffc.aa.node.FunNode.ideal_inline().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ check_solo_mem_writer()

boolean com.cliffc.aa.node.Node.check_solo_mem_writer ( Node  memw)
packageinherited

Definition at line 845 of file Node.java.

845  {
846  if( is_prim() ) return true; // Several top-level memory primitives, including top scope & defmem blow this
847  boolean found=false;
848  for( Node use : _uses )
849  if( use == memw ) found=true; // Only memw mem-writer follows
850  else if( use.is_mem() ) return false; // Found a 2nd mem-writer
851  return found;
852  }

References com.cliffc.aa.node.Node._uses, and com.cliffc.aa.node.Node.is_prim().

Referenced by com.cliffc.aa.node.MemJoinNode.add_alias_above(), com.cliffc.aa.node.MemSplitNode.check_split(), com.cliffc.aa.node.StoreNode.ideal_grow(), and com.cliffc.aa.node.MemJoinNode.ideal_mono().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ check_vals()

boolean com.cliffc.aa.node.Node.check_vals ( )
privateinherited

Definition at line 143 of file Node.java.

143  {
144  Node x = VALS.get(this), old=null;
145  if( x == this ) old=this; // Found in table quickly
146  // Hunt the hard way
147  else for( Node o : VALS.keySet() ) if( o._uid == _uid ) { old=o; break; }
148  return (old!=null) == _elock;
149  }

References com.cliffc.aa.node.Node._elock, com.cliffc.aa.node.Node._uid, and com.cliffc.aa.node.Node.VALS.

Referenced by com.cliffc.aa.node.Node._elock(), com.cliffc.aa.node.Node.do_reduce(), and com.cliffc.aa.node.Node.unelock().

Here is the caller graph for this function:

◆ con()

static Node com.cliffc.aa.node.Node.con ( Type  t)
staticinherited

Definition at line 670 of file Node.java.

670  {
671  assert t==t.simple_ptr();
672  Node con;
673  if( t instanceof TypeFunPtr && ((TypeFunPtr)t)._fidxs.abit()!=-1 )
674  con = new FunPtrNode(FunNode.find_fidx(((TypeFunPtr)t).fidx()).ret(),Env.ANY);
675  else
676  con = new ConNode<>(t);
677  Node con2 = VALS.get(con);
678  if( con2 != null ) { // Found a prior constant
679  con.kill(); // Kill the just-made one
680  con = con2;
681  con._live = TypeMem.LIVE_BOT; // Adding more liveness
682  } else { // New constant
683  con._val = t; // Typed
684  con._elock(); // Put in VALS, since if Con appears once, probably appears again in the same XFORM call
685  }
686  Env.GVN.add_flow(con); // Updated live flows
687  return con;
688  }

References com.cliffc.aa.node.Node._elock, com.cliffc.aa.node.Node._live, com.cliffc.aa.node.Node._val, com.cliffc.aa.GVNGCM.add_flow(), com.cliffc.aa.Env.ANY, com.cliffc.aa.node.FunNode.find_fidx(), com.cliffc.aa.Env.GVN, com.cliffc.aa.node.Node.kill(), com.cliffc.aa.type.TypeMem.LIVE_BOT, com.cliffc.aa.node.FunNode.ret(), com.cliffc.aa.type.Type< T extends Type< T >.simple_ptr(), and com.cliffc.aa.node.Node.VALS.

Referenced by com.cliffc.aa.node.Node._do_reduce(), com.cliffc.aa.node.MemPrimNode.ReadPrimNode.as_fun(), com.cliffc.aa.node.MemPrimNode.WritePrimNode.as_fun(), com.cliffc.aa.node.NewNode< T extends TypeObj< T >.NewPrimNode< TypeAry >.as_fun(), com.cliffc.aa.Parse.con(), com.cliffc.aa.node.IntrinsicNode.convertTypeName(), com.cliffc.aa.node.IntrinsicNode.convertTypeNameStruct(), com.cliffc.aa.node.CallNode.copy(), com.cliffc.aa.node.ConNode< T extends Type >.equals(), com.cliffc.aa.node.FunPtrNode.forward_ref(), com.cliffc.aa.node.AssertNode.ideal_grow(), com.cliffc.aa.node.CallEpiNode.ideal_reduce(), com.cliffc.aa.node.ScopeNode.ideal_reduce(), com.cliffc.aa.node.CallNode.ideal_reduce(), com.cliffc.aa.Env.init(), com.cliffc.aa.node.NewNode< TypeStruct >.kill2(), com.cliffc.aa.node.DefMemNode.make_mem(), com.cliffc.aa.node.NewObjNode.promote_forward(), com.cliffc.aa.node.FunNode.split_callers(), com.cliffc.aa.node.TestNode.testMonotonic(), com.cliffc.aa.TestLive.testNewObj(), com.cliffc.aa.node.TestNodeSmall.testRecursiveDisplay(), com.cliffc.aa.Env.top_scope(), and com.cliffc.aa.node.Node.walk_opt().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ copy()

Node com.cliffc.aa.node.FunNode.copy ( boolean  copy_edges)

Reimplemented from com.cliffc.aa.node.Node.

Definition at line 182 of file FunNode.java.

182 { throw unimpl(); }

◆ del()

void com.cliffc.aa.node.Node.del ( int  idx)
inherited

Definition at line 169 of file Node.java.

169  {
170  unelock();
171  Node n = _defs.del(idx);
172  if( n != null ) n._uses.del(this);
173  }

References com.cliffc.aa.node.Node._defs, com.cliffc.aa.node.Node._uses, and com.cliffc.aa.node.Node.unelock().

Referenced by com.cliffc.aa.node.FunNode.split_callers(), and com.cliffc.aa.node.CallEpiNode.unwire().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ do_flow()

Node com.cliffc.aa.node.Node.do_flow ( )
inherited

Definition at line 592 of file Node.java.

592  {
593  Node progress=null;
594  // Compute live bits. If progress, push the defs on the flow worklist.
595  // This is a reverse flow computation. Always assumed live if keep.
596  if( _keep==0 ) {
597  TypeMem oliv = _live;
598  TypeMem nliv = live(Env.GVN._opt_mode);
599  if( oliv != nliv ) { // Progress?
600  progress = this; // Progress!
601  assert nliv.isa(oliv); // Monotonically improving
602  _live = nliv; // Record progress
603  for( Node def : _defs ) // Put defs on worklist... liveness flows uphill
604  if( def != null ) Env.GVN.add_flow(def).add_flow_def_extra(this);
605  add_flow_extra(oliv);
606  }
607  }
608 
609  // Compute best value. If progress, push uses on the flow worklist.
610  // This is a forward flow computation.
611  Type oval = _val; // Get old type
612  Type nval = value(Env.GVN._opt_mode);// Get best type
613  if( nval!=oval ) {
614  progress = this; // Progress!
615  assert nval.isa(oval); // Monotonically improving
616  _val = nval;
617  // If becoming a constant, check for replacing with a ConNode
618  if( !oval.may_be_con() && nval.may_be_con() ) {
619  Env.GVN.add_reduce(this);
620  Env.GVN.add_flow_defs(this); // Since a constant, inputs are no longer live
621  }
622  // Put uses on worklist... values flows downhill
623  for( Node use : _uses )
624  Env.GVN.add_flow(use).add_flow_use_extra(this);
625  // Progressing on CFG can mean CFG paths go dead
626  if( is_CFG() ) for( Node use : _uses ) if( use.is_CFG() ) Env.GVN.add_reduce(use);
627  add_flow_extra(oval);
628  }
629  return progress;
630  }

References com.cliffc.aa.node.Node._defs, com.cliffc.aa.node.Node._keep, com.cliffc.aa.node.Node._live, com.cliffc.aa.GVNGCM._opt_mode, com.cliffc.aa.node.Node._uses, com.cliffc.aa.node.Node._val, com.cliffc.aa.GVNGCM.add_flow(), com.cliffc.aa.GVNGCM.add_flow_defs(), com.cliffc.aa.node.Node.add_flow_extra(), com.cliffc.aa.GVNGCM.add_reduce(), com.cliffc.aa.Env.GVN, com.cliffc.aa.node.Node.is_CFG(), com.cliffc.aa.type.Type< T extends Type< T >.isa(), com.cliffc.aa.node.Node.live(), com.cliffc.aa.type.Type< T extends Type< T >.may_be_con(), and com.cliffc.aa.node.Node.value().

Referenced by com.cliffc.aa.node.DefMemNode.make_mem(), and com.cliffc.aa.GVNGCM.xreduce().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ do_grow()

Node com.cliffc.aa.node.Node.do_grow ( )
inherited

Definition at line 639 of file Node.java.

639  {
640  Node nnn = ideal_grow();
641  if( nnn==null || nnn==this || is_dead() ) return nnn;
642  assert _keep<=1;
643  if( _keep==1 ) { _keep--; nnn._keep++; Env.GVN.add_dead(this); } // Doing an arbitrary replacement
644  return Env.GVN.add_flow(Env.GVN.add_reduce(nnn));
645  }

References com.cliffc.aa.node.Node._keep, com.cliffc.aa.GVNGCM.add_dead(), com.cliffc.aa.GVNGCM.add_flow(), com.cliffc.aa.GVNGCM.add_reduce(), com.cliffc.aa.Env.GVN, com.cliffc.aa.node.Node.ideal_grow(), and com.cliffc.aa.node.Node.is_dead().

Referenced by com.cliffc.aa.node.Node.more_ideal().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ do_mono()

Node com.cliffc.aa.node.Node.do_mono ( )
inherited

Definition at line 632 of file Node.java.

632  {
633  Node x= ideal_mono();
634  if( x==null ) return null;
635  assert x==this;
637  }

References com.cliffc.aa.GVNGCM.add_flow(), com.cliffc.aa.GVNGCM.add_mono(), com.cliffc.aa.GVNGCM.add_reduce(), com.cliffc.aa.Env.GVN, and com.cliffc.aa.node.Node.ideal_mono().

Referenced by com.cliffc.aa.node.Node.more_ideal().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ do_reduce()

Node com.cliffc.aa.node.Node.do_reduce ( )
inherited

Definition at line 545 of file Node.java.

545  {
546  assert check_vals();
547  Node nnn = _do_reduce();
548  if( nnn!=null ) { // Something happened
549  if( nnn!=this ) { // Replacement
550  assert _keep<=1; // Can only replace if zero or one
551  Env.GVN.add_flow_uses(this); // Visit users
553  if( _keep==1 ) { _keep--; nnn._keep++; } // Move keep bits over
554  subsume(nnn); // Replace
555  for( Node use : nnn._uses ) {
556  use.add_reduce_extra();
557  use.add_flow_use_extra(nnn);
558  }
559  }
560  Env.GVN.add_reduce(nnn); // Rerun the replacement
561  return nnn._elock(); // After putting in VALS
562  }
563  // No progress; put in VALS and return
564  _elock();
565  return null;
566  }

References com.cliffc.aa.node.Node._do_reduce(), com.cliffc.aa.node.Node._elock, com.cliffc.aa.node.Node._keep, com.cliffc.aa.node.Node._uses, com.cliffc.aa.node.Node.add_flow_use_extra(), com.cliffc.aa.GVNGCM.add_flow_uses(), com.cliffc.aa.GVNGCM.add_reduce(), com.cliffc.aa.node.Node.add_reduce_extra(), com.cliffc.aa.node.Node.check_vals(), com.cliffc.aa.Env.GVN, and com.cliffc.aa.node.Node.subsume().

Referenced by com.cliffc.aa.node.Node.more_ideal(), com.cliffc.aa.GVNGCM.Build< N extends Node >.xform(), and com.cliffc.aa.GVNGCM.xreduce().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dump() [1/5]

SB com.cliffc.aa.node.Node.dump ( int  d,
SB  sb,
boolean  plive 
)
privateinherited

Definition at line 290 of file Node.java.

290  {
291  String xs = String.format("%s%4d: %-7.7s ",plive ? _live : "",_uid,xstr());
292  sb.i(d).p(xs);
293  if( is_dead() ) return sb.p("DEAD");
294  for( Node n : _defs ) sb.p(n == null ? "____ " : String.format("%4d ",n._uid));
295  sb.p(" [[");
296  for( Node n : _uses ) sb.p(String.format("%4d ",n._uid));
297  sb.p("]] ");
298  sb.p(str()).s();
299  if( _val==null ) sb.p("----");
300  else _val.str(sb,new VBitSet(),null,true);
301 
302  return sb;
303  }

References com.cliffc.aa.node.Node._defs, com.cliffc.aa.node.Node._live, com.cliffc.aa.node.Node._uid, com.cliffc.aa.node.Node._uses, com.cliffc.aa.node.Node._val, com.cliffc.aa.util.SB.i(), com.cliffc.aa.node.Node.is_dead(), com.cliffc.aa.util.SB.p(), com.cliffc.aa.util.SB.s(), com.cliffc.aa.type.Type< T extends Type< T >.str(), com.cliffc.aa.node.Node.str(), and com.cliffc.aa.node.Node.xstr().

Here is the call graph for this function:

◆ dump() [2/5]

SB com.cliffc.aa.node.Node.dump ( int  d,
SB  sb,
int  max,
VBitSet  bs,
boolean  prims,
boolean  plive 
)
privateinherited

Definition at line 310 of file Node.java.

310  {
311  if( bs.tset(_uid) ) return sb;
312  if( d < max ) { // Limit at depth
313  // Print parser scopes first (deepest)
314  for( Node n : _defs ) if( n instanceof ScopeNode ) n.dump(d+1,sb,max,bs,prims,plive);
315  // Print constants early
316  for( Node n : _defs ) if( n instanceof ConNode ) n.dump(d+1,sb,max,bs,prims,plive);
317  // Do not recursively print root Scope, nor Unresolved of primitives.
318  // These are too common, and uninteresting.
319  for( Node n : _defs ) if( n != null && (!prims && n.is_prim() && n._defs._len > 3) ) bs.set(n._uid);
320  // Recursively print most of the rest, just not the multi-node combos and
321  // Unresolve & FunPtrs.
322  for( Node n : _defs )
323  if( n != null && !n.is_multi_head() && !n.is_multi_tail() &&
324  !(n instanceof UnresolvedNode) && !(n instanceof FunPtrNode) )
325  n.dump(d+1,sb,max,bs,prims,plive);
326  // Print Unresolved and FunPtrs, which typically catch whole functions.
327  for( Node n : _defs )
328  if( (n instanceof UnresolvedNode) || (n instanceof FunPtrNode) )
329  n.dump(d+1,sb,max,bs,prims,plive);
330  // Print anything not yet printed, including multi-node combos
331  for( Node n : _defs ) if( n != null && !n.is_multi_head() ) n.dump(d+1,sb,max,bs,prims,plive);
332  for( Node n : _defs ) if( n != null ) n.dump(d+1,sb,max,bs,prims,plive);
333  }
334  // Print multi-node combos all-at-once, including all tails even if they
335  // exceed the depth limit by 1.
336  Node x = is_multi_tail() ? in(0) : this;
337  if( x != null && x.is_multi_head() ) {
338  int dx = d+(x==this?0:1);
339  // Print all tails paths, all at once - nothing recursively below the tail
340  for( Node n : x._uses )
341  if( n.is_multi_tail() )
342  for( Node m : n._defs )
343  if( dx<max) m.dump(dx+1,sb,max,bs,prims,plive);
344  if( x==this ) bs.clear(_uid); // Reset for self, so prints right now
345  x.dump(dx,sb,bs,plive); // Conditionally print head of combo
346  // Print all combo tails, if not already printed
347  if( x!=this ) bs.clear(_uid); // Reset for self, so prints in the mix below
348  for( Node n : x._uses ) if( n.is_multi_tail() ) n.dump(dx-1,sb,bs,plive);
349  return sb;
350  } else { // Neither combo head nor tail, just print
351  return dump(d,sb,plive).nl();
352  }
353  }

References com.cliffc.aa.node.Node._defs, com.cliffc.aa.node.Node._uid, com.cliffc.aa.node.Node._uses, com.cliffc.aa.node.Node.dump(), com.cliffc.aa.node.Node.in(), com.cliffc.aa.node.Node.is_multi_head(), com.cliffc.aa.node.Node.is_multi_tail(), and com.cliffc.aa.util.VBitSet.tset().

Here is the call graph for this function:

◆ dump() [3/5]

void com.cliffc.aa.node.Node.dump ( int  d,
SB  sb,
VBitSet  bs,
boolean  plive 
)
privateinherited

Definition at line 305 of file Node.java.

305  {
306  if( bs.tset(_uid) ) return;
307  dump(d,sb,plive).nl();
308  }

References com.cliffc.aa.node.Node._uid, com.cliffc.aa.node.Node.dump(), and com.cliffc.aa.util.VBitSet.tset().

Here is the call graph for this function:

◆ dump() [4/5]

String com.cliffc.aa.node.Node.dump ( int  max)
inherited

Definition at line 286 of file Node.java.

286 { return dump(max,is_prim(),false); }

References com.cliffc.aa.node.Node.dump(), and com.cliffc.aa.node.Node.is_prim().

Referenced by com.cliffc.aa.Parse.dump(), com.cliffc.aa.node.Node.dump(), com.cliffc.aa.node.Node.dumprpo(), com.cliffc.aa.node.Node.more_flow(), and com.cliffc.aa.node.Node.toString().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dump() [5/5]

String com.cliffc.aa.node.Node.dump ( int  max,
boolean  prims,
boolean  plive 
)
inherited

Definition at line 288 of file Node.java.

288 { return dump(0, new SB(),max,new VBitSet(),prims,plive).toString(); }

References com.cliffc.aa.node.Node.dump().

Referenced by com.cliffc.aa.node.Node.dump().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dumprpo()

String com.cliffc.aa.node.Node.dumprpo ( boolean  prims,
boolean  plive 
)
inherited

Definition at line 358 of file Node.java.

358  {
359  Ary<Node> nodes = new Ary<>(new Node[1],0);
360  postorder(nodes,new VBitSet());
361  // Dump in reverse post order
362  SB sb = new SB();
363  Node prior = null;
364  for( int i=nodes._len-1; i>=0; i-- ) {
365  Node n = nodes.at(i);
366  if( !(n._uid <= Env.ALL_CTRL._uid || !n.is_prim() || prims) )
367  continue; // Visited, but do not print
368  // Add a nl after the last of a multi-tail sequence.
369  if( (prior != null && prior.is_multi_tail() && !n.is_multi_tail()) ||
370  // Add a nl before the start of a multi-head sequence.
371  n.is_multi_head() )
372  sb.nl();
373  if( n._op==OP_FUN ) _header((FunNode)n,sb);
374  n.dump(0,sb,plive).nl();
375  if( n._op==OP_RET && n.in(4) instanceof FunNode ) _header((FunNode)n.in(4),sb);
376  prior = n;
377  }
378  return sb.toString();
379  }

References com.cliffc.aa.node.Node._header(), com.cliffc.aa.util.Ary< E >._len, com.cliffc.aa.node.Node._op, com.cliffc.aa.node.Node._uid, com.cliffc.aa.Env.ALL_CTRL, com.cliffc.aa.util.Ary< E >.at(), com.cliffc.aa.node.Node.dump(), com.cliffc.aa.node.Node.in(), com.cliffc.aa.node.Node.is_multi_head(), com.cliffc.aa.node.Node.is_multi_tail(), com.cliffc.aa.node.Node.is_prim(), com.cliffc.aa.util.SB.nl(), com.cliffc.aa.node.Node.OP_FUN, com.cliffc.aa.node.Node.OP_RET, com.cliffc.aa.node.Node.postorder(), and com.cliffc.aa.util.SB.toString().

Referenced by com.cliffc.aa.Parse.dumprpo().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ equals()

boolean com.cliffc.aa.node.FunNode.equals ( Object  o)

Reimplemented from com.cliffc.aa.node.Node.

Definition at line 917 of file FunNode.java.

917 { return this==o; } // Only one

◆ err()

◆ escapees()

◆ fidx()

int com.cliffc.aa.node.FunNode.fidx ( )
package

Definition at line 102 of file FunNode.java.

102 { return _fidx; }

References com.cliffc.aa.node.FunNode._fidx.

Referenced by com.cliffc.aa.node.FunNode.find_fidx(), com.cliffc.aa.node.FunNode.FunNode(), com.cliffc.aa.node.FunNode.make_new_fun(), com.cliffc.aa.node.FunNode.name(), com.cliffc.aa.node.FunNode.names(), com.cliffc.aa.node.FunNode.split_callers(), and com.cliffc.aa.node.FunNode.split_size().

Here is the caller graph for this function:

◆ find() [1/2]

Node com.cliffc.aa.node.Node.find ( int  uid)
inherited

Definition at line 427 of file Node.java.

427 { return find(uid,new VBitSet()); }

References com.cliffc.aa.node.Node.find().

Referenced by com.cliffc.aa.node.FunNode.bad_mem_use(), and com.cliffc.aa.node.Node.find().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ find() [2/2]

Node com.cliffc.aa.node.Node.find ( int  uid,
VBitSet  bs 
)
privateinherited

Definition at line 428 of file Node.java.

428  {
429  if( _uid==uid ) return this;
430  if( bs.tset(_uid) || is_dead() ) return null;
431  Node m;
432  for( Node n : _defs ) if( n!=null && (m=n.find(uid,bs)) !=null ) return m;
433  for( Node n : _uses ) if( (m=n.find(uid,bs)) !=null ) return m;
434  return null;
435  }

References com.cliffc.aa.node.Node._defs, com.cliffc.aa.node.Node._uid, com.cliffc.aa.node.Node._uses, com.cliffc.aa.node.Node.find(), com.cliffc.aa.node.Node.is_dead(), and com.cliffc.aa.util.VBitSet.tset().

Here is the call graph for this function:

◆ find_body()

Ary<Node> com.cliffc.aa.node.FunNode.find_body ( RetNode  ret)
private

Definition at line 478 of file FunNode.java.

478  {
479  // Find the function body. Do a forwards walk first, stopping at the
480  // obvious function exit. If function does not expose its display then
481  // this is the complete function body with nothing extra walked. If it has
482  // a nested function or returns a nested function then its display is may
483  // be reached by loads & stores from outside the function.
484  //
485  // Then do a backwards walk, intersecting with the forwards walk. A
486  // backwards walk will find upwards-exposed values, typically constants and
487  // display references - could be a lot of them. Minor opt to do the
488  // forward walk first.
489  VBitSet freached = new VBitSet(); // Forwards reached
490  Ary<Node> work = new Ary<>(new Node[1],0);
491  work.add(this); // Prime worklist
492  while( !work.isEmpty() ) { // While have work
493  Node n = work.pop(); // Get work
494  int op = n._op; // opcode
495  if( op == OP_FUN && n != this ) continue; // Call to other function, not part of inlining
496  if( op == OP_PARM && n.in(0) != this ) continue; // Arg to other function, not part of inlining
497  if( op == OP_DEFMEM ) continue; // Never part of body, but reachable from all allocations
498  if( op == OP_RET && n != ret ) continue; // Return (of other function)
499  // OP_FUNPTR: Can be reached from an internal NewObjNode/display, or
500  // following the local Return. The local FunPtrs are added below.
501  // Adding the reached FunPtrs here clones them, making new FunPtrs using
502  // either the old or new display.
503  if( freached.tset(n._uid) ) continue; // Already visited?
504  if( op == OP_RET ) continue; // End of this function
505  if( n instanceof ProjNode && n.in(0) instanceof CallNode ) continue; // Wired call; all projs lead to other functions
506  work.addAll(n._uses); // Visit all uses
507  }
508 
509  // Backwards walk, trimmed to reachable from forwards
510  VBitSet breached = new VBitSet(); // Backwards and forwards reached
511  Ary<Node> body = new Ary<>(new Node[1],0);
512  for( Node use : ret._uses ) // Include all FunPtrs as part of body
513  if( use instanceof FunPtrNode )
514  body.push(use);
515  work.add(ret);
516  while( !work.isEmpty() ) { // While have work
517  Node n = work.pop(); // Get work
518  if( n==null ) continue; // Defs can be null
519  if( !freached.get (n._uid) ) continue; // Not reached from fcn top
520  if( breached.tset(n._uid) ) continue; // Already visited?
521  body.push(n); // Part of body
522  work.addAll(n._defs); // Visit all defs
523  if( n.is_multi_head() ) // Multi-head?
524  work.addAll(n._uses); // All uses are ALSO part, even if not reachable in this fcn
525  }
526  return body;
527  }

References com.cliffc.aa.node.Node._defs, com.cliffc.aa.node.Node._op, com.cliffc.aa.node.Node._uid, com.cliffc.aa.node.Node._uses, com.cliffc.aa.util.Ary< E >.add(), com.cliffc.aa.util.Ary< E >.addAll(), com.cliffc.aa.node.Node.in(), com.cliffc.aa.node.Node.is_multi_head(), com.cliffc.aa.util.Ary< E >.isEmpty(), com.cliffc.aa.node.Node.OP_DEFMEM, com.cliffc.aa.node.Node.OP_FUN, com.cliffc.aa.node.Node.OP_PARM, com.cliffc.aa.node.Node.OP_RET, com.cliffc.aa.util.Ary< E >.pop(), com.cliffc.aa.util.Ary< E >.push(), com.cliffc.aa.node.FunNode.ret(), and com.cliffc.aa.util.VBitSet.tset().

Referenced by com.cliffc.aa.node.FunNode.ideal_inline().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ find_fidx()

static FunNode com.cliffc.aa.node.FunNode.find_fidx ( int  fidx)
static

Definition at line 101 of file FunNode.java.

101 { return FUNS.atX(fidx); }

References com.cliffc.aa.node.FunNode.fidx(), and com.cliffc.aa.node.FunNode.FUNS.

Referenced by com.cliffc.aa.node.CallEpiNode.check_and_wire(), com.cliffc.aa.node.Node.con(), com.cliffc.aa.node.CallNode.err(), com.cliffc.aa.node.CallEpiNode.ideal_reduce(), com.cliffc.aa.node.CallNode.ideal_reduce(), com.cliffc.aa.type.TypeFunPtr.is_forward_ref(), com.cliffc.aa.node.CallNode.least_cost(), com.cliffc.aa.node.FunNode.name(), com.cliffc.aa.node.FunNode.names(), com.cliffc.aa.node.RetNode.xstr(), and com.cliffc.aa.node.FunPtrNode.xstr().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ find_type_split()

Type [] com.cliffc.aa.node.FunNode.find_type_split ( Node[]  parms)
private

Definition at line 354 of file FunNode.java.

354  {
355  assert has_unknown_callers(); // Only overly-wide calls.
356 
357  // Look for splitting to help an Unresolved Call.
358  int idx = find_type_split_index(parms);
359  if( idx != -1 ) { // Found; split along a specific input path using widened types
360  Type[] sig = Types.get(parms.length);
361  sig[CTL_IDX] = Type.CTRL;
362  sig[MEM_IDX] = TypeMem.MEM;
363  sig[DSP_IDX] = parms[DSP_IDX]==null
364  ? _sig.display().simple_ptr()
365  : parms[DSP_IDX].val(idx);
366  for( int i=ARG_IDX; i<parms.length; i++ )
367  sig[i] = parms[i]==null ? Type.ALL : parms[i].val(idx).widen();
368  return sig;
369  }
370 
371  // Look for splitting to help a pointer from an unspecialized type
372  boolean progress = false;
373  Type[] sig = new Type[parms.length];
374  Type tmem = parms[MEM_IDX]._val;
375  sig[CTL_IDX] = Type.CTRL;
376  sig[MEM_IDX] = TypeMem.MEM;
377  if( tmem instanceof TypeMem ) {
378  for( int i=DSP_IDX; i<parms.length; i++ ) { // For all parms
379  Node parm = parms[i];
380  if( parm == null ) { sig[i]=Type.ALL; continue; } // (some can be dead)
381  if( parm._val==Type.ALL ) return null; // No split with error args
382  sig[i] = parm._val; // Current type
383  if( i==DSP_IDX ) continue; // No split on the display
384  // Best possible type
385  Type tp = Type.ALL;
386  for( Node def : parm._defs )
387  if( def != this )
388  tp = tp.join(def._val);
389  if( !(tp instanceof TypeMemPtr) ) continue; // Not a pointer
390  TypeObj to = ((TypeMem)tmem).ld((TypeMemPtr)tp).widen(); //
391  // Are all the uses of parm compatible with this TMP?
392  // Also, flag all used fields.
393  if( bad_mem_use(parm, to) )
394  continue; // So bad usage
395 
396  sig[i] = TypeMemPtr.make(BitsAlias.FULL,to); // Signature takes any alias but has sharper guts
397  progress = true;
398  }
399  }
400  if( progress ) return sig;
401 
402  return null;
403  }

References com.cliffc.aa.node.Node._defs, com.cliffc.aa.node.FunNode._sig, com.cliffc.aa.node.Node._val, com.cliffc.aa.type.Type< T extends Type< T >.ALL, com.cliffc.aa.node.FunNode.bad_mem_use(), com.cliffc.aa.type.Type< T extends Type< T >.CTRL, com.cliffc.aa.type.TypeFunSig.display(), com.cliffc.aa.node.FunNode.find_type_split_index(), com.cliffc.aa.type.BitsAlias.FULL, com.cliffc.aa.type.Types.get(), com.cliffc.aa.node.FunNode.has_unknown_callers(), com.cliffc.aa.type.Type< T extends Type< T >.join(), com.cliffc.aa.type.TypeMemPtr.make(), com.cliffc.aa.type.TypeMem.MEM, com.cliffc.aa.node.FunNode.parm(), com.cliffc.aa.node.FunNode.parms(), com.cliffc.aa.type.Type< T extends Type< T >.simple_ptr(), com.cliffc.aa.node.Node.val(), and com.cliffc.aa.type.Type< T extends Type< T >.widen().

Referenced by com.cliffc.aa.node.FunNode.type_special().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ find_type_split_index()

int com.cliffc.aa.node.FunNode.find_type_split_index ( Node[]  parms)
private

Definition at line 326 of file FunNode.java.

326  {
327  assert has_unknown_callers();// Only overly-wide calls.
328  for( Node parm : parms ) // For all parms
329  if( parm != null ) // (some can be dead)
330  for( Node use : parm._uses ) { // See if a parm-user needs a type-specialization split
331  if( use instanceof CallNode ) {
332  CallNode call = (CallNode)use;
333  Node fdx = call.fdx();
334  if( fdx instanceof FreshNode ) fdx = ((FreshNode)fdx).id();
335  if( (fdx==parm && !parm._val.isa(TypeFunPtr.GENERIC_FUNPTR) ) ||
336  fdx instanceof UnresolvedNode ) { // Call overload not resolved
337  Type t0 = parm.val(1); // Generic type in slot#1
338  for( int i=2; i<parm._defs._len; i++ ) { // For all other inputs
339  Type tp = parm.val(i);
340  if( tp.above_center() ) continue; // This parm input is in-error
341  Type ti = tp.widen(); // Get the widen'd type
342  if( !ti.isa(t0) ) continue; // Must be isa-generic type, or else type-error
343  if( ti != t0 ) return i; // Sharpens? Then splitting here should help
344  }
345  }
346  // Else no split will help this call, look for other calls to help
347  }
348  }
349 
350  return -1; // No unresolved calls; no point in type-specialization
351  }

References com.cliffc.aa.node.Node._defs, com.cliffc.aa.node.Node._uses, com.cliffc.aa.node.Node._val, com.cliffc.aa.type.Type< T extends Type< T >.above_center(), com.cliffc.aa.node.CallNode.fdx(), com.cliffc.aa.type.TypeFunPtr.GENERIC_FUNPTR, com.cliffc.aa.node.FunNode.has_unknown_callers(), com.cliffc.aa.type.Type< T extends Type< T >.isa(), com.cliffc.aa.node.FunNode.parm(), com.cliffc.aa.node.FunNode.parms(), com.cliffc.aa.node.Node.val(), and com.cliffc.aa.type.Type< T extends Type< T >.widen().

Referenced by com.cliffc.aa.node.FunNode.find_type_split().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ formal()

Type com.cliffc.aa.node.FunNode.formal ( int  idx)
package

Definition at line 187 of file FunNode.java.

187  {
188  return idx == -1 ? TypeRPC.ALL_CALL : _sig.arg(idx);
189  }

References com.cliffc.aa.node.FunNode._sig, com.cliffc.aa.type.TypeRPC.ALL_CALL, and com.cliffc.aa.type.TypeFunSig.arg().

Referenced by com.cliffc.aa.node.FunNode.bad_mem_use(), com.cliffc.aa.node.TestNodeSmall.check(), com.cliffc.aa.node.ParmNode.err(), com.cliffc.aa.node.FunNode.split_callers(), com.cliffc.aa.node.FunNode.split_size(), com.cliffc.aa.node.ParmNode.valid_args(), and com.cliffc.aa.node.ParmNode.value().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ fptr()

FunPtrNode com.cliffc.aa.node.FunNode.fptr ( )

Definition at line 908 of file FunNode.java.

908  {
909  RetNode ret = ret();
910  if( ret==null ) return null;
911  for( Node fptr : ret._uses )
912  if( fptr instanceof FunPtrNode )
913  return (FunPtrNode)fptr;
914  return null;
915  }

References com.cliffc.aa.node.Node._uses, and com.cliffc.aa.node.FunNode.ret().

Referenced by com.cliffc.aa.node.CallNode.err(), com.cliffc.aa.node.FunNode.ideal_reduce(), com.cliffc.aa.node.FunNode.name(), com.cliffc.aa.node.FunNode.names(), com.cliffc.aa.node.FunNode.split_callers(), and com.cliffc.aa.Parse.term().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_mem_writer()

Node com.cliffc.aa.node.Node.get_mem_writer ( )
inherited

Definition at line 840 of file Node.java.

840  {
841  for( Node use : _uses ) if( use.is_mem() ) return use;
842  return null;
843  }

References com.cliffc.aa.node.Node._uses.

Referenced by com.cliffc.aa.node.StoreNode.ideal_reduce().

Here is the caller graph for this function:

◆ has_unknown_callers()

boolean com.cliffc.aa.node.FunNode.has_unknown_callers ( )
package

Definition at line 185 of file FunNode.java.

185 { return _defs._len > 1 && in(1) == Env.ALL_CTRL; }

References com.cliffc.aa.node.Node._defs, com.cliffc.aa.Env.ALL_CTRL, and com.cliffc.aa.node.Node.in().

Referenced by com.cliffc.aa.node.FunNode.find_type_split(), com.cliffc.aa.node.FunNode.find_type_split_index(), com.cliffc.aa.node.FunNode.ideal_inline(), com.cliffc.aa.node.FunNode.ideal_reduce(), com.cliffc.aa.node.RetNode.live(), com.cliffc.aa.node.FunNode.split_callers(), com.cliffc.aa.node.FunNode.split_size(), com.cliffc.aa.node.FunNode.type_special(), and com.cliffc.aa.node.ParmNode.value().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ hashCode()

◆ ideal_grow()

Node com.cliffc.aa.node.Node.ideal_grow ( )
inherited

Reimplemented in com.cliffc.aa.node.PrimNode.OrElse, com.cliffc.aa.node.PrimNode.AndThen, com.cliffc.aa.node.CallNode, com.cliffc.aa.node.LoadNode, com.cliffc.aa.node.StoreNode, com.cliffc.aa.node.MrgProjNode, and com.cliffc.aa.node.AssertNode.

Definition at line 450 of file Node.java.

450 { return null; }

Referenced by com.cliffc.aa.node.Node.do_grow().

Here is the caller graph for this function:

◆ ideal_inline()

Node com.cliffc.aa.node.FunNode.ideal_inline ( boolean  check_progress)

Definition at line 231 of file FunNode.java.

231  {
232  // If no trailing RetNode and hence no FunPtr... function is uncallable
233  // from the unknown caller.
234  RetNode ret = ret();
235  if( has_unknown_callers() && ret == null && Env.GVN._opt_mode != GVNGCM.Mode.Parse ) // Dead after construction?
236  return null;
237 
238  if( is_forward_ref() ) return null; // No mods on a forward ref
239  Node[] parms = parms();
240  Node rpc_parm = parms[0];
241  if( rpc_parm == null ) return null; // Single caller const-folds the RPC, but also inlines in CallNode
242  if( !check_callers() ) return null;
243  if( _defs._len <= 2 ) return null; // No need to split callers if only 1
244 
245  // Every input path is wired to an output path
246  for( int i=1+(has_unknown_callers() ? 1 : 0); i<_defs._len; i++ ) {
247  Node c = in(i);
248  if( !(c.in(0) instanceof CallNode) ) return null; // If this is not a CallNode, just bail
249  CallNode call = (CallNode)c.in(0);
250  CallEpiNode cepi = call.cepi();
251  if( cepi==null ) return null;
252  assert cepi._defs.find(ret)!= -1; // If this is not wired, just bail
253  }
254  // Memory is not 'lifted' by DefMem, a sign that a bad-memory-arg is being
255  // passed in.
256  if( has_unknown_callers() ) {
257  Node mem = parms[MEM_IDX];
258  if( mem!=null && !mem._val.isa(Env.DEFMEM._val) )
259  return null; // Do not inline a bad memory type
260  }
261 
262  // Look for appropriate type-specialize callers
263  TypeTuple formals = _thunk_rhs ? null : type_special(parms);
264  Ary<Node> body = find_body(ret);
265  int path = -1; // Paths will split according to type
266  if( formals == null ) { // No type-specialization to do
267  formals = _sig._formals; // Use old args
268  if( _cnt_size_inlines >= 10 && !is_prim() ) return null;
269  // Large code-expansion allowed; can inline for other reasons
270  path = _thunk_rhs ? 2 : split_size(body,parms); // Forcible size-splitting first path
271  if( path == -1 ) return null;
272  assert CallNode.ttfp(in(path).val(0)).fidx()!=-1; // called by a single-target call
273  if( !is_prim() ) _cnt_size_inlines++; // Disallow infinite size-inlining of recursive non-primitives
274  }
275 
276  // Check for dups (already done this but failed to resolve all calls, so trying again).
277  TypeTuple fformals = formals;
278  if( path == -1 && FUNS.find(fun -> fun != null && !fun.is_dead() &&
279  fun._sig._formals==fformals && fun._sig._ret == _sig._ret &&
280  fun.in(1)==in(1)) != -1 )
281  return null; // Done this before
282  if( noinline() ) return null;
283 
284  assert _must_inline==0; // Failed to inline a prior inline?
285  if( path > 0 ) _must_inline = in(path).in(0)._uid;
286  assert !check_progress; // Not expecting progress
287 
288  // --------------
289  // Split the callers according to the new 'fun'.
290  FunNode fun = make_new_fun(ret, formals);
291  split_callers(ret,fun,body,path);
292  assert Env.START.more_flow(true)==0; // Initial conditions are correct
293  return this;
294  }

References com.cliffc.aa.node.FunNode._cnt_size_inlines, com.cliffc.aa.node.Node._defs, com.cliffc.aa.type.TypeFunSig._formals, com.cliffc.aa.node.FunNode._must_inline, com.cliffc.aa.GVNGCM._opt_mode, com.cliffc.aa.type.TypeFunSig._ret, com.cliffc.aa.node.FunNode._sig, com.cliffc.aa.node.FunNode._thunk_rhs, com.cliffc.aa.node.Node._uid, com.cliffc.aa.node.Node._val, com.cliffc.aa.node.CallNode.cepi(), com.cliffc.aa.node.FunNode.check_callers(), com.cliffc.aa.Env.DEFMEM, com.cliffc.aa.type.TypeFunPtr.fidx(), com.cliffc.aa.node.FunNode.find_body(), com.cliffc.aa.node.FunNode.FUNS, com.cliffc.aa.Env.GVN, com.cliffc.aa.node.FunNode.has_unknown_callers(), com.cliffc.aa.node.Node.in(), com.cliffc.aa.node.FunNode.is_forward_ref(), com.cliffc.aa.node.Node.is_prim(), com.cliffc.aa.type.Type< T extends Type< T >.isa(), com.cliffc.aa.node.FunNode.make_new_fun(), com.cliffc.aa.node.FunNode.noinline(), com.cliffc.aa.node.FunNode.parms(), com.cliffc.aa.GVNGCM.Mode.Parse, com.cliffc.aa.node.FunNode.ret(), com.cliffc.aa.node.FunNode.split_callers(), com.cliffc.aa.node.FunNode.split_size(), com.cliffc.aa.Env.START, com.cliffc.aa.node.CallNode.ttfp(), com.cliffc.aa.node.FunNode.type_special(), and com.cliffc.aa.node.Node.val().

Here is the call graph for this function:

◆ ideal_mono()

Node com.cliffc.aa.node.Node.ideal_mono ( )
inherited

Reimplemented in com.cliffc.aa.node.RetNode, com.cliffc.aa.node.StoreNode, com.cliffc.aa.node.MemJoinNode, com.cliffc.aa.node.LoadNode, com.cliffc.aa.node.MrgProjNode, and com.cliffc.aa.node.CastNode.

Definition at line 445 of file Node.java.

445 { return null; }

Referenced by com.cliffc.aa.node.Node.do_mono().

Here is the caller graph for this function:

◆ ideal_reduce()

Node com.cliffc.aa.node.FunNode.ideal_reduce ( )

Reimplemented from com.cliffc.aa.node.RegionNode.

Definition at line 197 of file FunNode.java.

197  {
198  Node rez = super.ideal_reduce();
199  if( rez != null ) return rez;
200  // Check for FunPtr/Ret dead/gone, and the function is no longer callable
201  // from anybody.
202  RetNode ret = ret();
203  if( has_unknown_callers() && ret==null && _keep==0 ) {
204  assert !is_prim();
205  assert in(1)==Env.ALL_CTRL;
206  return set_def(1,Env.XCTRL);
207  }
208 
209  // Update _sig if parms are unused. SIG falls during Iter and lifts during
210  // GCP. If parm is missing or not-live, then the corresponding SIG
211  // argument can be ALL (all args allowed, including errors).
212  if( !is_forward_ref() && !is_prim() && _keep==0 ) {
213  Node[] parms = parms();
214  TypeFunSig progress = _sig;
215  for( int i=1; i<parms.length; i++ )
216  if( (parms[i]==null || parms[i]._live==TypeMem.DEAD) && _sig._formals.at(i)!=Type.ALL )
218  // Can resolve some least_cost choices
219  if( progress != _sig ) {
220  FunPtrNode fptr = fptr();
221  if( fptr != null )
222  for( Node use : fptr()._uses )
223  if( use instanceof UnresolvedNode )
224  Env.GVN.add_reduce_uses(use);
225  }
226  }
227 
228  return null;
229  }

References com.cliffc.aa.type.TypeFunSig._formals, com.cliffc.aa.node.Node._keep, com.cliffc.aa.node.Node._live, com.cliffc.aa.node.FunNode._sig, com.cliffc.aa.node.Node._uses, com.cliffc.aa.GVNGCM.add_reduce_uses(), com.cliffc.aa.type.Type< T extends Type< T >.ALL, com.cliffc.aa.Env.ALL_CTRL, com.cliffc.aa.type.TypeTuple.at(), com.cliffc.aa.type.TypeMem.DEAD, com.cliffc.aa.node.FunNode.fptr(), com.cliffc.aa.Env.GVN, com.cliffc.aa.node.FunNode.has_unknown_callers(), com.cliffc.aa.node.Node.ideal_reduce(), com.cliffc.aa.node.Node.in(), com.cliffc.aa.node.FunNode.is_forward_ref(), com.cliffc.aa.node.Node.is_prim(), com.cliffc.aa.type.TypeFunSig.make_from_arg(), com.cliffc.aa.node.FunNode.parms(), com.cliffc.aa.node.FunNode.ret(), com.cliffc.aa.node.Node.set_def(), and com.cliffc.aa.Env.XCTRL.

Here is the call graph for this function:

◆ in()

Node com.cliffc.aa.node.Node.in ( int  i)
inherited

Definition at line 126 of file Node.java.

126 { return _defs.at(i); }

References com.cliffc.aa.node.Node._defs.

Referenced by com.cliffc.aa.node.MemJoinNode.add_alias_above(), com.cliffc.aa.node.MemJoinNode.add_alias_below(), com.cliffc.aa.node.UnresolvedNode.add_def_unresolved(), com.cliffc.aa.node.CallNode.add_flow_def_extra(), com.cliffc.aa.node.MProjNode.add_flow_use_extra(), com.cliffc.aa.node.ParmNode.add_flow_use_extra(), com.cliffc.aa.node.LoadNode.add_flow_use_extra(), com.cliffc.aa.node.CallEpiNode.add_flow_use_extra(), com.cliffc.aa.node.MemPrimNode.adr(), com.cliffc.aa.node.LoadNode.adr(), com.cliffc.aa.node.StoreNode.adr(), com.cliffc.aa.node.AssertNode.arg(), com.cliffc.aa.node.NewNode< T extends TypeObj< T >.NewPrimNode< TypeAry >.as_fun(), com.cliffc.aa.node.StoreNode.bad(), com.cliffc.aa.node.LoadNode.bad(), com.cliffc.aa.node.CallEpiNode.call(), com.cliffc.aa.node.MemJoinNode.can_bypass(), com.cliffc.aa.node.FunNode.check_callers(), com.cliffc.aa.node.MemSplitNode.check_split(), com.cliffc.aa.node.CastNode.checked(), com.cliffc.aa.node.MemJoinNode.combine_splits(), com.cliffc.aa.node.RetNode.ctl(), com.cliffc.aa.node.CallNode.ctl(), com.cliffc.aa.node.ThretNode.ctrl(), com.cliffc.aa.node.ScopeNode.ctrl(), com.cliffc.aa.node.FunPtrNode.display(), com.cliffc.aa.node.CallNode.dsp(), com.cliffc.aa.node.Node.dump(), com.cliffc.aa.node.Node.dumprpo(), com.cliffc.aa.node.ScopeNode.early_ctrl(), com.cliffc.aa.node.ScopeNode.early_mem(), com.cliffc.aa.node.ScopeNode.early_val(), com.cliffc.aa.node.ParmNode.err(), com.cliffc.aa.node.PhiNode.err(), com.cliffc.aa.node.MProjNode.escapees(), com.cliffc.aa.node.MrgProjNode.escapees(), com.cliffc.aa.node.IntrinsicNode.escapees(), com.cliffc.aa.node.FunNode.find_body(), com.cliffc.aa.node.LoadNode.find_previous_store(), com.cliffc.aa.node.MemJoinNode.find_sese_head(), com.cliffc.aa.node.NewNode< TypeStruct >.fld(), com.cliffc.aa.node.FP2DispNode.fptr2disp(), com.cliffc.aa.node.ParmNode.fun(), com.cliffc.aa.node.RetNode.fun(), com.cliffc.aa.node.FunNode.has_unknown_callers(), com.cliffc.aa.node.FreshNode.id(), com.cliffc.aa.node.AssertNode.ideal_grow(), com.cliffc.aa.node.StoreNode.ideal_grow(), com.cliffc.aa.node.LoadNode.ideal_grow(), com.cliffc.aa.node.CallNode.ideal_grow(), com.cliffc.aa.node.PrimNode.AndThen.ideal_grow(), com.cliffc.aa.node.PrimNode.OrElse.ideal_grow(), com.cliffc.aa.node.FunNode.ideal_inline(), com.cliffc.aa.node.CastNode.ideal_mono(), com.cliffc.aa.node.LoadNode.ideal_mono(), com.cliffc.aa.node.MemJoinNode.ideal_mono(), com.cliffc.aa.node.FP2DispNode.ideal_reduce(), com.cliffc.aa.node.IfNode.ideal_reduce(), com.cliffc.aa.node.RegionNode.ideal_reduce(), com.cliffc.aa.node.FreshNode.ideal_reduce(), com.cliffc.aa.node.CastNode.ideal_reduce(), com.cliffc.aa.node.ProjNode.ideal_reduce(), com.cliffc.aa.node.ErrNode.ideal_reduce(), com.cliffc.aa.node.MemJoinNode.ideal_reduce(), com.cliffc.aa.node.UnresolvedNode.ideal_reduce(), com.cliffc.aa.node.PhiNode.ideal_reduce(), com.cliffc.aa.node.StoreNode.ideal_reduce(), com.cliffc.aa.node.ParmNode.ideal_reduce(), com.cliffc.aa.node.CallEpiNode.ideal_reduce(), com.cliffc.aa.node.IntrinsicNode.ideal_reduce(), com.cliffc.aa.node.RetNode.ideal_reduce(), com.cliffc.aa.node.ScopeNode.ideal_reduce(), com.cliffc.aa.node.CallNode.ideal_reduce(), com.cliffc.aa.node.FunNode.ideal_reduce(), com.cliffc.aa.node.PrimNode.ConvertStrStr.ideal_reduce(), com.cliffc.aa.node.MemPrimNode.idx(), com.cliffc.aa.node.MemSplitNode.insert_split(), com.cliffc.aa.node.ThunkNode.is_copy(), com.cliffc.aa.node.IfNode.is_copy(), com.cliffc.aa.node.RegionNode.is_copy(), com.cliffc.aa.node.RetNode.is_copy(), com.cliffc.aa.node.CallEpiNode.is_copy(), com.cliffc.aa.node.PrimNode.AndThen.is_copy(), com.cliffc.aa.node.PrimNode.OrElse.is_copy(), com.cliffc.aa.node.CallNode.is_copy(), com.cliffc.aa.node.FunNode.is_copy(), com.cliffc.aa.node.FunPtrNode.is_pure_call(), com.cliffc.aa.node.CallEpiNode.is_pure_call(), com.cliffc.aa.node.CallNode.least_cost(), com.cliffc.aa.node.ThunkNode.live_use(), com.cliffc.aa.node.DefMemNode.live_use(), com.cliffc.aa.node.CastNode.live_use(), com.cliffc.aa.node.MrgProjNode.live_use(), com.cliffc.aa.node.PhiNode.live_use(), com.cliffc.aa.node.CallEpiNode.live_use(), com.cliffc.aa.node.PrimNode.AndThen.live_use(), com.cliffc.aa.node.PrimNode.OrElse.live_use(), com.cliffc.aa.node.MemPrimNode.mem(), com.cliffc.aa.node.MrgProjNode.mem(), com.cliffc.aa.node.ThretNode.mem(), com.cliffc.aa.node.MemSplitNode.mem(), com.cliffc.aa.node.LoadNode.mem(), com.cliffc.aa.node.IntrinsicNode.mem(), com.cliffc.aa.node.RetNode.mem(), com.cliffc.aa.node.AssertNode.mem(), com.cliffc.aa.node.StoreNode.mem(), com.cliffc.aa.node.ScopeNode.mem(), com.cliffc.aa.node.CallNode.mem(), com.cliffc.aa.node.MemJoinNode.MemJoinNode(), com.cliffc.aa.node.FunPtrNode.merge_ref_def(), com.cliffc.aa.node.MemJoinNode.msp(), com.cliffc.aa.node.MrgProjNode.nnn(), com.cliffc.aa.node.FunNode.noinline(), com.cliffc.aa.node.ProjNode.op_prec(), com.cliffc.aa.node.IntrinsicNode.ptr(), com.cliffc.aa.node.ScopeNode.ptr(), com.cliffc.aa.Parse.remove_unknown_callers(), com.cliffc.aa.node.FunPtrNode.ret(), com.cliffc.aa.GVNGCM.retype_mem(), com.cliffc.aa.node.MemPrimNode.rez(), com.cliffc.aa.node.ThretNode.rez(), com.cliffc.aa.node.RetNode.rez(), com.cliffc.aa.node.StoreNode.rez(), com.cliffc.aa.node.ScopeNode.rez(), com.cliffc.aa.node.RetNode.rpc(), com.cliffc.aa.node.CallEpiNode.sane_wiring(), com.cliffc.aa.node.Node.should_con(), com.cliffc.aa.node.FunNode.split_callers(), com.cliffc.aa.node.FunNode.split_size(), com.cliffc.aa.node.RegionNode.stacked_region(), com.cliffc.aa.node.ScopeNode.stk(), com.cliffc.aa.node.TestNode.stx(), com.cliffc.aa.node.CallNode.swap_new(), com.cliffc.aa.node.RetNode.tail_recursive(), com.cliffc.aa.Parse.term(), com.cliffc.aa.node.TestNodeSmall.testCallNodeResolve(), com.cliffc.aa.node.TestNodeSmall.testCallNodeResolve2(), com.cliffc.aa.node.TestNode.testMonotonic(), com.cliffc.aa.node.TestNodeSmall.testUnresolvedAdd(), com.cliffc.aa.node.ThretNode.thunk(), com.cliffc.aa.node.Node.tvar(), com.cliffc.aa.node.ProjNode.unify(), com.cliffc.aa.node.FunNode.unwire(), com.cliffc.aa.node.CallEpiNode.unwire(), com.cliffc.aa.node.Node.val(), com.cliffc.aa.node.ParmNode.valid_args(), com.cliffc.aa.node.DefMemNode.value(), com.cliffc.aa.node.MProjNode.value(), com.cliffc.aa.node.CastNode.value(), com.cliffc.aa.node.IfNode.value(), com.cliffc.aa.node.PhiNode.value(), com.cliffc.aa.node.ParmNode.value(), com.cliffc.aa.node.MrgProjNode.value(), com.cliffc.aa.node.RegionNode.value(), com.cliffc.aa.node.FunPtrNode.value(), com.cliffc.aa.node.PrimNode.EQ_OOP.value(), com.cliffc.aa.node.PrimNode.NE_OOP.value(), com.cliffc.aa.node.FunNode.value(), com.cliffc.aa.node.LoopNode.walk_dom_last(), com.cliffc.aa.node.ThunkNode.walk_dom_last(), com.cliffc.aa.node.RegionNode.walk_dom_last(), com.cliffc.aa.node.Node.walk_dom_last(), com.cliffc.aa.node.CallEpiNode.wire0(), com.cliffc.aa.node.CallEpiNode.wired(), com.cliffc.aa.node.FunPtrNode.xfun(), com.cliffc.aa.node.CProjNode.xstr(), and com.cliffc.aa.node.UnresolvedNode.xstr().

Here is the caller graph for this function:

◆ init0()

static void com.cliffc.aa.node.Node.init0 ( )
staticinherited

Definition at line 70 of file Node.java.

70  {
71  assert LIVE.get(CNT-1) && !LIVE.get(CNT);
73  }

References com.cliffc.aa.node.Node._INIT0_CNT, com.cliffc.aa.node.Node.CNT, and com.cliffc.aa.node.Node.LIVE.

Referenced by com.cliffc.aa.Env.record_for_top_reset2().

Here is the caller graph for this function:

◆ init1()

Node com.cliffc.aa.node.Node.init1 ( )
inherited

Definition at line 708 of file Node.java.

708  {
709  Node x = VALS.get(this);
711  if( x!=null ) { // Hit in GVN table
712  merge(x);
713  kill(); // Kill just-init'd
714  return x; // Return old
715  }
716  _elock();
718  return Env.GVN.add_work_all(this);
719  }

References com.cliffc.aa.node.Node._elock, com.cliffc.aa.node.Node._live, com.cliffc.aa.GVNGCM._opt_mode, com.cliffc.aa.node.Node._val, com.cliffc.aa.GVNGCM.add_work_all(), com.cliffc.aa.type.TypeMem.DEAD, com.cliffc.aa.Env.GVN, com.cliffc.aa.node.Node.kill(), com.cliffc.aa.node.Node.merge(), com.cliffc.aa.GVNGCM.Mode.Opto, com.cliffc.aa.node.Node.VALS, and com.cliffc.aa.node.Node.value().

Referenced by com.cliffc.aa.node.CallEpiNode.wire0().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ insert() [1/2]

Node com.cliffc.aa.node.Node.insert ( int  idx,
Node  n 
)
inherited

Definition at line 165 of file Node.java.

165 { unelock(); _defs.insert(idx,n); if( n!=null ) n._uses.add(this); return this; }

References com.cliffc.aa.node.Node._defs, com.cliffc.aa.node.Node._uses, and com.cliffc.aa.node.Node.unelock().

Referenced by com.cliffc.aa.node.MemJoinNode.add_alias_above(), com.cliffc.aa.node.MemJoinNode.add_alias_below(), com.cliffc.aa.Parse.remove_unknown_callers(), com.cliffc.aa.node.FunNode.split_callers(), com.cliffc.aa.node.Node.subsume(), com.cliffc.aa.node.CallNode.swap_new(), and com.cliffc.aa.node.RetNode.tail_recursive().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ insert() [2/2]

void com.cliffc.aa.node.Node.insert ( Node  nnn)
inherited

Definition at line 191 of file Node.java.

191  {
192  if( _uses._len>0 ) unelock(); // Hacking edges
193  while( _uses._len > 0 ) {
194  Node u = _uses.del(0); // Old use
195  u.replace(this,nnn); // was this now nnn
196  nnn._uses.add(u);
197  }
198  }

References com.cliffc.aa.node.Node._uses, com.cliffc.aa.node.Node.replace(), and com.cliffc.aa.node.Node.unelock().

Here is the call graph for this function:

◆ is_CFG()

◆ is_copy()

Node com.cliffc.aa.node.FunNode.is_copy ( int  idx)

Reimplemented from com.cliffc.aa.node.RegionNode.

Definition at line 918 of file FunNode.java.

918 { return in(0)==this ? in(1) : null; }

References com.cliffc.aa.node.Node.in().

Here is the call graph for this function:

◆ is_dead()

◆ is_forward_ref()

boolean com.cliffc.aa.node.FunNode.is_forward_ref ( )

◆ is_mem()

◆ is_multi_head()

◆ is_multi_tail()

boolean com.cliffc.aa.node.Node.is_multi_tail ( )
privateinherited

Definition at line 355 of file Node.java.

355 { return _op==OP_PARM || _op==OP_PHI || _op==OP_PROJ || _op==OP_CPROJ; }

References com.cliffc.aa.node.Node._op, com.cliffc.aa.node.Node.OP_CPROJ, com.cliffc.aa.node.Node.OP_PARM, com.cliffc.aa.node.Node.OP_PHI, and com.cliffc.aa.node.Node.OP_PROJ.

Referenced by com.cliffc.aa.node.Node.dump(), com.cliffc.aa.node.Node.dumprpo(), and com.cliffc.aa.node.Node.postorder().

Here is the caller graph for this function:

◆ is_prim()

◆ is_pure_call()

Node com.cliffc.aa.node.Node.is_pure_call ( )
packageinherited

Reimplemented in com.cliffc.aa.node.CallNode, com.cliffc.aa.node.CallEpiNode, com.cliffc.aa.node.FunPtrNode, com.cliffc.aa.node.UnresolvedNode, and com.cliffc.aa.node.FreshNode.

Definition at line 834 of file Node.java.

834 { return null; }

Referenced by com.cliffc.aa.node.FreshNode.is_pure_call(), and com.cliffc.aa.node.CallNode.is_pure_call().

Here is the caller graph for this function:

◆ keep() [1/2]

public<N extends Node> N com.cliffc.aa.node.Node.keep ( )
packageinherited

Definition at line 228 of file Node.java.

228 { return keep(1); }

References com.cliffc.aa.node.Node.keep().

Referenced by com.cliffc.aa.Parse._expr(), com.cliffc.aa.Parse._expr_higher(), com.cliffc.aa.Parse._short_circuit_expr(), com.cliffc.aa.GVNGCM.Build< N extends Node >.add(), com.cliffc.aa.node.MemJoinNode.add_alias_above(), com.cliffc.aa.node.MemJoinNode.add_alias_below_new(), com.cliffc.aa.Parse.apply(), com.cliffc.aa.node.ScopeNode.IfScope.check(), com.cliffc.aa.Parse.do_call0(), com.cliffc.aa.Parse.do_exit(), com.cliffc.aa.node.UnresolvedNode.filter(), com.cliffc.aa.node.FunNode.FunNode(), com.cliffc.aa.Parse.go(), com.cliffc.aa.node.CallNode.ideal_reduce(), com.cliffc.aa.Parse.ifex(), com.cliffc.aa.Parse.inc(), com.cliffc.aa.Env.init(), com.cliffc.aa.GVNGCM.Build< N extends Node >.init(), com.cliffc.aa.GVNGCM.iter(), com.cliffc.aa.node.Node.keep(), com.cliffc.aa.Parse.merge_exits(), com.cliffc.aa.node.ScopeNode.ScopeNode(), com.cliffc.aa.node.FunNode.split_callers(), com.cliffc.aa.Parse.stmt(), com.cliffc.aa.Parse.stmts(), com.cliffc.aa.Parse.struct(), com.cliffc.aa.node.Node.subsume(), com.cliffc.aa.node.CallNode.swap_new(), com.cliffc.aa.Parse.term(), com.cliffc.aa.TestLive.testNewObj(), com.cliffc.aa.Env.top_scope(), and com.cliffc.aa.Parse.tuple().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ keep() [2/2]

public<N extends Node> N com.cliffc.aa.node.Node.keep ( int  d)
packageinherited

Definition at line 230 of file Node.java.

230 { _keep+=d; return (N)this; }

References com.cliffc.aa.node.Node._keep.

◆ kill()

Node com.cliffc.aa.node.Node.kill ( )
inherited

Definition at line 211 of file Node.java.

211  {
212  if( is_dead() ) return null;
213  assert _uses._len==0 && _keep==0;
214  // Similar to unelock(), except do not put on any worklist
215  if( _elock ) { _elock = false; Node x = VALS.remove(this); assert x == this; }
216  while( _defs._len > 0 ) unuse(_defs.pop());
217  set_dead(); // officially dead now
218  LIVE.clear(_uid); // Off the LIVE set. CNT cannot roll back unless the GVN worklists are also clear
219  return this;
220  }

References com.cliffc.aa.node.Node._defs, com.cliffc.aa.node.Node._elock, com.cliffc.aa.node.Node._keep, com.cliffc.aa.node.Node._uid, com.cliffc.aa.node.Node._uses, com.cliffc.aa.node.Node.is_dead(), com.cliffc.aa.node.Node.LIVE, com.cliffc.aa.node.Node.set_dead(), com.cliffc.aa.node.Node.unuse(), and com.cliffc.aa.node.Node.VALS.

Referenced by com.cliffc.aa.node.Node.con(), com.cliffc.aa.node.Node.init1(), com.cliffc.aa.Parse.kill(), com.cliffc.aa.node.Node.subsume(), and com.cliffc.aa.node.TestNodeSmall.testCallNodeResolve().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ len()

int com.cliffc.aa.node.Node.len ( )
inherited

Definition at line 125 of file Node.java.

125 { return _defs._len; }

References com.cliffc.aa.node.Node._defs.

Referenced by com.cliffc.aa.node.MemPrimNode.err(), com.cliffc.aa.node.CallNode.ideal_reduce(), and com.cliffc.aa.node.CallEpiNode.value().

Here is the caller graph for this function:

◆ live()

TypeMem com.cliffc.aa.node.Node.live ( GVNGCM.Mode  opt_mode)
inherited

Reimplemented in com.cliffc.aa.node.CallNode, com.cliffc.aa.node.RetNode, com.cliffc.aa.node.MemJoinNode, com.cliffc.aa.node.ScopeNode, com.cliffc.aa.node.FunPtrNode, com.cliffc.aa.node.ConNode< T extends Type >, com.cliffc.aa.node.ThretNode, and com.cliffc.aa.node.StartNode.

Definition at line 478 of file Node.java.

478  {
479  if( _keep>0 ) return all_live();
480  // Compute meet/union of all use livenesses
481  TypeMem live = TypeMem.DEAD; // Start at lattice top
482  for( Node use : _uses ) // Computed across all uses
483  if( use.live_uses() ) {
484  TypeMem ulive = use.live_use(opt_mode, this);
485  live = (TypeMem)live.meet(ulive); // Make alive used fields
486  }
487  assert live==TypeMem.DEAD || live.basic_live()==all_live().basic_live();
488  assert live!=TypeMem.LIVE_BOT || (_val !=Type.CTRL && _val !=Type.XCTRL);
489  return live;
490  }

References com.cliffc.aa.node.Node._keep, com.cliffc.aa.node.Node._uses, com.cliffc.aa.node.Node._val, com.cliffc.aa.node.Node.all_live(), com.cliffc.aa.type.TypeMem.basic_live(), com.cliffc.aa.type.Type< T extends Type< T >.CTRL, com.cliffc.aa.type.TypeMem.DEAD, com.cliffc.aa.type.TypeMem.LIVE_BOT, com.cliffc.aa.type.Type< T extends Type< T >.meet(), and com.cliffc.aa.type.Type< T extends Type< T >.XCTRL.

Referenced by com.cliffc.aa.node.Node.do_flow(), com.cliffc.aa.GVNGCM.gcp(), com.cliffc.aa.node.PhiNode.ideal_reduce(), com.cliffc.aa.node.MemPrimNode.LValueLength.live_use(), com.cliffc.aa.node.LoadNode.live_use(), com.cliffc.aa.node.Node.more_flow(), com.cliffc.aa.node.Node.more_ideal(), com.cliffc.aa.GVNGCM.revalive(), and com.cliffc.aa.node.Node.xliv().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ live_use()

TypeMem com.cliffc.aa.node.RegionNode.live_use ( GVNGCM.Mode  opt_mode,
Node  def 
)
inherited

Reimplemented from com.cliffc.aa.node.Node.

Definition at line 141 of file RegionNode.java.

141 { return TypeMem.ALIVE; }

References com.cliffc.aa.type.TypeMem.ALIVE.

◆ live_uses()

boolean com.cliffc.aa.node.Node.live_uses ( )
inherited

Definition at line 491 of file Node.java.

491  {
492  return _live != TypeMem.DEAD && // Only live uses make more live
493  // And no chance use turns into a constant (which then does not use anything)
494  !(_live.basic_live() && _val.may_be_con() && !is_prim() && err(true)==null &&
495  // FunPtrs still use their Rets, even if constant
496  !(this instanceof FunPtrNode));
497  }

References com.cliffc.aa.node.Node._live, com.cliffc.aa.node.Node._val, com.cliffc.aa.type.TypeMem.basic_live(), com.cliffc.aa.type.TypeMem.DEAD, com.cliffc.aa.node.Node.err(), com.cliffc.aa.node.Node.is_prim(), and com.cliffc.aa.type.Type< T extends Type< T >.may_be_con().

Here is the call graph for this function:

◆ make_new_fun()

FunNode com.cliffc.aa.node.FunNode.make_new_fun ( RetNode  ret,
TypeTuple  new_formals 
)
private

Definition at line 619 of file FunNode.java.

619  {
620  // Make a prototype new function header split from the original.
621  int oldfidx = fidx();
623  fun._bal_close = _bal_close;
624  fun.pop(); // Remove null added by RegionNode, will be added later
625  fun.unkeep(); // Ret will clone and not construct
626  // Renumber the original as well; the original _fidx is now a *class* of 2
627  // fidxs. Each FunNode fidx is only ever a constant, so the original Fun
628  // becomes the other child fidx.
629  int newfidx = _fidx = BitsFun.new_fidx(oldfidx);
630  FUNS.setX(newfidx,this); // Track FunNode by fidx
631  FUNS.clear(oldfidx); // Old fidx no longer refers to a single FunNode
632  ret.set_fidx(newfidx); // Renumber in the old RetNode
633  // Right now, force the type upgrade on old_fptr. old_fptr carries the old
634  // parent FIDX and is on the worklist. Eventually, it comes off and the
635  // value() call lifts to the child fidx. Meanwhile its value can be used
636  // to wire a size-split to itself (e.g. fib()), which defeats the purpose
637  // of a size-split (single caller only, so inlines).
638  for( Node old_fptr : ret._uses )
639  if( old_fptr instanceof FunPtrNode ) // Can be many old funptrs with different displays
640  old_fptr.xval(); // Upgrade FIDX
641  Env.GVN.add_flow(ret);
642  Env.GVN.add_flow(this);
643  Env.GVN.add_flow_uses(this);
644  return fun;
645  }

References com.cliffc.aa.type.TypeFunSig._args, com.cliffc.aa.node.FunNode._bal_close, com.cliffc.aa.node.FunNode._fidx, com.cliffc.aa.node.FunNode._name, com.cliffc.aa.node.FunNode._op_prec, com.cliffc.aa.type.TypeFunSig._ret, com.cliffc.aa.node.FunNode._sig, com.cliffc.aa.node.FunNode._thunk_rhs, com.cliffc.aa.node.Node._uses, com.cliffc.aa.GVNGCM.add_flow(), com.cliffc.aa.GVNGCM.add_flow_uses(), com.cliffc.aa.node.FunNode.fidx(), com.cliffc.aa.node.FunNode.FunNode(), com.cliffc.aa.node.FunNode.FUNS, com.cliffc.aa.Env.GVN, com.cliffc.aa.type.TypeFunSig.make(), com.cliffc.aa.type.BitsFun.new_fidx(), com.cliffc.aa.node.Node.pop(), com.cliffc.aa.node.FunNode.ret(), com.cliffc.aa.node.RetNode.set_fidx(), com.cliffc.aa.node.Node.unkeep(), and com.cliffc.aa.node.Node.xval().

Referenced by com.cliffc.aa.node.FunNode.ideal_inline().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ merge()

Node com.cliffc.aa.node.Node.merge ( Node  x)
privateinherited

Definition at line 702 of file Node.java.

702  {
703  x._live = (TypeMem)x._live.meet(_live);
704  return Env.GVN.add_flow(x);
705  }

References com.cliffc.aa.node.Node._live, com.cliffc.aa.GVNGCM.add_flow(), com.cliffc.aa.Env.GVN, and com.cliffc.aa.type.Type< T extends Type< T >.meet().

Referenced by com.cliffc.aa.node.Node._do_reduce(), and com.cliffc.aa.node.Node.init1().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ more_flow() [1/2]

final int com.cliffc.aa.node.Node.more_flow ( boolean  lifting)
inherited

Definition at line 747 of file Node.java.

747 { FLOW_VISIT.clear(); return more_flow(lifting,0); }

References com.cliffc.aa.node.Node.FLOW_VISIT, and com.cliffc.aa.node.Node.more_flow().

Referenced by com.cliffc.aa.GVNGCM.check_and_wire(), com.cliffc.aa.GVNGCM.gcp(), com.cliffc.aa.node.Node.more_flow(), and com.cliffc.aa.GVNGCM.remove_ambi().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ more_flow() [2/2]

int com.cliffc.aa.node.Node.more_flow ( boolean  lifting,
int  errs 
)
privateinherited

Definition at line 748 of file Node.java.

748  {
749  if( FLOW_VISIT.tset(_uid) ) return errs; // Been there, done that
750  if( Env.GVN.on_dead(this) ) return errs; // Do not check dying nodes
751  // Check for only forwards flow, and if possible then also on worklist
752  Type oval= _val, nval = value(Env.GVN._opt_mode);
753  TypeMem oliv=_live, nliv = live (Env.GVN._opt_mode);
754  boolean hm = false;
755  if( nval != oval || nliv != oliv || hm ) {
756  boolean ok = lifting
757  ? nval.isa(oval) && nliv.isa(oliv)
758  : oval.isa(nval) && oliv.isa(nliv);
759  if( !ok || (!Env.GVN.on_flow(this) && !Env.GVN.on_dead(this) && _keep==0) ) { // Still-to-be-computed?
760  FLOW_VISIT.clear(_uid); // Pop-frame & re-run in debugger
761  System.err.println(dump(0,new SB(),true)); // Rolling backwards not allowed
762  errs++;
763  }
764  }
765  for( Node def : _defs ) if( def != null ) errs = def.more_flow(lifting,errs);
766  for( Node use : _uses ) if( use != null ) errs = use.more_flow(lifting,errs);
767  return errs;
768  }

References com.cliffc.aa.node.Node._defs, com.cliffc.aa.node.Node._keep, com.cliffc.aa.node.Node._live, com.cliffc.aa.GVNGCM._opt_mode, com.cliffc.aa.node.Node._uid, com.cliffc.aa.node.Node._uses, com.cliffc.aa.node.Node._val, com.cliffc.aa.node.Node.dump(), com.cliffc.aa.node.Node.FLOW_VISIT, com.cliffc.aa.Env.GVN, com.cliffc.aa.type.Type< T extends Type< T >.isa(), com.cliffc.aa.node.Node.live(), com.cliffc.aa.GVNGCM.on_dead(), com.cliffc.aa.GVNGCM.on_flow(), com.cliffc.aa.util.VBitSet.tset(), and com.cliffc.aa.node.Node.value().

Here is the call graph for this function:

◆ more_ideal()

final boolean com.cliffc.aa.node.Node.more_ideal ( VBitSet  bs)
inherited

Definition at line 722 of file Node.java.

722  {
723  if( bs.tset(_uid) ) return false; // Been there, done that
724  if( _keep == 0 && _live.is_live() ) { // Only non-keeps, which is just top-level scope and prims
725  Type t = value(Env.GVN._opt_mode);
726  if( _val != t )
727  return true; // Found a value improvement
729  if( _live != live )
730  return true; // Found a liveness improvement
731  Node x;
732  x = do_reduce(); if( x != null )
733  return true; // Found an ideal call
734  x = do_mono(); if( x != null )
735  return true; // Found an ideal call
736  x = do_grow(); if( x != null )
737  return true; // Found an ideal call
738  if( this instanceof FunNode ) ((FunNode)this).ideal_inline(true);
739  }
740  for( Node def : _defs ) if( def != null && def.more_ideal(bs) ) return true;
741  for( Node use : _uses ) if( use != null && use.more_ideal(bs) ) return true;
742  return false;
743  }

References com.cliffc.aa.node.Node._defs, com.cliffc.aa.node.Node._keep, com.cliffc.aa.node.Node._live, com.cliffc.aa.GVNGCM._opt_mode, com.cliffc.aa.node.Node._uid, com.cliffc.aa.node.Node._uses, com.cliffc.aa.node.Node._val, com.cliffc.aa.node.Node.do_grow(), com.cliffc.aa.node.Node.do_mono(), com.cliffc.aa.node.Node.do_reduce(), com.cliffc.aa.Env.GVN, com.cliffc.aa.type.TypeMem.is_live(), com.cliffc.aa.node.Node.live(), com.cliffc.aa.util.VBitSet.tset(), and com.cliffc.aa.node.Node.value().

Referenced by com.cliffc.aa.GVNGCM.iter().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ name() [1/4]

String com.cliffc.aa.node.FunNode.name ( )
package

Definition at line 114 of file FunNode.java.

114 { return name(true); }

References com.cliffc.aa.node.FunNode.name().

Referenced by com.cliffc.aa.node.FunNode.FunNode(), com.cliffc.aa.node.FunNode.name(), com.cliffc.aa.node.FunNode.names(), com.cliffc.aa.node.FunNode.noinline(), and com.cliffc.aa.node.FunNode.xstr().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ name() [2/4]

String com.cliffc.aa.node.FunNode.name ( boolean  debug)

Definition at line 115 of file FunNode.java.

115  {
116  String name = _name;
117  if( name==null ) {
118  FunPtrNode fptr = fptr();
119  name=fptr==null ? null : fptr._name;
120  }
121  return name(name,_bal_close,fidx(),_op_prec,is_forward_ref(),debug);
122  }

References com.cliffc.aa.node.FunNode._bal_close, com.cliffc.aa.node.FunPtrNode._name, com.cliffc.aa.node.FunNode._name, com.cliffc.aa.node.FunNode._op_prec, com.cliffc.aa.node.FunNode.fidx(), com.cliffc.aa.node.FunNode.fptr(), com.cliffc.aa.node.FunNode.is_forward_ref(), and com.cliffc.aa.node.FunNode.name().

Here is the call graph for this function:

◆ name() [3/4]

static String com.cliffc.aa.node.FunNode.name ( int  fidx,
boolean  debug 
)
staticprivate

Definition at line 109 of file FunNode.java.

109  {
110  FunNode fun = find_fidx(fidx);
111  return fun==null ? name(null,null,fidx,-1,false,debug) : fun.name(debug);
112  }

References com.cliffc.aa.node.FunNode.fidx(), com.cliffc.aa.node.FunNode.find_fidx(), and com.cliffc.aa.node.FunNode.name().

Referenced by com.cliffc.aa.node.Node._header(), com.cliffc.aa.node.FunNode.name(), com.cliffc.aa.node.RetNode.xstr(), and com.cliffc.aa.node.FunPtrNode.xstr().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ name() [4/4]

static String com.cliffc.aa.node.FunNode.name ( String  name,
String  bal,
int  fidx,
int  op_prec,
boolean  fref,
boolean  debug 
)
staticpackage

Definition at line 123 of file FunNode.java.

123  {
124  if( op_prec >= 0 && name != null ) name = '{'+name+(bal==null?"":bal)+'}'; // Primitives wrap
125  if( name==null ) name="";
126  if( debug ) name = name + "["+fidx+"]"; // FIDX in debug
127  return fref ? "?"+name : name; // Leading '?'
128  }

References com.cliffc.aa.node.FunNode.fidx(), com.cliffc.aa.node.FunNode.name(), and com.cliffc.aa.node.Node.op_prec().

Here is the call graph for this function:

◆ names()

static SB com.cliffc.aa.node.FunNode.names ( BitsFun  fidxs,
SB  sb,
boolean  debug 
)
static

Definition at line 131 of file FunNode.java.

131  {
132  int fidx = fidxs.abit();
133  if( fidx >= 0 ) return sb.p(name(fidx,debug));
134  if( fidxs==BitsFun.EMPTY ) return sb.p("[]");
135  // See if this is just one common name, common for overloaded functions
136  String s=null;
137  boolean prim=false;
138  for( Integer ii : fidxs ) {
139  FunNode fun = find_fidx(ii);
140  if( fun!=null ) {
141  prim |= fun._op_prec >= 0;
142  if( fun._name != null ) s = fun._name;
143  else if( !fun.is_dead() )
144  for( Node fptr : fun.ret()._uses ) // For all displays for this fun
145  if( fptr instanceof FunPtrNode ) {
146  String name = ((FunPtrNode)fptr)._name; // Get debug name
147  if( s==null ) s=name; // Capture debug name
148  else if( !Util.eq(s,name) ) // Same name is OK
149  { s=null; break; } // Too many different names
150  }
151  if( s==null ) break; // Unnamed fidx
152  }
153  }
154  if( s!=null )
155  if( prim ) sb.p('{').p(s).p('}'); else sb.p(s);
156  // Make a list of the fidxs
157  if( debug ) {
158  int cnt = 0;
159  sb.p('[');
160  for( Integer ii : fidxs ) {
161  if( ++cnt == 5 ) break;
162  sb.p(ii).p(fidxs.above_center() ? '+' : ',');
163  }
164  if( cnt >= 5 ) sb.p("...");
165  else sb.unchar();
166  sb.p(']');
167  }
168  return sb;
169  }

References com.cliffc.aa.node.FunNode._name, com.cliffc.aa.node.FunNode._op_prec, com.cliffc.aa.node.Node._uses, com.cliffc.aa.type.Bits< B extends Bits< B >.abit(), com.cliffc.aa.type.BitsFun.EMPTY, com.cliffc.aa.util.Util.eq(), com.cliffc.aa.node.FunNode.fidx(), com.cliffc.aa.node.FunNode.find_fidx(), com.cliffc.aa.node.FunNode.fptr(), com.cliffc.aa.node.Node.is_dead(), com.cliffc.aa.node.FunNode.name(), com.cliffc.aa.util.SB.p(), com.cliffc.aa.node.FunNode.ret(), and com.cliffc.aa.util.SB.unchar().

Referenced by com.cliffc.aa.type.TypeFunPtr.names().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ nargs()

int com.cliffc.aa.node.FunNode.nargs ( )

Definition at line 190 of file FunNode.java.

190 { return _sig.nargs(); }

References com.cliffc.aa.node.FunNode._sig, and com.cliffc.aa.type.TypeFunSig.nargs().

Referenced by com.cliffc.aa.node.ParmNode.err(), com.cliffc.aa.node.CallEpiNode.ideal_reduce(), com.cliffc.aa.node.CallNode.least_cost(), com.cliffc.aa.node.FunNode.parms(), com.cliffc.aa.node.RetNode.RetNode(), com.cliffc.aa.node.FunNode.split_size(), and com.cliffc.aa.Parse.term().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ new_tvar()

TV2 com.cliffc.aa.node.Node.new_tvar ( String  alloc_site)
inherited

Definition at line 101 of file Node.java.

101 { return TV2.make_leaf(this,alloc_site); }

References com.cliffc.aa.tvar.TV2.make_leaf().

Referenced by com.cliffc.aa.node.Node.copy(), and com.cliffc.aa.node.Node.Node().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ newuid()

int com.cliffc.aa.node.Node.newuid ( )
packageinherited

Definition at line 61 of file Node.java.

61  {
62  assert CNT < 100000 : "infinite node create loop";
63  if( CNT==AA.UID )
64  System.out.print("");
65  LIVE.set(CNT);
66  return CNT++;
67  }

References com.cliffc.aa.node.Node.CNT, com.cliffc.aa.node.Node.LIVE, and com.cliffc.aa.AA.UID.

Referenced by com.cliffc.aa.node.Node.copy(), and com.cliffc.aa.node.Node.Node().

Here is the caller graph for this function:

◆ noinline()

boolean com.cliffc.aa.node.FunNode.noinline ( )

Definition at line 179 of file FunNode.java.

179 { return in(0)==null && name(false).startsWith("noinline"); }

References com.cliffc.aa.node.Node.in(), and com.cliffc.aa.node.FunNode.name().

Referenced by com.cliffc.aa.node.FunNode.ideal_inline(), com.cliffc.aa.node.PhiNode.ideal_reduce(), com.cliffc.aa.node.CallEpiNode.ideal_reduce(), and com.cliffc.aa.node.FunPtrNode.is_pure_call().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ op_prec()

◆ parm()

ParmNode com.cliffc.aa.node.FunNode.parm ( int  idx)

Definition at line 887 of file FunNode.java.

887  {
888  for( Node use : _uses )
889  if( use instanceof ParmNode && ((ParmNode)use)._idx==idx )
890  return (ParmNode)use;
891  return null;
892  }

References com.cliffc.aa.node.Node._uses.

Referenced by com.cliffc.aa.node.RetNode.check_phi_type(), com.cliffc.aa.node.ParmNode.err(), com.cliffc.aa.node.CallNode.err(), com.cliffc.aa.node.FunNode.find_type_split(), com.cliffc.aa.node.FunNode.find_type_split_index(), com.cliffc.aa.node.FunNode.split_callers(), com.cliffc.aa.node.FunNode.split_size(), com.cliffc.aa.node.RetNode.tail_recursive(), and com.cliffc.aa.node.ParmNode.value().

Here is the caller graph for this function:

◆ parms()

Node [] com.cliffc.aa.node.FunNode.parms ( )

Definition at line 893 of file FunNode.java.

893  {
894  Node[] parms = new Node[nargs()];
895  for( Node use : _uses )
896  if( use instanceof ParmNode )
897  parms[((ParmNode)use)._idx] = use;
898  return parms;
899  }

References com.cliffc.aa.node.Node._uses, and com.cliffc.aa.node.FunNode.nargs().

Referenced by com.cliffc.aa.node.FunNode.find_type_split(), com.cliffc.aa.node.FunNode.find_type_split_index(), com.cliffc.aa.node.FunNode.ideal_inline(), com.cliffc.aa.node.FunNode.ideal_reduce(), com.cliffc.aa.node.FunNode.split_size(), and com.cliffc.aa.node.FunNode.type_special().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ pop()

Node com.cliffc.aa.node.Node.pop ( )
inherited

Definition at line 174 of file Node.java.

174 { unelock(); Node n = _defs.pop(); unuse(n); return n; }

References com.cliffc.aa.node.Node._defs, com.cliffc.aa.node.Node.unelock(), and com.cliffc.aa.node.Node.unuse().

Referenced by com.cliffc.aa.node.ScopeNode.early_kill(), com.cliffc.aa.node.PrimNode.AndThen.ideal_grow(), com.cliffc.aa.node.PrimNode.OrElse.ideal_grow(), com.cliffc.aa.node.UnresolvedNode.ideal_reduce(), com.cliffc.aa.node.CallNode.ideal_reduce(), com.cliffc.aa.node.NewNode< TypeStruct >.kill2(), com.cliffc.aa.node.FunNode.make_new_fun(), com.cliffc.aa.node.CallEpiNode.set_is_copy(), and com.cliffc.aa.node.FunNode.split_callers().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ postorder()

void com.cliffc.aa.node.Node.postorder ( Ary< Node nodes,
VBitSet  bs 
)
privateinherited

Definition at line 383 of file Node.java.

383  {
384  if( bs.tset(_uid) ) return;
385  // If CFG, walk the CFG first. Do not walk thru Returns (into Calls) as
386  // this breaks up the whole- functions-at-once.
387  if( is_CFG() && _op!=OP_RET ) {
388  // Walk any CProj first.
389  for( Node use : _uses )
390  if( use._op == OP_CPROJ )
391  use.postorder(nodes,bs);
392  // Walk the CFG, walking CallEpis last
393  for( Node use : _uses )
394  if( !(use instanceof CallEpiNode) && use.is_CFG() )
395  use.postorder(nodes,bs);
396  for( Node use : _uses )
397  if( (use instanceof CallEpiNode) && use.is_CFG() )
398  use.postorder(nodes,bs);
399  }
400 
401  // Walk the rest (especially data). Since visit bits are set on the CFGs
402  // its OK to walk them also. Calls are special, since their Proj's feed
403  // into a Fun's Parms. We want the Fun to walk its own Parms, in order so
404  // ignore these edges. Since the Parms are all reachable from the Fun they
405  // get walked eventually.
406  if( _op != OP_CALL && _op!=OP_RET ) {
407  if( _op!=OP_SPLIT || _uses._len!=2 )
408  for( Node use : _uses )
409  use.postorder(nodes,bs);
410  else { // For MemSplit, walk the "busy" side first
411  Node p0 = _uses.at(0), p1 = _uses.at(1);
412  if( ((ProjNode)p0)._idx==1 ) { p0=p1; p1=_uses.at(0); } // Swap
413  p1.postorder(nodes,bs);
414  p0.postorder(nodes,bs);
415  }
416  }
417 
418  // Slight PO tweak: heads and tails together.
419  if( is_multi_head() )
420  for( Node use : _uses )
421  if( use.is_multi_tail() )
422  nodes.push(use);
423  if( !is_multi_tail() ) nodes.push(this);
424  }

References com.cliffc.aa.node.Node._op, com.cliffc.aa.node.Node._uid, com.cliffc.aa.node.Node._uses, com.cliffc.aa.node.Node.is_CFG(), com.cliffc.aa.node.Node.is_multi_head(), com.cliffc.aa.node.Node.is_multi_tail(), com.cliffc.aa.node.Node.OP_CALL, com.cliffc.aa.node.Node.OP_CPROJ, com.cliffc.aa.node.Node.OP_RET, com.cliffc.aa.node.Node.OP_SPLIT, com.cliffc.aa.node.Node.postorder(), com.cliffc.aa.util.Ary< E >.push(), and com.cliffc.aa.util.VBitSet.tset().

Referenced by com.cliffc.aa.node.Node.dumprpo(), and com.cliffc.aa.node.Node.postorder().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ remove()

Node com.cliffc.aa.node.Node.remove ( int  idx)
inherited

Definition at line 176 of file Node.java.

176 { unelock(); return unuse(_defs.remove(idx)); }

References com.cliffc.aa.node.Node._defs, com.cliffc.aa.node.Node.unelock(), and com.cliffc.aa.node.Node.unuse().

Referenced by com.cliffc.aa.node.RegionNode.stacked_region().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ replace()

void com.cliffc.aa.node.Node.replace ( Node  old,
Node  nnn 
)
inherited

Definition at line 163 of file Node.java.

163 { unelock(); _defs.replace(old,nnn); }

References com.cliffc.aa.node.Node._defs, and com.cliffc.aa.node.Node.unelock().

Referenced by com.cliffc.aa.node.Node.insert().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ reset()

static void com.cliffc.aa.node.FunNode.reset ( )
static

Definition at line 100 of file FunNode.java.

100 { FUNS.clear(); _must_inline=0; }

References com.cliffc.aa.node.FunNode._must_inline, and com.cliffc.aa.node.FunNode.FUNS.

Referenced by com.cliffc.aa.Env.top_reset().

Here is the caller graph for this function:

◆ reset_to_init0()

static void com.cliffc.aa.node.Node.reset_to_init0 ( )
staticinherited

Definition at line 77 of file Node.java.

77  {
78  CNT = 0;
79  LIVE.clear();
80  VALS.clear();
81  }

References com.cliffc.aa.node.Node.CNT, com.cliffc.aa.node.Node.LIVE, and com.cliffc.aa.node.Node.VALS.

Referenced by com.cliffc.aa.Env.top_reset().

Here is the caller graph for this function:

◆ ret()

RetNode com.cliffc.aa.node.FunNode.ret ( )

Definition at line 900 of file FunNode.java.

900  {
901  if( is_dead() ) return null;
902  for( Node use : _uses )
903  if( use instanceof RetNode && use._defs._len==5 && !((RetNode)use).is_copy() && ((RetNode)use).fun()==this )
904  return (RetNode)use;
905  return null;
906  }

References com.cliffc.aa.node.Node._defs, com.cliffc.aa.node.Node._uses, and com.cliffc.aa.node.Node.is_dead().

Referenced by com.cliffc.aa.node.CallEpiNode.check_and_wire(), com.cliffc.aa.node.FunNode.check_callers(), com.cliffc.aa.node.Node.con(), com.cliffc.aa.node.CallNode.err(), com.cliffc.aa.node.FunNode.find_body(), com.cliffc.aa.node.FunNode.fptr(), com.cliffc.aa.node.CallNode.get_fptr(), com.cliffc.aa.node.FunNode.ideal_inline(), com.cliffc.aa.node.CallEpiNode.ideal_reduce(), com.cliffc.aa.node.CallNode.ideal_reduce(), com.cliffc.aa.node.FunNode.ideal_reduce(), com.cliffc.aa.node.FunNode.make_new_fun(), com.cliffc.aa.node.FunNode.names(), com.cliffc.aa.node.TestNode.testMonotonic(), and com.cliffc.aa.node.FunNode.unwire().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ roll_back_CNT()

static void com.cliffc.aa.node.Node.roll_back_CNT ( )
staticinherited

Definition at line 222 of file Node.java.

222 { while( !LIVE.get(CNT-1) ) CNT--; }

References com.cliffc.aa.node.Node.CNT, and com.cliffc.aa.node.Node.LIVE.

Referenced by com.cliffc.aa.GVNGCM.iter().

Here is the caller graph for this function:

◆ set_dead()

void com.cliffc.aa.node.Node.set_dead ( )
inherited

Definition at line 821 of file Node.java.

821 { _defs = _uses = null; } // TODO: Poor-mans indication of a dead node, probably needs to recycle these...

References com.cliffc.aa.node.Node._defs, and com.cliffc.aa.node.Node._uses.

Referenced by com.cliffc.aa.node.Node.kill().

Here is the caller graph for this function:

◆ set_def()

Node com.cliffc.aa.node.Node.set_def ( int  idx,
Node  n 
)
inherited

Definition at line 154 of file Node.java.

154  {
155  unelock();
156  Node old = _defs.at(idx); // Get old value
157  // Add edge to new guy before deleting old, in case old goes dead and
158  // recursively makes new guy go dead also
159  if( (_defs._es[idx] = n) != null ) n._uses.add(this);
160  return unuse(old);
161  }

References com.cliffc.aa.node.Node._defs, com.cliffc.aa.node.Node._uses, com.cliffc.aa.node.Node.unelock(), and com.cliffc.aa.node.Node.unuse().

Referenced by com.cliffc.aa.node.CallNode._ideal_grow(), com.cliffc.aa.node.MemJoinNode.add_alias_above(), com.cliffc.aa.node.MemJoinNode.add_alias_below(), com.cliffc.aa.node.MemJoinNode.combine_splits(), com.cliffc.aa.Parse.do_exit(), com.cliffc.aa.node.PrimNode.AndThen.ideal_grow(), com.cliffc.aa.node.PrimNode.OrElse.ideal_grow(), com.cliffc.aa.node.CastNode.ideal_mono(), com.cliffc.aa.node.FP2DispNode.ideal_reduce(), com.cliffc.aa.node.IfNode.ideal_reduce(), com.cliffc.aa.node.RegionNode.ideal_reduce(), com.cliffc.aa.node.FreshNode.ideal_reduce(), com.cliffc.aa.node.CastNode.ideal_reduce(), com.cliffc.aa.node.ErrNode.ideal_reduce(), com.cliffc.aa.node.UnresolvedNode.ideal_reduce(), com.cliffc.aa.node.RetNode.ideal_reduce(), com.cliffc.aa.node.FunPtrNode.ideal_reduce(), com.cliffc.aa.node.CallNode.ideal_reduce(), com.cliffc.aa.node.FunNode.ideal_reduce(), com.cliffc.aa.node.MemSplitNode.insert_split(), com.cliffc.aa.node.DefMemNode.make_mem(), com.cliffc.aa.node.FunPtrNode.merge_ref_def(), com.cliffc.aa.node.NewObjNode.promote_forward(), com.cliffc.aa.Parse.remove_unknown_callers(), com.cliffc.aa.node.ScopeNode.replace_mem(), com.cliffc.aa.node.CallNode.set_arg(), com.cliffc.aa.node.ScopeNode.set_ctrl(), com.cliffc.aa.node.CallNode.set_dsp(), com.cliffc.aa.node.CallNode.set_fdx(), com.cliffc.aa.node.FunNode.set_is_copy(), com.cliffc.aa.node.LoadNode.set_mem(), com.cliffc.aa.node.ScopeNode.set_mem(), com.cliffc.aa.node.CallNode.set_mem(), com.cliffc.aa.node.ScopeNode.set_ptr(), com.cliffc.aa.node.ScopeNode.set_rez(), com.cliffc.aa.node.FunNode.split_callers(), com.cliffc.aa.node.CallNode.swap_new(), com.cliffc.aa.node.RetNode.tail_recursive(), and com.cliffc.aa.node.CallEpiNode.unwire().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ set_is_copy()

void com.cliffc.aa.node.FunNode.set_is_copy ( )
package

Definition at line 919 of file FunNode.java.

919 { set_def(0,this); Env.GVN.add_reduce_uses(this); }

References com.cliffc.aa.GVNGCM.add_reduce_uses(), com.cliffc.aa.Env.GVN, and com.cliffc.aa.node.Node.set_def().

Referenced by com.cliffc.aa.node.CallEpiNode.ideal_reduce().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ set_nongens()

void com.cliffc.aa.node.FunNode.set_nongens ( TV2[]  nongens)

Definition at line 192 of file FunNode.java.

192 { _nongens = nongens; }

References com.cliffc.aa.node.FunNode._nongens.

Referenced by com.cliffc.aa.Parse.func().

Here is the caller graph for this function:

◆ sharptr()

Type com.cliffc.aa.node.Node.sharptr ( Node  mem)
inherited

Definition at line 855 of file Node.java.

855 { return mem._val.sharptr(_val); }

References com.cliffc.aa.node.Node._val, and com.cliffc.aa.type.Type< T extends Type< T >.sharptr().

Referenced by com.cliffc.aa.node.ParmNode.err(), com.cliffc.aa.node.CallNode.err(), com.cliffc.aa.Parse.get_display_ptr(), com.cliffc.aa.node.AssertNode.ideal_reduce(), com.cliffc.aa.node.FunNode.split_size(), com.cliffc.aa.node.ParmNode.valid_args(), com.cliffc.aa.node.ParmNode.value(), com.cliffc.aa.node.MemPrimNode.LValueLength.value(), com.cliffc.aa.node.AssertNode.value(), and com.cliffc.aa.node.MemPrimNode.LValueRead.value().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ should_con()

boolean com.cliffc.aa.node.Node.should_con ( Type  t)
inherited

Definition at line 651 of file Node.java.

651  {
652  if( this instanceof ConNode || // Already a constant
653  (this instanceof FunPtrNode && _val.is_con()) || // Already a constant
654  this instanceof ErrNode || // Never touch an ErrNode
655  this instanceof FreshNode ||// These modify the TVars but not the constant flows
656  is_prim() ) // Never touch a Primitive
657  return false; // Already a constant, or never touch an ErrNode
658  // Constant argument to call: keep for call resolution.
659  // Call can always inline to fold constant.
660  if( this instanceof ProjNode && in(0) instanceof CallNode && ((ProjNode)this)._idx>0 )
661  return false;
662  // Is in-error; do not remove the error.
663  if( err(true) != null )
664  return false;
665  // Is a constant
666  return t.is_con();
667  }

References com.cliffc.aa.node.Node._val, com.cliffc.aa.node.Node.err(), com.cliffc.aa.node.Node.in(), com.cliffc.aa.type.Type< T extends Type< T >.is_con(), and com.cliffc.aa.node.Node.is_prim().

Referenced by com.cliffc.aa.node.Node._do_reduce(), and com.cliffc.aa.node.Node.walk_opt().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ split_callers()

void com.cliffc.aa.node.FunNode.split_callers ( RetNode  oldret,
FunNode  fun,
Ary< Node body,
int  path 
)
private

Definition at line 661 of file FunNode.java.

661  {
662  // Unwire this function and collect unwired calls. Leave the
663  // unknown-caller, if any.
664  CallNode path_call = path < 0 ? null : (CallNode)in(path).in(0);
665  Ary<CallEpiNode> unwireds = new Ary<>(new CallEpiNode[1],0);
666  final int zlen = has_unknown_callers() ? 2 : 1;
667  while( _defs._len > zlen ) { // For all paths (except unknown-caller)
668  Node ceproj = pop();
669  CallNode call = (CallNode)ceproj.in(0); // Unhook without removal
670  CallEpiNode cepi = call.cepi();
671  cepi.del(cepi._defs.find(oldret));
672  unwireds.add(cepi);
673  Env.GVN.add_reduce(cepi); // Visit for inlining later
674  // And remove path from all Parms
675  for( Node parm : _uses )
676  if( parm instanceof ParmNode )
677  parm.pop();
678  }
679 
680  // Map from old to cloned function body
681  HashMap<Node,Node> map = new HashMap<>();
682  // Collect aliases that are cloning.
683  BitSet aliases = new BitSet();
684  // Clone the function body
685  map.put(this,fun);
686  for( Node n : body ) {
687  if( n==this ) continue; // Already cloned the FunNode
688  int old_alias = n instanceof NewNode ? ((NewNode)n)._alias : -1;
689  Node c = n.copy(false); // Make a blank copy with no edges
690  map.put(n,c); // Map from old to new
691  if( old_alias != -1 ) // Was a NewNode?
692  aliases.set(old_alias); // Record old alias before copy/split
693  // Slightly better error message when cloning constructors
694  if( path > 0 ) {
695  if( n instanceof IntrinsicNode ) ((IntrinsicNode)c)._badargs = path_call._badargs[1];
696  if( n instanceof MemPrimNode ) (( MemPrimNode)c)._badargs = path_call._badargs;
697  }
698  }
699 
700  // Fill in edges. New Nodes point to New instead of Old; everybody
701  // shares old nodes not in the function (and not cloned).
702  for( Node n : map.keySet() ) {
703  Node c = map.get(n);
704  assert c._defs._len==0;
705  for( Node def : n._defs ) {
706  Node newdef = map.get(def);// Map old to new
707  c.add_def(newdef==null ? def : newdef);
708  }
709  }
710 
711  // Keep around the old body, even as the FunPtrs get shuffled from Call to Call
712  for( Node use : oldret._uses ) if( use instanceof FunPtrNode ) use.keep();
713 
714  // Collect the old/new returns and funptrs and add to map also. The old
715  // Ret has a set (not 1!) of FunPtrs, one per unique Display.
716  RetNode newret = (RetNode)map.get(oldret);
717  newret._fidx = fun.fidx();
718  if( path < 0 ) { // Type split
719  for( Node use : oldret._uses )
720  if( use instanceof FunPtrNode ) { // Old-return FunPtrs; varies by Display & by internal/external
721  // Make an Unresolved choice of the old and new functions, to be used
722  // by everything except mutually recursive calls; including
723  // external/top-level calls, storing to memory, external merges, etc.
724  Node old_funptr = use;
725  Node new_funptr = map.get(old_funptr);
726  new_funptr.insert(old_funptr);
727  new_funptr.xval(); // Build type so Unresolved can compute type
728  UnresolvedNode new_unr = new UnresolvedNode(null,new_funptr);
729  old_funptr.insert(new_unr);
730  new_unr.add_def(old_funptr);
731  new_unr._val = new_unr.value(GVNGCM.Mode.PesiNoCG);
732  }
733  } else { // Path split
734  Node old_funptr = fptr(); // Find the funptr for the path split
735  Node new_funptr = map.get(old_funptr);
736  new_funptr.insert(old_funptr); // Make cloned recursive calls, call the old version not the new version
737  TypeFunPtr ofptr = (TypeFunPtr) old_funptr._val;
738  path_call.set_fdx(new_funptr); // Force new_funptr, will re-wire later
739  TypeFunPtr nfptr = TypeFunPtr.make(BitsFun.make0(newret._fidx),ofptr._nargs,ofptr._disp);
740  path_call._val = CallNode.set_ttfp((TypeTuple) path_call._val,nfptr);
741  for( Node use : oldret._uses ) // Check extra FunPtrs are dead
742  if( use instanceof FunPtrNode ) Env.GVN.add_dead(map.get(use));
743 
744  } // Else other funptr/displays on unrelated path, dead, can be ignored
745 
746  // For all aliases split in this pass, update in-node both old and new.
747  // This changes their hash, and afterwards the keys cannot be looked up.
748  for( Map.Entry<Node,Node> e : map.entrySet() )
749  if( e.getKey() instanceof MemSplitNode )
750  ((MemSplitNode)e.getKey()).split_alias(e.getValue(),aliases);
751 
752  // Wired Call Handling:
753  if( has_unknown_callers() ) { // Not called by any unknown caller
754  if( path < 0 ) { // Type Split
755  // Change the unknown caller parm types to match the new sig. Default
756  // memory includes the other half of alias splits, which might be
757  // passed in from recursive calls.
758  for( Node p : fun._uses )
759  if( p instanceof ParmNode ) {
760  ParmNode parm = (ParmNode)p;
761  Node defx;
762  if( parm._idx==0 ) defx = Node.con(TypeRPC.ALL_CALL);
763  else if( parm._idx==MEM_IDX ) defx = Env.DEFMEM;
764  else {
765  Type tx = fun.formal(parm._idx).simple_ptr();
766  defx = Node.con(tx);
767  }
768  parm.set_def(1,defx);
769  }
770  } else // Path Split
771  fun.set_def(1,Env.XCTRL);
772  }
773 
774  // Put all new nodes into the GVN tables and worklist
775  boolean split_alias=false;
776  for( Map.Entry<Node,Node> e : map.entrySet() ) {
777  Node oo = e.getKey(); // Old node
778  Node nn = e.getValue(); // New node
779  Type nt = oo._val; // Generally just copy type from original nodes
780  if( nn instanceof MrgProjNode ) { // Cloned allocations registers with default memory
781  MrgProjNode nnrg = (MrgProjNode)nn;
782  MrgProjNode oorg = (MrgProjNode)oo;
783  Env.DEFMEM.make_mem(nnrg.nnn()._alias,nnrg);
784  Env.DEFMEM.make_mem(oorg.nnn()._alias,oorg);
785  int oldalias = BitsAlias.parent(oorg.nnn()._alias);
786  Env.DEFMEM.set_def(oldalias,Node.con(TypeObj.UNUSED));
787  Env.GVN.add_mono(oorg.nnn());
788  Env.GVN.add_flow_uses(oorg);
789  split_alias=true;
790  }
791 
792  if( nn instanceof FunPtrNode ) { // FunPtrs pick up the new fidx
793  TypeFunPtr ofptr = (TypeFunPtr)nt;
794  if( ofptr.fidx()==oldret._fidx )
795  nt = TypeFunPtr.make(BitsFun.make0(newret._fidx),ofptr._nargs,ofptr._disp);
796  }
797  nn._val = nt; // Values
798  nn._elock(); // In GVN table
799  }
800  if( split_alias ) {
801  Env.DEFMEM.xval();
802  }
803 
804  // Eagerly lift any Unresolved types, so they quit propagating the parent
805  // (and both children) to all targets.
806  for( Node fptr : oldret._uses )
807  if( fptr instanceof FunPtrNode )
808  for( Node unr : fptr._uses )
809  if( unr instanceof UnresolvedNode )
810  unr._val = unr.value(GVNGCM.Mode.PesiCG);
811 
812  // Rewire all unwired calls.
813  for( CallEpiNode cepi : unwireds ) {
814  CallNode call = cepi.call();
815  CallEpiNode cepi2 = (CallEpiNode)map.get(cepi);
816  if( path < 0 ) { // Type-split, wire both & resolve later
817  BitsFun call_fidxs = ((TypeFunPtr) call.fdx()._val).fidxs();
818  assert call_fidxs.test_recur( fidx()) ; cepi.wire1(call,this,oldret);
819  if( call_fidxs.test_recur(fun.fidx()) ) cepi.wire1(call, fun,newret);
820  if( cepi2!=null ) {
821  // Found an unwired call in original: musta been a recursive self-
822  // call. wire the clone, same as the original was wired, so the
823  // clone keeps knowledge about its return type.
824  CallNode call2 = cepi2.call();
825  BitsFun call_fidxs2 = ((TypeFunPtr) call2.fdx()._val).fidxs();
826  if( call_fidxs2.test_recur( fidx()) ) cepi2.wire1(call2,this,oldret);
827  assert call_fidxs2.test_recur(fun.fidx()) ; cepi2.wire1(call2, fun,newret);
828  }
829  } else { // Non-type split, wire left or right
830  if( call==path_call ) cepi.wire1(call, fun,newret);
831  else cepi.wire1(call,this,oldret);
832  if( cepi2!=null && cepi2.call()!=path_call ) {
833  CallNode call2 = cepi2.call();
834  // Found an unwired call in original: musta been a recursive
835  // self-call. wire the clone, same as the original was wired, so the
836  // clone keeps knowledge about its return type.
837  //call2.set_fdx(call.fdx());
838  cepi2.wire1(call2,this,oldret);
839  call2.xval();
840  Env.GVN.add_flow_uses(this); // This gets wired, that gets wired, revisit all
841  }
842  Env.GVN.add_unuse(cepi);
843  }
844  }
845 
846  // Look for wired new not-recursive CallEpis; these will have an outgoing
847  // edge to some other RetNode, but the Call will not be wired. Wire.
848  for( Node nn : map.values() ) {
849  if( nn instanceof CallEpiNode ) {
850  CallEpiNode ncepi = (CallEpiNode)nn;
851  for( int i=0; i<ncepi.nwired(); i++ ) {
852  RetNode xxxret = ncepi.wired(i); // Neither newret nor oldret
853  if( xxxret != newret && xxxret != oldret ) { // Not self-recursive
854  ncepi.wire0(ncepi.call(),xxxret.fun());
855  }
856  }
857  }
858  }
859 
860  // Retype memory, so we can everywhere lift the split-alias parents "up and out".
861  GVNGCM.retype_mem(aliases,this.parm(MEM_IDX), oldret, true);
862  GVNGCM.retype_mem(aliases,fun .parm(MEM_IDX), newret, true);
863 
864  // Unhook the hooked FunPtrs
865  for( Node use : oldret._uses ) if( use instanceof FunPtrNode ) use.unkeep();
866  }

References com.cliffc.aa.node.NewNode< T extends TypeObj< T >._alias, com.cliffc.aa.node.CallNode._badargs, com.cliffc.aa.node.Node._defs, com.cliffc.aa.type.TypeFunPtr._disp, com.cliffc.aa.node.Node._elock, com.cliffc.aa.node.RetNode._fidx, com.cliffc.aa.node.ParmNode._idx, com.cliffc.aa.type.TypeFunPtr._nargs, com.cliffc.aa.node.Node._uses, com.cliffc.aa.node.Node._val, com.cliffc.aa.util.Ary< E >.add(), com.cliffc.aa.GVNGCM.add_dead(), com.cliffc.aa.node.Node.add_def(), com.cliffc.aa.GVNGCM.add_flow_uses(), com.cliffc.aa.GVNGCM.add_mono(), com.cliffc.aa.GVNGCM.add_reduce(), com.cliffc.aa.GVNGCM.add_unuse(), com.cliffc.aa.type.TypeRPC.ALL_CALL, com.cliffc.aa.node.CallEpiNode.call(), com.cliffc.aa.node.CallNode.cepi(), com.cliffc.aa.node.Node.con(), com.cliffc.aa.node.Node.copy(), com.cliffc.aa.Env.DEFMEM, com.cliffc.aa.node.Node.del(), com.cliffc.aa.node.CallNode.fdx(), com.cliffc.aa.node.FunNode.fidx(), com.cliffc.aa.type.TypeFunPtr.fidx(), com.cliffc.aa.node.FunNode.formal(), com.cliffc.aa.node.FunNode.fptr(), com.cliffc.aa.node.RetNode.fun(), com.cliffc.aa.Env.GVN, com.cliffc.aa.node.FunNode.has_unknown_callers(), com.cliffc.aa.node.Node.in(), com.cliffc.aa.node.Node.insert(), com.cliffc.aa.node.Node.keep(), com.cliffc.aa.type.TypeFunPtr.make(), com.cliffc.aa.type.BitsFun.make0(), com.cliffc.aa.node.MrgProjNode.nnn(), com.cliffc.aa.node.CallEpiNode.nwired(), com.cliffc.aa.type.BitsAlias.parent(), com.cliffc.aa.node.FunNode.parm(), com.cliffc.aa.GVNGCM.Mode.PesiCG, com.cliffc.aa.GVNGCM.Mode.PesiNoCG, com.cliffc.aa.node.Node.pop(), com.cliffc.aa.GVNGCM.retype_mem(), com.cliffc.aa.node.Node.set_def(), com.cliffc.aa.node.CallNode.set_fdx(), com.cliffc.aa.node.CallNode.set_ttfp(), com.cliffc.aa.type.Type< T extends Type< T >.simple_ptr(), com.cliffc.aa.type.Bits< B extends Bits< B >.test_recur(), com.cliffc.aa.node.Node.unkeep(), com.cliffc.aa.type.TypeObj< O extends TypeObj< O >.UNUSED, com.cliffc.aa.node.UnresolvedNode.value(), com.cliffc.aa.node.Node.value(), com.cliffc.aa.node.CallEpiNode.wire0(), com.cliffc.aa.node.CallEpiNode.wire1(), com.cliffc.aa.node.CallEpiNode.wired(), com.cliffc.aa.Env.XCTRL, and com.cliffc.aa.node.Node.xval().

Referenced by com.cliffc.aa.node.FunNode.ideal_inline().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ split_size()

int com.cliffc.aa.node.FunNode.split_size ( Ary< Node body,
Node[]  parms 
)
private

Definition at line 536 of file FunNode.java.

536  {
537  if( _defs._len <= 1 ) return -1; // No need to split callers if only 2
538  boolean self_recursive=false;
539 
540  // Count function body size. Requires walking the function body and
541  // counting opcodes. Some opcodes are ignored, because they manage
542  // dependencies but make no code.
543  int call_indirect=0, call_thunk=0; // Count of calls to e.g. loads/args/parms
544  int[] cnts = new int[OP_MAX];
545  for( Node n : body ) {
546  int op = n._op; // opcode
547  if( op == OP_CALL ) { // Call-of-primitive?
548  Node n1 = ((CallNode)n).fdx();
549  if( !(n1._val instanceof TypeFunPtr) ) return -1; // Calling an unknown function, await GCP
550  TypeFunPtr tfp = (TypeFunPtr)n1._val;
551  if( tfp._fidxs.test(_fidx) ) self_recursive = true; // May be self-recursive
552  Node n2 = n1 instanceof UnOrFunPtrNode ? ((UnOrFunPtrNode)n1).funptr() : n1;
553  if( n2 instanceof FunPtrNode ) {
554  FunPtrNode fpn = (FunPtrNode) n2;
555  if( fpn.ret().rez() instanceof PrimNode )
556  op = OP_PRIM; // Treat as primitive for inlining purposes
557  } else if( n2!=null && n2._val==TypeTuple.RET ) { // Thunks are encouraged to inline
558  call_thunk++;
559  } else
560  call_indirect++;
561  }
562  cnts[op]++; // Histogram ops
563  }
564  assert cnts[OP_FUN]==1 && cnts[OP_RET]==1;
565  assert cnts[OP_SCOPE]==0;
566  assert cnts[OP_REGION] <= cnts[OP_IF];
567 
568  // Specifically ignoring constants, parms, phis, rpcs, types,
569  // unresolved, and casts. These all track & control values, but actually
570  // do not generate any code.
571  if( cnts[OP_CALL] > 2 || // Careful inlining more calls; leads to exponential growth
572  cnts[OP_LOAD] > 4 ||
573  cnts[OP_STORE]> 2 ||
574  cnts[OP_PRIM] > 6 || // Allow small-ish primitive counts to inline
575  cnts[OP_NEWOBJ]>2 || // Display and return is OK
576  (cnts[OP_NEWOBJ]>1 && self_recursive) ||
577  call_indirect > 0 )
578  return -1;
579 
580  if( !Env.GVN._opt_mode._CG && self_recursive ) return -1; // Await GCP & call-graph discovery before inlining self-recursive functions
581 
582  // Pick which input to inline. Only based on having some constant inputs
583  // right now.
584  Node mem = parms[MEM_IDX]; // Memory, used to sharpen input ptrs
585  int m=-1, mncons = -1;
586  for( int i=has_unknown_callers() ? 2 : 1; i<_defs._len; i++ ) {
587  Node call = in(i).in(0);
588  if( !(call instanceof CallNode) ) continue; // Not well formed
589  if( ((CallNode)call).nargs() != nargs() ) continue; // Will not inline
590  if( call._val == Type.ALL ) continue; // Otherwise in-error
591  TypeFunPtr tfp = CallNode.ttfp(call._val);
592  int fidx = tfp.fidxs().abit();
593  if( fidx < 0 || BitsFun.is_parent(fidx) ) continue; // Call must only target one fcn
594  if( self_recursive && body.find(call)!=-1 ) continue; // Self-recursive; amounts to unrolling
595  int ncon=0;
596  // Count constant inputs on non-error paths
597  for( int j=MEM_IDX; j<parms.length; j++ ) {
598  Node parm = parms[j];
599  if( parm != null ) { // Some can be dead
600  Type actual = parm.in(i).sharptr(mem.in(i));
601  Type formal = formal(j);
602  if( !actual.isa(formal) ) // Path is in-error?
603  { ncon = -2; break; } // This path is in-error, cannot inline even if small & constants
604  if( actual.is_con() ) ncon++; // Count constants along each path
605  }
606  }
607  if( ncon > mncons )
608  { mncons = ncon; m = i; } // Path with the most constants
609  }
610  if( m == -1 ) // No paths are not in-error? (All paths have an error-parm)
611  return -1; // No inline
612 
613  if( cnts[OP_IF] > 1+mncons) // Allow some trivial filtering to inline
614  return -1;
615 
616  return m; // Return path to split on
617  }

References com.cliffc.aa.GVNGCM.Mode._CG, com.cliffc.aa.node.Node._defs, com.cliffc.aa.node.FunNode._fidx, com.cliffc.aa.type.TypeFunPtr._fidxs, com.cliffc.aa.GVNGCM._opt_mode, com.cliffc.aa.node.Node._val, com.cliffc.aa.type.Bits< B extends Bits< B >.abit(), com.cliffc.aa.type.Type< T extends Type< T >.ALL, com.cliffc.aa.node.FunNode.fidx(), com.cliffc.aa.type.TypeFunPtr.fidxs(), com.cliffc.aa.node.FunNode.formal(), com.cliffc.aa.node.UnOrFunPtrNode.funptr(), com.cliffc.aa.Env.GVN, com.cliffc.aa.node.FunNode.has_unknown_callers(), com.cliffc.aa.node.Node.in(), com.cliffc.aa.type.Type< T extends Type< T >.is_con(), com.cliffc.aa.type.BitsFun.is_parent(), com.cliffc.aa.type.Type< T extends Type< T >.isa(), com.cliffc.aa.node.FunNode.nargs(), com.cliffc.aa.node.Node.OP_CALL, com.cliffc.aa.node.Node.OP_FUN, com.cliffc.aa.node.Node.OP_IF, com.cliffc.aa.node.Node.OP_LOAD, com.cliffc.aa.node.Node.OP_MAX, com.cliffc.aa.node.Node.OP_NEWOBJ, com.cliffc.aa.node.Node.OP_PRIM, com.cliffc.aa.node.Node.OP_REGION, com.cliffc.aa.node.Node.OP_RET, com.cliffc.aa.node.Node.OP_SCOPE, com.cliffc.aa.node.Node.OP_STORE, com.cliffc.aa.node.FunNode.parm(), com.cliffc.aa.node.FunNode.parms(), com.cliffc.aa.node.FunPtrNode.ret(), com.cliffc.aa.type.TypeTuple.RET, com.cliffc.aa.node.RetNode.rez(), com.cliffc.aa.node.Node.sharptr(), com.cliffc.aa.type.Bits< B extends Bits< B >.test(), and com.cliffc.aa.node.CallNode.ttfp().

Referenced by com.cliffc.aa.node.FunNode.ideal_inline().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ stacked_region()

Node com.cliffc.aa.node.RegionNode.stacked_region ( )
packageinherited

Definition at line 81 of file RegionNode.java.

81  {
82  if( _op != OP_REGION ) return null; // Does not apply to e.g. functions & loops
83  int idx = _defs.find( e -> e !=null && e._op==OP_REGION );
84  if( idx== -1 ) return null; // No stacked region
85  Node r = in(idx);
86  if( r == this ) return null; // Dying code
87  int cfgs=0;
88  for( Node use : r._uses ) cfgs += use.is_CFG() ? 1 : 0;
89  if( cfgs != 1 ) return null;
90  // Every 'r' Phi is pointed *at* by exactly a 'this' Phi
91  for( Node rphi : r._uses )
92  if( rphi._op == OP_PHI ) {
93  if( rphi._uses._len != 1 ) return null; // Busy rphi
94  Node phi = rphi._uses.at(0); // Exactly a this.phi
95  if( phi._op != OP_PHI || // Not a Phi
96  phi.in(0) != this || // Control to this
97  phi.in(idx) != rphi ) // Matching along idx
98  return null; // Not exact shape
99  }
100 
101  // Collapse stacked Phis
102  for( Node phi : _uses )
103  if( phi._op == OP_PHI ) {
104  Node rphi = phi.in(idx);
105  boolean stacked_phi = rphi._op == OP_PHI && rphi.in(0)==r;
106  for( int i = 1; i<r._defs._len; i++ )
107  phi.add_def(stacked_phi ? rphi.in(i) : rphi);
108  phi.remove(idx);
109  assert !stacked_phi || rphi._uses._len==0;
110  }
111 
112  // Collapse stacked Region
113  for( int i = 1; i<r._defs._len; i++ )
114  add_def(r.in(i));
115  remove(idx);
116  return this;
117  }

References com.cliffc.aa.node.Node._defs, com.cliffc.aa.node.Node._op, com.cliffc.aa.node.Node._uses, com.cliffc.aa.node.Node.add_def(), com.cliffc.aa.node.Node.in(), com.cliffc.aa.node.Node.is_CFG(), com.cliffc.aa.node.Node.OP_PHI, com.cliffc.aa.node.Node.OP_REGION, and com.cliffc.aa.node.Node.remove().

Referenced by com.cliffc.aa.node.RegionNode.ideal_reduce().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ str()

String com.cliffc.aa.node.FunNode.str ( )

Reimplemented from com.cliffc.aa.node.Node.

Definition at line 107 of file FunNode.java.

107 { return is_forward_ref() ? xstr() : _sig.str(new SB(),new VBitSet(),null,false).toString(); }

References com.cliffc.aa.node.FunNode._sig, com.cliffc.aa.node.FunNode.is_forward_ref(), com.cliffc.aa.type.TypeFunSig.str(), com.cliffc.aa.util.SB.toString(), and com.cliffc.aa.node.FunNode.xstr().

Referenced by com.cliffc.aa.node.FunPtrNode.str().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ subsume()

Node com.cliffc.aa.node.Node.subsume ( Node  nnn)
inherited

Definition at line 201 of file Node.java.

201  {
202  assert !nnn.is_dead();
203  insert(nnn); // Change graph shape
204  nnn.keep(); // Keep-alive
205  kill(); // Delete the old, and anything it uses
206  return nnn.unkeep(); // Remove keep-alive
207  }

References com.cliffc.aa.node.Node.insert(), com.cliffc.aa.node.Node.is_dead(), com.cliffc.aa.node.Node.keep(), com.cliffc.aa.node.Node.kill(), and com.cliffc.aa.node.Node.unkeep().

Referenced by com.cliffc.aa.node.MemJoinNode.combine_splits(), com.cliffc.aa.node.CallNode.copy(), com.cliffc.aa.node.Node.do_reduce(), com.cliffc.aa.node.IfNode.flip(), and com.cliffc.aa.node.Node.walk_opt().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ toString()

String com.cliffc.aa.node.Node.toString ( )
inherited

Reimplemented in com.cliffc.aa.node.ConNode< T extends Type >.

Definition at line 284 of file Node.java.

284 { return dump(0,new SB(),false).toString(); }

References com.cliffc.aa.node.Node.dump().

Here is the call graph for this function:

◆ tvar() [1/2]

TV2 com.cliffc.aa.node.Node.tvar ( )
inherited

Definition at line 96 of file Node.java.

96  {
97  TV2 tv = _tvar.find(); // Do U-F step
98  return tv == _tvar ? tv : (_tvar = tv); // Update U-F style in-place.
99  }

References com.cliffc.aa.node.Node._tvar, and com.cliffc.aa.tvar.TV2.find().

Referenced by com.cliffc.aa.node.MemJoinNode.add_alias_below(), com.cliffc.aa.Parse.func(), com.cliffc.aa.node.Node.tvar(), com.cliffc.aa.node.ProjNode.unify(), com.cliffc.aa.node.FreshNode.unify(), com.cliffc.aa.node.MemSplitNode.unify(), com.cliffc.aa.node.CastNode.unify(), com.cliffc.aa.node.MemJoinNode.unify(), com.cliffc.aa.node.StoreNode.unify(), and com.cliffc.aa.node.LoadNode.unify().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ tvar() [2/2]

TV2 com.cliffc.aa.node.Node.tvar ( int  x)
inherited

Definition at line 100 of file Node.java.

100 { return in(x).tvar(); } // nth TV2

References com.cliffc.aa.node.Node.in(), and com.cliffc.aa.node.Node.tvar().

Here is the call graph for this function:

◆ type_special()

TypeTuple com.cliffc.aa.node.FunNode.type_special ( Node[]  parms)
private

Definition at line 466 of file FunNode.java.

466  {
467  if( !has_unknown_callers() ) return null; // Only overly-wide calls.
468  Type[] sig = find_type_split(parms);
469  if( sig == null ) return null; // No unresolved calls; no point in type-specialization
470  // Make a new function header with new signature
471  TypeTuple formals = TypeTuple.make_args(sig);
472  if( !formals.isa(_sig._formals) ) return null; // Fails in error cases
473  return formals == _sig._formals ? null : formals; // Must see improvement
474  }

References com.cliffc.aa.type.TypeFunSig._formals, com.cliffc.aa.node.FunNode._sig, com.cliffc.aa.node.FunNode.find_type_split(), com.cliffc.aa.node.FunNode.has_unknown_callers(), com.cliffc.aa.type.Type< T extends Type< T >.isa(), com.cliffc.aa.type.TypeTuple.make_args(), and com.cliffc.aa.node.FunNode.parms().

Referenced by com.cliffc.aa.node.FunNode.ideal_inline().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ unelock()

void com.cliffc.aa.node.Node.unelock ( )
inherited

Definition at line 128 of file Node.java.

128  {
129  assert check_vals(); // elock & VALs match
130  if( _elock ) { // Edge-locked
131  _elock=false; // Unlock
132  Node x = VALS.remove(this);
133  assert x==this; // Got the right node out
134  Env.GVN.add_reduce(Env.GVN.add_flow(this));
135  }
136  }

References com.cliffc.aa.node.Node._elock, com.cliffc.aa.GVNGCM.add_flow(), com.cliffc.aa.GVNGCM.add_reduce(), com.cliffc.aa.node.Node.check_vals(), com.cliffc.aa.Env.GVN, and com.cliffc.aa.node.Node.VALS.

Referenced by com.cliffc.aa.node.NewNode< TypeStruct >._init(), com.cliffc.aa.node.Node.add_def(), com.cliffc.aa.node.Node.del(), com.cliffc.aa.node.Node.insert(), com.cliffc.aa.node.NewNode< TypeStruct >.kill2(), com.cliffc.aa.node.Node.pop(), com.cliffc.aa.node.Node.remove(), com.cliffc.aa.node.Node.replace(), com.cliffc.aa.node.Node.set_def(), com.cliffc.aa.node.RetNode.set_fidx(), com.cliffc.aa.node.ProjNode.set_idx(), com.cliffc.aa.node.CallNode.set_rpc(), and com.cliffc.aa.node.TestNodeSmall.testCallNodeResolve().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ unhook()

public<N extends Node> N com.cliffc.aa.node.Node.unhook ( )
packageinherited

Definition at line 239 of file Node.java.

239  {
240  if( _keep==1 ) Env.GVN.add_work_all(this);
241  return unkeep();
242  }

References com.cliffc.aa.node.Node._keep, com.cliffc.aa.GVNGCM.add_work_all(), com.cliffc.aa.Env.GVN, and com.cliffc.aa.node.Node.unkeep().

Referenced by com.cliffc.aa.Parse.apply(), com.cliffc.aa.Parse.func(), and com.cliffc.aa.Parse.term().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ unify()

boolean com.cliffc.aa.node.FunNode.unify ( boolean  test)

Reimplemented from com.cliffc.aa.node.Node.

Definition at line 883 of file FunNode.java.

883 { return false; }

◆ unkeep() [1/2]

public<N extends Node> N com.cliffc.aa.node.Node.unkeep ( )
packageinherited

Definition at line 232 of file Node.java.

232 { return unkeep(1); }

References com.cliffc.aa.node.Node.unkeep().

Referenced by com.cliffc.aa.Parse._args(), com.cliffc.aa.Parse._expr(), com.cliffc.aa.Parse._expr_higher(), com.cliffc.aa.Parse._short_circuit_expr(), com.cliffc.aa.node.MemJoinNode.add_alias_above(), com.cliffc.aa.node.MemJoinNode.add_alias_below(), com.cliffc.aa.node.MemJoinNode.add_alias_below_new(), com.cliffc.aa.Parse.apply(), com.cliffc.aa.node.ScopeNode.IfScope.check(), com.cliffc.aa.node.TestNodeSmall.check(), com.cliffc.aa.Env.close_display(), com.cliffc.aa.Parse.do_call0(), com.cliffc.aa.node.UnresolvedNode.filter(), com.cliffc.aa.Parse.go(), com.cliffc.aa.node.CallNode.ideal_reduce(), com.cliffc.aa.Parse.ifex(), com.cliffc.aa.Parse.inc(), com.cliffc.aa.Env.init(), com.cliffc.aa.node.MemSplitNode.insert_split(), com.cliffc.aa.GVNGCM.iter(), com.cliffc.aa.node.FunNode.make_new_fun(), com.cliffc.aa.Parse.merge_exits(), com.cliffc.aa.Parse.remove_unknown_callers(), com.cliffc.aa.node.RetNode.RetNode(), com.cliffc.aa.node.FunNode.split_callers(), com.cliffc.aa.Parse.stmt(), com.cliffc.aa.Parse.struct(), com.cliffc.aa.node.Node.subsume(), com.cliffc.aa.node.CallNode.swap_new(), com.cliffc.aa.Parse.term(), com.cliffc.aa.Parse.tuple(), com.cliffc.aa.node.Node.unhook(), and com.cliffc.aa.node.Node.unkeep().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ unkeep() [2/2]

public<N extends Node> N com.cliffc.aa.node.Node.unkeep ( int  d)
packageinherited

Definition at line 234 of file Node.java.

234  {
235  assert _keep >= d; _keep-=d;
236  return (N)this;
237  }

References com.cliffc.aa.node.Node._keep.

◆ unuse()

Node com.cliffc.aa.node.Node.unuse ( Node  old)
privateinherited

Definition at line 178 of file Node.java.

178  {
179  if( old == null ) return this;
180  old._uses.del(this);
181  // Either last use of old & goes dead, or at least 1 fewer uses & changes liveness
182  Env.GVN.add_unuse(old);
183  if( old._uses._len!=0 && old._keep ==0 ) old.add_flow_def_extra(this);
184  return this;
185  }

References com.cliffc.aa.node.Node._keep, com.cliffc.aa.node.Node._uses, com.cliffc.aa.node.Node.add_flow_def_extra(), com.cliffc.aa.GVNGCM.add_unuse(), and com.cliffc.aa.Env.GVN.

Referenced by com.cliffc.aa.node.Node.kill(), com.cliffc.aa.node.Node.pop(), com.cliffc.aa.node.Node.remove(), and com.cliffc.aa.node.Node.set_def().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ unwire()

void com.cliffc.aa.node.FunNode.unwire ( int  idx)
package

Reimplemented from com.cliffc.aa.node.RegionNode.

Definition at line 296 of file FunNode.java.

296  {
297  Node ctl = in(idx);
298  if( !(ctl instanceof ConNode) ) {
299  if( ctl.in(0)._op != OP_CALL ) return;
300  CallNode call = (CallNode)ctl.in(0);
301  CallEpiNode cepi = call.cepi();
302  if( cepi != null ) {
303  int ridx = cepi._defs.find(ret());
304  if( ridx != -1 ) Env.GVN.add_flow(cepi).remove(ridx);
305  }
306  }
307  }

References com.cliffc.aa.node.Node._defs, com.cliffc.aa.node.Node._op, com.cliffc.aa.GVNGCM.add_flow(), com.cliffc.aa.node.CallNode.cepi(), com.cliffc.aa.Env.GVN, com.cliffc.aa.node.Node.in(), com.cliffc.aa.node.Node.OP_CALL, and com.cliffc.aa.node.FunNode.ret().

Here is the call graph for this function:

◆ val()

Type com.cliffc.aa.node.Node.val ( int  idx)
inherited

Definition at line 470 of file Node.java.

470 { return in(idx)._val; }

References com.cliffc.aa.node.Node._val, and com.cliffc.aa.node.Node.in().

Referenced by com.cliffc.aa.node.NewNode< TypeStruct >.captured(), com.cliffc.aa.node.FunNode.check_callers(), com.cliffc.aa.node.ParmNode.err(), com.cliffc.aa.node.PrimNode.err(), com.cliffc.aa.node.PrimNode.ConvertTypeName.err(), com.cliffc.aa.node.FunNode.find_type_split(), com.cliffc.aa.node.FunNode.find_type_split_index(), com.cliffc.aa.node.AssertNode.ideal_grow(), com.cliffc.aa.node.FunNode.ideal_inline(), com.cliffc.aa.node.IfNode.ideal_reduce(), com.cliffc.aa.node.RegionNode.ideal_reduce(), com.cliffc.aa.node.MrgProjNode.ideal_reduce(), com.cliffc.aa.node.MemJoinNode.ideal_reduce(), com.cliffc.aa.node.PhiNode.ideal_reduce(), com.cliffc.aa.node.PhiNode.live_use(), com.cliffc.aa.node.RetNode.RetNode(), com.cliffc.aa.node.StoreNode.StoreNode(), com.cliffc.aa.node.ThretNode.ThretNode(), com.cliffc.aa.node.StoreNode.unify(), com.cliffc.aa.node.LoadNode.unify(), com.cliffc.aa.node.ParmNode.valid_args(), com.cliffc.aa.node.CEProjNode.value(), com.cliffc.aa.node.ErrNode.value(), com.cliffc.aa.node.ProjNode.value(), com.cliffc.aa.node.MProjNode.value(), com.cliffc.aa.node.FreshNode.value(), com.cliffc.aa.node.CastNode.value(), com.cliffc.aa.node.FP2DispNode.value(), com.cliffc.aa.node.IfNode.value(), com.cliffc.aa.node.PhiNode.value(), com.cliffc.aa.node.ParmNode.value(), com.cliffc.aa.node.MemPrimNode.LValueLength.value(), com.cliffc.aa.node.RegionNode.value(), com.cliffc.aa.node.MemJoinNode.value(), com.cliffc.aa.node.MemPrimNode.LValueRead.value(), com.cliffc.aa.node.PrimNode.value(), com.cliffc.aa.node.RetNode.value(), com.cliffc.aa.node.MemPrimNode.LValueWrite.value(), com.cliffc.aa.node.MemPrimNode.LValueWriteFinal.value(), com.cliffc.aa.node.PrimNode.ConvertStrStr.value(), com.cliffc.aa.node.CallEpiNode.value(), com.cliffc.aa.node.PrimNode.AndI64.value(), com.cliffc.aa.node.PrimNode.OrI64.value(), com.cliffc.aa.node.PrimNode.EQ_OOP.value(), com.cliffc.aa.node.PrimNode.NE_OOP.value(), com.cliffc.aa.node.PrimNode.Not.value(), com.cliffc.aa.node.PrimNode.RandI64.value(), com.cliffc.aa.node.PrimNode.Id.value(), com.cliffc.aa.node.FunNode.value(), and com.cliffc.aa.node.Node.walk_opt().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ value()

Type com.cliffc.aa.node.FunNode.value ( GVNGCM.Mode  opt_mode)

Reimplemented from com.cliffc.aa.node.RegionNode.

Definition at line 869 of file FunNode.java.

869  {
870  // Will be an error eventually, but act like its executed so the trailing
871  // EpilogNode gets visited during GCP
872  if( is_forward_ref() ) return Type.CTRL;
873  if( _defs._len==2 && in(1)==this ) return Type.XCTRL; // Dead self-loop
874  if( in(0)==this ) return _defs._len>=2 ? val(1) : Type.XCTRL; // is_copy
875  for( int i=1; i<_defs._len; i++ ) {
876  Type c = val(i);
877  if( c == Type.CTRL || c == Type.ALL ) return Type.CTRL; // Valid path
878  }
879  return Type.XCTRL;
880  }

References com.cliffc.aa.node.Node._defs, com.cliffc.aa.type.Type< T extends Type< T >.ALL, com.cliffc.aa.type.Type< T extends Type< T >.CTRL, com.cliffc.aa.node.Node.in(), com.cliffc.aa.node.FunNode.is_forward_ref(), com.cliffc.aa.node.Node.val(), and com.cliffc.aa.type.Type< T extends Type< T >.XCTRL.

Here is the call graph for this function:

◆ walk_dom_last()

Node com.cliffc.aa.node.RegionNode.walk_dom_last ( Predicate< Node P)
packageinherited

Reimplemented from com.cliffc.aa.node.Node.

Reimplemented in com.cliffc.aa.node.LoopNode.

Definition at line 157 of file RegionNode.java.

157  {
158  // Allow moving up simple diamonds
159  if( _defs._len==3 && in(1) instanceof ProjNode && in(1).in(0) instanceof IfNode &&
160  in(1).in(0) == in(2).in(0) ) {
161  Node n = in(1).in(0).walk_dom_last(P);
162  if( n != null ) return n;
163  }
164  // Experimental stronger version
165  if( _defs._len==3 && !(this instanceof FunNode) ) {
166  Node n1 = in(1).walk_dom_last(P);
167  Node n2 = in(2).walk_dom_last(P);
168  if( n1 != null && n1==n2 ) return n1;
169  }
170  return P.test(this) ? this : null;
171  }

References com.cliffc.aa.node.Node._defs, com.cliffc.aa.node.Node.in(), and com.cliffc.aa.node.Node.walk_dom_last().

Here is the call graph for this function:

◆ walk_initype()

final void com.cliffc.aa.node.Node.walk_initype ( GVNGCM  gvn,
VBitSet  bs 
)
inherited

Definition at line 691 of file Node.java.

691  {
692  if( bs.tset(_uid) ) return; // Been there, done that
693  _val = Type.ANY; // Highest value
694  _live = TypeMem.DEAD; // Not alive
695  // Walk reachable graph
696  gvn.add_flow(this);
697  for( Node use : _uses ) use.walk_initype(gvn,bs);
698  for( Node def : _defs ) if( def != null ) def.walk_initype(gvn,bs);
699  }

References com.cliffc.aa.node.Node._defs, com.cliffc.aa.node.Node._live, com.cliffc.aa.node.Node._uid, com.cliffc.aa.node.Node._uses, com.cliffc.aa.node.Node._val, com.cliffc.aa.GVNGCM.add_flow(), com.cliffc.aa.type.Type< T extends Type< T >.ANY, com.cliffc.aa.type.TypeMem.DEAD, and com.cliffc.aa.util.VBitSet.tset().

Referenced by com.cliffc.aa.GVNGCM.gcp().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ walk_opt()

void com.cliffc.aa.node.Node.walk_opt ( VBitSet  visit)
inherited

Definition at line 797 of file Node.java.

797  {
798  assert !is_dead();
799  if( visit.tset(_uid) ) return; // Been there, done that
800 
801  // Replace any constants. Since the node computes a constant, its inputs
802  // were never marked live, and so go dead and so go to ANY and so are not
803  // available to recompute the constant later.
804  Type val = _val;
805  TypeFunPtr tfp;
806  if( val instanceof TypeFunPtr &&
807  _live.live_no_disp() &&
808  (tfp=(TypeFunPtr)val)._disp!=TypeMemPtr.NO_DISP )
809  val = tfp.make_no_disp();
810  if( should_con(val) )
812 
813  // Walk reachable graph
814  if( is_dead() ) return;
815  Env.GVN.add_work_all(this);
816  for( Node def : _defs ) if( def != null ) def.walk_opt(visit);
817  for( Node use : _uses ) use.walk_opt(visit);
818  }

References com.cliffc.aa.node.Node._defs, com.cliffc.aa.node.Node._live, com.cliffc.aa.node.Node._uid, com.cliffc.aa.node.Node._uses, com.cliffc.aa.node.Node._val, com.cliffc.aa.GVNGCM.add_work_all(), com.cliffc.aa.node.Node.con(), com.cliffc.aa.Env.GVN, com.cliffc.aa.node.Node.is_dead(), com.cliffc.aa.type.TypeMem.live_no_disp(), com.cliffc.aa.type.TypeFunPtr.make_no_disp(), com.cliffc.aa.type.TypeMemPtr.NO_DISP, com.cliffc.aa.GVNGCM.Mode.Opto, com.cliffc.aa.node.Node.should_con(), com.cliffc.aa.node.Node.subsume(), com.cliffc.aa.util.VBitSet.tset(), com.cliffc.aa.node.Node.val(), com.cliffc.aa.node.Node.walk_opt(), and com.cliffc.aa.node.Node.xliv().

Referenced by com.cliffc.aa.GVNGCM.gcp(), and com.cliffc.aa.node.Node.walk_opt().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ walkerr_def()

void com.cliffc.aa.node.Node.walkerr_def ( HashSet< ErrMsg errs,
VBitSet  bs 
)
inherited

Definition at line 771 of file Node.java.

771  {
772  if( bs.tset(_uid) ) return; // Been there, done that
773  for( int i=0; i<_defs._len; i++ ) {
774  Node def = _defs.at(i); // Walk data defs for more errors
775  if( def == null || def._val == Type.XCTRL ) continue;
776  // Walk function bodies that are wired, but not bare FunPtrs.
777  if( def instanceof FunPtrNode && !def.is_forward_ref() )
778  continue;
779  def.walkerr_def(errs,bs);
780  }
781  if( is_prim() ) return;
782  // Skip reporting if any input is 'all', as the input should report instead.
783  for( Node def : _defs )
784  if( def !=null && def._val ==Type.ALL )
785  return; // Skip reporting.
786  adderr(errs);
787  }

References com.cliffc.aa.node.Node._defs, com.cliffc.aa.node.Node._uid, com.cliffc.aa.node.Node._val, com.cliffc.aa.node.Node.adderr(), com.cliffc.aa.type.Type< T extends Type< T >.ALL, com.cliffc.aa.node.Node.is_forward_ref(), com.cliffc.aa.node.Node.is_prim(), com.cliffc.aa.util.VBitSet.tset(), com.cliffc.aa.node.Node.walkerr_def(), and com.cliffc.aa.type.Type< T extends Type< T >.XCTRL.

Referenced by com.cliffc.aa.Parse.gather_errors(), and com.cliffc.aa.node.Node.walkerr_def().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ xliv()

Node com.cliffc.aa.node.Node.xliv ( GVNGCM.Mode  opt_mode)
inherited

Definition at line 500 of file Node.java.

500 { _live = live(opt_mode); return this; }

References com.cliffc.aa.node.Node._live, and com.cliffc.aa.node.Node.live().

Referenced by com.cliffc.aa.TestLive.testBasic(), com.cliffc.aa.TestLive.testNewObj(), and com.cliffc.aa.node.Node.walk_opt().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ xstr()

String com.cliffc.aa.node.FunNode.xstr ( )

Reimplemented from com.cliffc.aa.node.Node.

Definition at line 105 of file FunNode.java.

105 { return name(); }

References com.cliffc.aa.node.FunNode.name().

Referenced by com.cliffc.aa.node.FunNode.str(), and com.cliffc.aa.node.UnresolvedNode.xstr().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ xval()

Type com.cliffc.aa.node.Node.xval ( )
inherited

Definition at line 460 of file Node.java.

460  {
461  Type oval = _val; // Get old type
462  Type nval = value(Env.GVN._opt_mode); // Get best type
463  if( nval!=oval ) {
464  _val = nval;
465  Env.GVN.add_flow_uses(this); // Put uses on worklist... values flows downhill
466  }
467  return nval;
468  }

References com.cliffc.aa.GVNGCM._opt_mode, com.cliffc.aa.node.Node._val, com.cliffc.aa.GVNGCM.add_flow_uses(), com.cliffc.aa.Env.GVN, and com.cliffc.aa.node.Node.value().

Referenced by com.cliffc.aa.node.MemSplitNode.add_alias(), com.cliffc.aa.node.MemJoinNode.add_alias_below_new(), com.cliffc.aa.node.NewObjNode.add_fun(), com.cliffc.aa.node.TestNodeSmall.check(), com.cliffc.aa.node.MemJoinNode.combine_splits(), com.cliffc.aa.node.ConTypeNode.def_fref(), com.cliffc.aa.node.LoadNode.ideal_mono(), com.cliffc.aa.node.MemJoinNode.ideal_reduce(), com.cliffc.aa.node.StoreNode.ideal_reduce(), com.cliffc.aa.node.IntrinsicNode.ideal_reduce(), com.cliffc.aa.node.CallNode.ideal_reduce(), com.cliffc.aa.node.FunNode.make_new_fun(), com.cliffc.aa.node.FunPtrNode.merge_ref_def(), com.cliffc.aa.node.NewObjNode.promote_forward(), com.cliffc.aa.node.MemSplitNode.remove_alias(), com.cliffc.aa.node.FunNode.split_callers(), and com.cliffc.aa.TestLive.testNewObj().

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ _bal_close

◆ _cnt_size_inlines

byte com.cliffc.aa.node.FunNode._cnt_size_inlines
private

Definition at line 72 of file FunNode.java.

Referenced by com.cliffc.aa.node.FunNode.ideal_inline().

◆ _defs

Ary<Node> com.cliffc.aa.node.Node._defs
inherited

Definition at line 124 of file Node.java.

Referenced by com.cliffc.aa.node.MemJoinNode.add_alias_above(), com.cliffc.aa.node.MemJoinNode.add_alias_below(), com.cliffc.aa.node.Node.add_def(), com.cliffc.aa.node.UnresolvedNode.add_def_unresolved(), com.cliffc.aa.node.CallNode.add_flow_extra(), com.cliffc.aa.GVNGCM.add_work_defs(), com.cliffc.aa.node.CallNode.arg(), com.cliffc.aa.node.MemPrimNode.ReadPrimNode.as_fun(), com.cliffc.aa.node.MemPrimNode.WritePrimNode.as_fun(), com.cliffc.aa.node.PrimNode.as_fun(), com.cliffc.aa.node.FunNode.bad_mem_use(), com.cliffc.aa.node.CallEpiNode.check_and_wire(), com.cliffc.aa.node.FunNode.check_callers(), com.cliffc.aa.node.MemJoinNode.combine_splits(), com.cliffc.aa.node.UnresolvedNode.copy(), com.cliffc.aa.node.Node.copy(), com.cliffc.aa.node.ConTypeNode.def_fref(), com.cliffc.aa.node.Node.del(), com.cliffc.aa.node.Node.do_flow(), com.cliffc.aa.node.Node.dump(), com.cliffc.aa.node.Node.equals(), com.cliffc.aa.node.MemPrimNode.err(), com.cliffc.aa.node.ErrNode.err(), com.cliffc.aa.node.ParmNode.err(), com.cliffc.aa.node.PrimNode.err(), com.cliffc.aa.node.CallNode.fdx(), com.cliffc.aa.node.UnresolvedNode.filter(), com.cliffc.aa.node.Node.find(), com.cliffc.aa.node.FunNode.find_body(), com.cliffc.aa.node.UnresolvedNode.find_fidx(), com.cliffc.aa.node.FunNode.find_type_split(), com.cliffc.aa.node.FunNode.find_type_split_index(), com.cliffc.aa.node.UnresolvedNode.funptr(), com.cliffc.aa.GVNGCM.gcp(), com.cliffc.aa.node.CallNode.get_fptr(), com.cliffc.aa.node.FunNode.has_unknown_callers(), com.cliffc.aa.node.Node.hashCode(), com.cliffc.aa.node.LoadNode.ideal_grow(), com.cliffc.aa.node.CallNode.ideal_grow(), com.cliffc.aa.node.PrimNode.AndThen.ideal_grow(), com.cliffc.aa.node.PrimNode.OrElse.ideal_grow(), com.cliffc.aa.node.FunNode.ideal_inline(), com.cliffc.aa.node.FP2DispNode.ideal_reduce(), com.cliffc.aa.node.IfNode.ideal_reduce(), com.cliffc.aa.node.RegionNode.ideal_reduce(), com.cliffc.aa.node.UnresolvedNode.ideal_reduce(), com.cliffc.aa.node.MemJoinNode.ideal_reduce(), com.cliffc.aa.node.PhiNode.ideal_reduce(), com.cliffc.aa.node.ParmNode.ideal_reduce(), com.cliffc.aa.node.CallEpiNode.ideal_reduce(), com.cliffc.aa.node.NewNode< TypeStruct >.ideal_reduce(), com.cliffc.aa.node.CallNode.ideal_reduce(), com.cliffc.aa.node.Node.in(), com.cliffc.aa.node.Node.insert(), com.cliffc.aa.node.ScopeNode.is_closure(), com.cliffc.aa.node.ThunkNode.is_copy(), com.cliffc.aa.node.RegionNode.is_copy(), com.cliffc.aa.node.PrimNode.AndThen.is_copy(), com.cliffc.aa.node.PrimNode.OrElse.is_copy(), com.cliffc.aa.node.UnresolvedNode.is_pure_call(), com.cliffc.aa.node.Node.kill(), com.cliffc.aa.node.NewNode< TypeStruct >.kill2(), com.cliffc.aa.node.Node.len(), com.cliffc.aa.node.MemPrimNode.ReadPrimNode.live_use(), com.cliffc.aa.node.PhiNode.live_use(), com.cliffc.aa.node.CallNode.live_use(), com.cliffc.aa.node.DefMemNode.make_mem(), com.cliffc.aa.node.FunPtrNode.merge_ref_def(), com.cliffc.aa.node.Node.more_flow(), com.cliffc.aa.node.Node.more_ideal(), com.cliffc.aa.node.CallNode.nargs(), com.cliffc.aa.node.Node.Node(), com.cliffc.aa.node.CallEpiNode.nwired(), com.cliffc.aa.node.CProjNode.op_prec(), com.cliffc.aa.node.UnresolvedNode.op_prec(), com.cliffc.aa.node.CallNode.parms(), com.cliffc.aa.node.Node.pop(), com.cliffc.aa.node.Node.remove(), com.cliffc.aa.node.Node.replace(), com.cliffc.aa.node.FunNode.ret(), com.cliffc.aa.node.CallEpiNode.sane_wiring(), com.cliffc.aa.node.Node.set_dead(), com.cliffc.aa.node.Node.set_def(), com.cliffc.aa.node.CallNode.set_fdx(), com.cliffc.aa.node.CallEpiNode.set_is_copy(), com.cliffc.aa.node.FunNode.split_callers(), com.cliffc.aa.node.FunNode.split_size(), com.cliffc.aa.node.RegionNode.stacked_region(), com.cliffc.aa.node.FunPtrNode.str(), com.cliffc.aa.Parse.string(), com.cliffc.aa.node.TestNode.stx(), com.cliffc.aa.node.RetNode.tail_recursive(), com.cliffc.aa.Parse.term(), com.cliffc.aa.node.TestNode.test1monotonic(), com.cliffc.aa.node.TestNode.test1monotonic_intrinsic(), com.cliffc.aa.node.TestNode.test1monotonic_prim(), com.cliffc.aa.node.MemJoinNode.unify(), com.cliffc.aa.node.FunNode.unwire(), com.cliffc.aa.node.CallEpiNode.unwire(), com.cliffc.aa.node.DefMemNode.value(), com.cliffc.aa.node.UnresolvedNode.value(), com.cliffc.aa.node.PhiNode.value(), com.cliffc.aa.node.ParmNode.value(), com.cliffc.aa.node.ConTypeNode.value(), com.cliffc.aa.node.RegionNode.value(), com.cliffc.aa.node.MemJoinNode.value(), com.cliffc.aa.node.PrimNode.value(), com.cliffc.aa.node.PrimNode.ConvertTypeName.value(), com.cliffc.aa.node.CallNode.value(), com.cliffc.aa.node.FunNode.value(), com.cliffc.aa.node.RegionNode.walk_dom_last(), com.cliffc.aa.node.Node.walk_initype(), com.cliffc.aa.node.Node.walk_opt(), com.cliffc.aa.node.Node.walkerr_def(), com.cliffc.aa.node.CallEpiNode.wire1(), and com.cliffc.aa.node.FunPtrNode.xstr().

◆ _elock

◆ _fidx

◆ _INIT0_CNT

int com.cliffc.aa.node.Node._INIT0_CNT
staticinherited

◆ _keep

◆ _live

TypeMem com.cliffc.aa.node.Node._live
inherited

Definition at line 89 of file Node.java.

Referenced by com.cliffc.aa.node.LoadNode._live_use(), com.cliffc.aa.node.NewNode< TypeStruct >.add_flow_def_extra(), com.cliffc.aa.node.FunPtrNode.add_flow_extra(), com.cliffc.aa.node.Node.con(), com.cliffc.aa.node.ConNode< T extends Type >.ConNode(), com.cliffc.aa.node.Node.do_flow(), com.cliffc.aa.node.Node.dump(), com.cliffc.aa.node.ErrNode.ErrNode(), com.cliffc.aa.node.IfNode.flip(), com.cliffc.aa.GVNGCM.gcp(), com.cliffc.aa.node.LoadNode.get_fld2(), com.cliffc.aa.node.MrgProjNode.ideal_reduce(), com.cliffc.aa.node.StoreNode.ideal_reduce(), com.cliffc.aa.node.CallEpiNode.ideal_reduce(), com.cliffc.aa.node.CallNode.ideal_reduce(), com.cliffc.aa.node.FunNode.ideal_reduce(), com.cliffc.aa.node.Node.init1(), com.cliffc.aa.node.MemSplitNode.insert_split(), com.cliffc.aa.node.MemJoinNode.live(), com.cliffc.aa.node.CallNode.live(), com.cliffc.aa.node.ThretNode.live_use(), com.cliffc.aa.node.DefMemNode.live_use(), com.cliffc.aa.node.FreshNode.live_use(), com.cliffc.aa.node.FP2DispNode.live_use(), com.cliffc.aa.node.MProjNode.live_use(), com.cliffc.aa.node.CastNode.live_use(), com.cliffc.aa.node.NewNode< TypeStruct >.live_use(), com.cliffc.aa.node.MrgProjNode.live_use(), com.cliffc.aa.node.PhiNode.live_use(), com.cliffc.aa.node.MemPrimNode.LValueLength.live_use(), com.cliffc.aa.node.AssertNode.live_use(), com.cliffc.aa.node.IntrinsicNode.live_use(), com.cliffc.aa.node.StoreNode.live_use(), com.cliffc.aa.node.FunPtrNode.live_use(), com.cliffc.aa.node.ScopeNode.live_use(), com.cliffc.aa.node.MemJoinNode.live_use(), com.cliffc.aa.node.MemPrimNode.WritePrimNode.live_use(), com.cliffc.aa.node.RetNode.live_use(), com.cliffc.aa.node.LoadNode.live_use(), com.cliffc.aa.node.CallEpiNode.live_use(), com.cliffc.aa.node.Node.live_use(), com.cliffc.aa.node.CallNode.live_use(), com.cliffc.aa.node.Node.live_uses(), com.cliffc.aa.node.Node.merge(), com.cliffc.aa.node.Node.more_flow(), com.cliffc.aa.node.Node.more_ideal(), com.cliffc.aa.node.Node.Node(), com.cliffc.aa.node.PhiNode.PhiNode(), com.cliffc.aa.GVNGCM.revalive(), com.cliffc.aa.node.RetNode.tail_recursive(), com.cliffc.aa.TestLive.testBasic(), com.cliffc.aa.TestLive.testNewObj(), com.cliffc.aa.node.ThretNode.ThretNode(), com.cliffc.aa.node.DefMemNode.value(), com.cliffc.aa.node.Node.walk_initype(), com.cliffc.aa.node.Node.walk_opt(), com.cliffc.aa.node.CallEpiNode.wire0(), and com.cliffc.aa.node.Node.xliv().

◆ _must_inline

int com.cliffc.aa.node.FunNode._must_inline
static

◆ _name

◆ _nongens

TV2 [] com.cliffc.aa.node.FunNode._nongens
private

Definition at line 70 of file FunNode.java.

Referenced by com.cliffc.aa.node.FunNode.set_nongens().

◆ _op

◆ _op_prec

◆ _sig

◆ _thunk_rhs

◆ _tvar

TV2 com.cliffc.aa.node.Node._tvar
packageinherited

◆ _uid

◆ _uses

Ary<Node> com.cliffc.aa.node.Node._uses
inherited

Definition at line 245 of file Node.java.

Referenced by com.cliffc.aa.node.CallNode._ideal_grow(), com.cliffc.aa.node.Node.add_def(), com.cliffc.aa.node.MemJoinNode.add_flow_def_extra(), com.cliffc.aa.node.MrgProjNode.add_flow_def_extra(), com.cliffc.aa.node.RegionNode.add_flow_def_extra(), com.cliffc.aa.node.CProjNode.add_flow_use_extra(), com.cliffc.aa.node.ParmNode.add_flow_use_extra(), com.cliffc.aa.node.RegionNode.add_flow_use_extra(), com.cliffc.aa.node.StoreNode.add_reduce_extra(), com.cliffc.aa.GVNGCM.add_unuse(), com.cliffc.aa.GVNGCM.add_work_uses(), com.cliffc.aa.node.MemPrimNode.ReadPrimNode.as_fun(), com.cliffc.aa.node.MemPrimNode.WritePrimNode.as_fun(), com.cliffc.aa.node.PrimNode.as_fun(), com.cliffc.aa.node.NewNode< T extends TypeObj< T >.NewPrimNode< TypeAry >.as_fun(), com.cliffc.aa.node.FunNode.bad_mem_use(), com.cliffc.aa.node.NewNode< TypeStruct >.captured(), com.cliffc.aa.node.CallNode.cepi(), com.cliffc.aa.node.FunNode.check_callers(), com.cliffc.aa.node.Node.check_solo_mem_writer(), com.cliffc.aa.node.MemSplitNode.check_split(), com.cliffc.aa.node.MemJoinNode.combine_splits(), com.cliffc.aa.node.Node.copy(), com.cliffc.aa.node.Node.del(), com.cliffc.aa.node.FunPtrNode.display_used(), com.cliffc.aa.node.Node.do_flow(), com.cliffc.aa.node.Node.do_reduce(), com.cliffc.aa.node.Node.dump(), com.cliffc.aa.node.ErrNode.err(), com.cliffc.aa.node.CallNode.err(), com.cliffc.aa.node.Node.find(), com.cliffc.aa.node.FunNode.find_body(), com.cliffc.aa.node.FunNode.find_type_split_index(), com.cliffc.aa.node.IfNode.flip(), com.cliffc.aa.node.FunNode.fptr(), com.cliffc.aa.node.RetNode.funptr(), com.cliffc.aa.GVNGCM.gcp(), com.cliffc.aa.node.Node.get_mem_writer(), com.cliffc.aa.node.StoreNode.ideal_grow(), com.cliffc.aa.node.PrimNode.AndThen.ideal_grow(), com.cliffc.aa.node.PrimNode.OrElse.ideal_grow(), com.cliffc.aa.node.IfNode.ideal_reduce(), com.cliffc.aa.node.RegionNode.ideal_reduce(), com.cliffc.aa.node.MrgProjNode.ideal_reduce(), com.cliffc.aa.node.MemJoinNode.ideal_reduce(), com.cliffc.aa.node.StoreNode.ideal_reduce(), com.cliffc.aa.node.CallEpiNode.ideal_reduce(), com.cliffc.aa.node.IntrinsicNode.ideal_reduce(), com.cliffc.aa.node.RetNode.ideal_reduce(), com.cliffc.aa.node.FunNode.ideal_reduce(), com.cliffc.aa.node.Node.insert(), com.cliffc.aa.node.Node.is_dead(), com.cliffc.aa.node.MemSplitNode.join(), com.cliffc.aa.node.Node.kill(), com.cliffc.aa.Parse.kill(), com.cliffc.aa.node.NewNode< TypeStruct >.kill2(), com.cliffc.aa.node.ConNode< T extends Type >.live(), com.cliffc.aa.node.ScopeNode.live(), com.cliffc.aa.node.Node.live(), com.cliffc.aa.node.FunNode.make_new_fun(), com.cliffc.aa.node.FunPtrNode.merge_ref_def(), com.cliffc.aa.node.Node.more_flow(), com.cliffc.aa.node.Node.more_ideal(), com.cliffc.aa.node.NewNode< TypeStruct >.mrg(), com.cliffc.aa.node.FunNode.names(), com.cliffc.aa.node.Node.Node(), com.cliffc.aa.node.FunNode.parm(), com.cliffc.aa.node.FunNode.parms(), com.cliffc.aa.node.Node.postorder(), com.cliffc.aa.node.ProjNode.proj(), com.cliffc.aa.node.NewNode< TypeStruct >.ptr(), com.cliffc.aa.node.MemSplitNode.remove_alias(), com.cliffc.aa.Parse.remove_unknown_callers(), com.cliffc.aa.node.FunNode.ret(), com.cliffc.aa.GVNGCM.retype_mem(), com.cliffc.aa.node.Node.set_dead(), com.cliffc.aa.node.Node.set_def(), com.cliffc.aa.node.ScopeNode.set_mem(), com.cliffc.aa.node.FunNode.split_callers(), com.cliffc.aa.node.RegionNode.stacked_region(), com.cliffc.aa.node.RetNode.tail_recursive(), com.cliffc.aa.node.ThunkNode.thret(), com.cliffc.aa.node.Node.unuse(), com.cliffc.aa.node.CallEpiNode.unwire(), com.cliffc.aa.node.CEProjNode.value(), com.cliffc.aa.node.Node.walk_initype(), com.cliffc.aa.node.Node.walk_opt(), com.cliffc.aa.node.CallEpiNode.wire0(), com.cliffc.aa.GVNGCM.xform(), and com.cliffc.aa.GVNGCM.xreduce().

◆ _val

Type com.cliffc.aa.node.Node._val
inherited

Definition at line 88 of file Node.java.

Referenced by com.cliffc.aa.node.Node._do_reduce(), com.cliffc.aa.node.LoadNode._find_previous_store_call(), com.cliffc.aa.node.CallNode._ideal_grow(), com.cliffc.aa.node.MemPrimNode.LValueLength._live_use(), com.cliffc.aa.node.LoadNode._live_use(), com.cliffc.aa.node.FreshNode.add_flow_extra(), com.cliffc.aa.node.CastNode.add_flow_extra(), com.cliffc.aa.node.CallNode.add_flow_extra(), com.cliffc.aa.node.FunPtrNode.add_flow_use_extra(), com.cliffc.aa.node.CallEpiNode.check_and_wire(), com.cliffc.aa.node.RetNode.check_phi_type(), com.cliffc.aa.node.CastNode.checked(), com.cliffc.aa.node.MemJoinNode.combine_splits(), com.cliffc.aa.node.ScopeNode.compute_live_mem(), com.cliffc.aa.node.Node.con(), com.cliffc.aa.node.NewObjNode.create_active(), com.cliffc.aa.Parse.do_exit(), com.cliffc.aa.node.Node.do_flow(), com.cliffc.aa.node.Node.dump(), com.cliffc.aa.node.MemPrimNode.err(), com.cliffc.aa.node.ErrNode.err(), com.cliffc.aa.node.ParmNode.err(), com.cliffc.aa.node.PhiNode.err(), com.cliffc.aa.node.AssertNode.err(), com.cliffc.aa.node.IntrinsicNode.err(), com.cliffc.aa.node.StoreNode.err(), com.cliffc.aa.node.LoadNode.err(), com.cliffc.aa.node.CallNode.err(), com.cliffc.aa.node.StoreNode.escapees(), com.cliffc.aa.node.MemPrimNode.WritePrimNode.escapees(), com.cliffc.aa.node.CallNode.escapees(), com.cliffc.aa.Parse.fact(), com.cliffc.aa.node.CallNode.fidxs(), com.cliffc.aa.node.LoadNode.find_previous_store(), com.cliffc.aa.node.FunNode.find_type_split(), com.cliffc.aa.node.FunNode.find_type_split_index(), com.cliffc.aa.Parse.func(), com.cliffc.aa.Parse.gather_errors(), com.cliffc.aa.GVNGCM.gcp(), com.cliffc.aa.node.AssertNode.ideal_grow(), com.cliffc.aa.node.StoreNode.ideal_grow(), com.cliffc.aa.node.CallNode.ideal_grow(), com.cliffc.aa.node.FunNode.ideal_inline(), com.cliffc.aa.node.LoadNode.ideal_mono(), com.cliffc.aa.node.IfNode.ideal_reduce(), com.cliffc.aa.node.FreshNode.ideal_reduce(), com.cliffc.aa.node.MrgProjNode.ideal_reduce(), com.cliffc.aa.node.CastNode.ideal_reduce(), com.cliffc.aa.node.MemJoinNode.ideal_reduce(), com.cliffc.aa.node.LoadNode.ideal_reduce(), com.cliffc.aa.node.PhiNode.ideal_reduce(), com.cliffc.aa.node.StoreNode.ideal_reduce(), com.cliffc.aa.node.ParmNode.ideal_reduce(), com.cliffc.aa.node.CallEpiNode.ideal_reduce(), com.cliffc.aa.node.IntrinsicNode.ideal_reduce(), com.cliffc.aa.node.RetNode.ideal_reduce(), com.cliffc.aa.node.FunPtrNode.ideal_reduce(), com.cliffc.aa.node.ScopeNode.ideal_reduce(), com.cliffc.aa.node.CallNode.ideal_reduce(), com.cliffc.aa.Parse.ifex(), com.cliffc.aa.node.Node.init1(), com.cliffc.aa.node.IfNode.is_copy(), com.cliffc.aa.node.CallNode.is_copy(), com.cliffc.aa.node.CallNode.least_cost(), com.cliffc.aa.node.Node.live(), com.cliffc.aa.node.CallNode.live(), com.cliffc.aa.node.MemPrimNode.ReadPrimNode.live_use(), com.cliffc.aa.node.CallEpiNode.live_use(), com.cliffc.aa.node.CallNode.live_use(), com.cliffc.aa.node.CallNode.live_use_call(), com.cliffc.aa.node.Node.live_uses(), com.cliffc.aa.Env.lookup_valtype(), com.cliffc.aa.Parse.merge_exits(), com.cliffc.aa.node.Node.more_flow(), com.cliffc.aa.node.Node.more_ideal(), com.cliffc.aa.node.Node.Node(), com.cliffc.aa.GVNGCM.remove_ambi(), com.cliffc.aa.GVNGCM.retype_mem(), com.cliffc.aa.node.ScopeNode.set_mem(), com.cliffc.aa.node.TestNode.set_type(), com.cliffc.aa.node.Node.sharptr(), com.cliffc.aa.node.Node.should_con(), com.cliffc.aa.node.FunNode.split_callers(), com.cliffc.aa.node.FunNode.split_size(), com.cliffc.aa.node.RetNode.tail_recursive(), com.cliffc.aa.Parse.term(), com.cliffc.aa.node.TestNode.test1jig(), com.cliffc.aa.node.TestNode.test1monotonic_init(), com.cliffc.aa.TestLive.testBasic(), com.cliffc.aa.node.TestNodeSmall.testCallNodeResolve2(), com.cliffc.aa.node.TestNode.testMonotonic(), com.cliffc.aa.TestLive.testNewObj(), com.cliffc.aa.node.TestNodeSmall.testRecursiveDisplay(), com.cliffc.aa.node.TestNodeSmall.testUnresolvedAdd(), com.cliffc.aa.Parse.tstmt(), com.cliffc.aa.Parse.type0(), com.cliffc.aa.Parse.typechk(), com.cliffc.aa.node.NewObjNode.update(), com.cliffc.aa.node.Node.val(), com.cliffc.aa.node.DefMemNode.value(), com.cliffc.aa.node.MProjNode.value(), com.cliffc.aa.node.MemSplitNode.value(), com.cliffc.aa.node.UnresolvedNode.value(), com.cliffc.aa.node.MrgProjNode.value(), com.cliffc.aa.node.AssertNode.value(), com.cliffc.aa.node.IntrinsicNode.value(), com.cliffc.aa.node.StoreNode.value(), com.cliffc.aa.node.FunPtrNode.value(), com.cliffc.aa.node.RetNode.value(), com.cliffc.aa.node.LoadNode.value(), com.cliffc.aa.node.CallEpiNode.value(), com.cliffc.aa.node.CallNode.value(), com.cliffc.aa.node.Node.walk_initype(), com.cliffc.aa.node.Node.walk_opt(), com.cliffc.aa.node.Node.walkerr_def(), com.cliffc.aa.node.CallEpiNode.wire0(), and com.cliffc.aa.node.Node.xval().

◆ CNT

int com.cliffc.aa.node.Node.CNT =1
staticprivateinherited

◆ FLOW_VISIT

final VBitSet com.cliffc.aa.node.Node.FLOW_VISIT = new VBitSet()
staticprivateinherited

Definition at line 746 of file Node.java.

Referenced by com.cliffc.aa.node.Node.more_flow().

◆ FUNS

◆ LIVE

◆ OP_CALL

◆ OP_CALLEPI

final byte com.cliffc.aa.node.Node.OP_CALLEPI = 2
staticpackageinherited

◆ OP_CAST

final byte com.cliffc.aa.node.Node.OP_CAST = 3
staticpackageinherited

◆ OP_CON

final byte com.cliffc.aa.node.Node.OP_CON = 4
staticpackageinherited

Definition at line 20 of file Node.java.

Referenced by com.cliffc.aa.node.ConNode< T extends Type >.ConNode().

◆ OP_CONTYPE

final byte com.cliffc.aa.node.Node.OP_CONTYPE = 5
staticpackageinherited

Definition at line 21 of file Node.java.

Referenced by com.cliffc.aa.node.ConTypeNode.ConTypeNode().

◆ OP_CPROJ

◆ OP_DEFMEM

final byte com.cliffc.aa.node.Node.OP_DEFMEM = 7
staticpackageinherited

◆ OP_ERR

final byte com.cliffc.aa.node.Node.OP_ERR = 8
staticpackageinherited

Definition at line 24 of file Node.java.

Referenced by com.cliffc.aa.node.ErrNode.ErrNode().

◆ OP_FP2DISP

final byte com.cliffc.aa.node.Node.OP_FP2DISP =10
staticpackageinherited

Definition at line 26 of file Node.java.

Referenced by com.cliffc.aa.node.FP2DispNode.FP2DispNode().

◆ OP_FRESH

final byte com.cliffc.aa.node.Node.OP_FRESH = 9
staticpackageinherited

◆ OP_FUN

◆ OP_FUNPTR

final byte com.cliffc.aa.node.Node.OP_FUNPTR =12
staticpackageinherited

◆ OP_IF

◆ OP_JOIN

final byte com.cliffc.aa.node.Node.OP_JOIN =14
staticpackageinherited

Definition at line 30 of file Node.java.

Referenced by com.cliffc.aa.node.MemJoinNode.MemJoinNode().

◆ OP_LOAD

final byte com.cliffc.aa.node.Node.OP_LOAD =15
staticpackageinherited

◆ OP_LOOP

final byte com.cliffc.aa.node.Node.OP_LOOP =16
staticpackageinherited

◆ OP_MAX

final byte com.cliffc.aa.node.Node.OP_MAX =36
staticpackageinherited

Definition at line 52 of file Node.java.

Referenced by com.cliffc.aa.node.FunNode.split_size().

◆ OP_NAME

final byte com.cliffc.aa.node.Node.OP_NAME =17
staticpackageinherited

◆ OP_NEWARY

final byte com.cliffc.aa.node.Node.OP_NEWARY =19
staticpackageinherited

Definition at line 35 of file Node.java.

◆ OP_NEWOBJ

final byte com.cliffc.aa.node.Node.OP_NEWOBJ =18
staticpackageinherited

◆ OP_NEWSTR

final byte com.cliffc.aa.node.Node.OP_NEWSTR =20
staticpackageinherited

◆ OP_PARM

final byte com.cliffc.aa.node.Node.OP_PARM =21
staticpackageinherited

◆ OP_PHI

◆ OP_PRIM

final byte com.cliffc.aa.node.Node.OP_PRIM =23
staticpackageinherited

◆ OP_PROJ

final byte com.cliffc.aa.node.Node.OP_PROJ =24
staticpackageinherited

◆ OP_REGION

◆ OP_RET

◆ OP_SCOPE

final byte com.cliffc.aa.node.Node.OP_SCOPE =27
staticpackageinherited

◆ OP_SPLIT

final byte com.cliffc.aa.node.Node.OP_SPLIT =28
staticpackageinherited

◆ OP_START

final byte com.cliffc.aa.node.Node.OP_START =29
staticpackageinherited

◆ OP_STMEM

final byte com.cliffc.aa.node.Node.OP_STMEM =30
staticpackageinherited

Definition at line 46 of file Node.java.

Referenced by com.cliffc.aa.node.StartMemNode.StartMemNode().

◆ OP_STORE

final byte com.cliffc.aa.node.Node.OP_STORE =31
staticpackageinherited

◆ OP_THRET

final byte com.cliffc.aa.node.Node.OP_THRET =32
staticpackageinherited

Definition at line 48 of file Node.java.

Referenced by com.cliffc.aa.node.ThretNode.ThretNode().

◆ OP_THUNK

final byte com.cliffc.aa.node.Node.OP_THUNK =33
staticpackageinherited

Definition at line 49 of file Node.java.

Referenced by com.cliffc.aa.node.ThunkNode.ThunkNode().

◆ OP_TYPE

final byte com.cliffc.aa.node.Node.OP_TYPE =34
staticpackageinherited

Definition at line 50 of file Node.java.

Referenced by com.cliffc.aa.node.AssertNode.AssertNode().

◆ OP_UNR

final byte com.cliffc.aa.node.Node.OP_UNR =35
staticpackageinherited

Definition at line 51 of file Node.java.

Referenced by com.cliffc.aa.node.UnresolvedNode.UnresolvedNode().

◆ STRS

final String [] com.cliffc.aa.node.Node.STRS = new String[] { null, "Call", "CallEpi", "Cast", "Con", "ConType", "CProj", "DefMem", "Err", "Fresh", "FP2Disp", "Fun", "FunPtr", "If", "Join", "Load", "Loop", "Name", "NewObj", "NewAry", "NewStr", "Parm", "Phi", "Prim", "Proj", "Region", "Return", "Scope","Split", "Start", "StartMem", "Store", "Thret", "Thunk", "Type", "Unresolved" }
staticprivateinherited

Definition at line 54 of file Node.java.

Referenced by com.cliffc.aa.node.Node.xstr().

◆ VALS


The documentation for this class was generated from the following file:
com.cliffc.aa.type.BitsAlias.FULL
static BitsAlias FULL
Definition: BitsAlias.java:27
com.cliffc.aa.node.FunNode.FunNode
FunNode(PrimNode prim)
Definition: FunNode.java:78
com.cliffc.aa.node.Node.OP_PROJ
static final byte OP_PROJ
Definition: Node.java:40
com.cliffc.aa.util.Ary.at
E at(int i)
Definition: Ary.java:25
com.cliffc.aa.type.TypeMemPtr.NO_DISP
static final Type NO_DISP
Definition: TypeMemPtr.java:80
com.cliffc.aa.node.Node._do_reduce
Node _do_reduce()
Definition: Node.java:570
com.cliffc.aa.type.BitsFun.EMPTY
static final BitsFun EMPTY
Definition: BitsFun.java:37
com.cliffc.aa.GVNGCM.add_unuse
Node add_unuse(Node n)
Definition: GVNGCM.java:59
com.cliffc.aa.type.TypeMem.DEAD
static final TypeMem DEAD
Definition: TypeMem.java:226
com.cliffc.aa.type.TypeFunPtr
Definition: TypeFunPtr.java:23
com.cliffc.aa.node.PrimNode
Definition: PrimNode.java:20
com.cliffc.aa.util.Ary.push
E push(E e)
Add element in amortized constant time.
Definition: Ary.java:58
com.cliffc.aa.type.TypeTuple.make_args
static TypeTuple make_args(Type[] ts)
Definition: TypeTuple.java:106
com.cliffc.aa.type.TypeFunPtr._nargs
int _nargs
Definition: TypeFunPtr.java:27
com.cliffc.aa.type.BitsFun.make0
static BitsFun make0(int bit)
Definition: BitsFun.java:44
com.cliffc.aa.node.Node.OP_START
static final byte OP_START
Definition: Node.java:45
com.cliffc.aa.util.Ary.isEmpty
boolean isEmpty()
Definition: Ary.java:20
com.cliffc.aa.type.Type.isa
boolean isa(Type t)
Definition: Type.java:623
com.cliffc.aa.node.FunNode.find_type_split
Type[] find_type_split(Node[] parms)
Definition: FunNode.java:354
com.cliffc.aa.type.TypeMem.live_no_disp
boolean live_no_disp()
Definition: TypeMem.java:320
com.cliffc.aa.node.Node.walk_dom_last
Node walk_dom_last(Predicate< Node > P)
Definition: Node.java:863
com.cliffc.aa.node.Node.live
TypeMem live(GVNGCM.Mode opt_mode)
Definition: Node.java:478
com.cliffc.aa.AA.UID
static int UID
Definition: AA.java:43
com.cliffc.aa.Env.XCTRL
static ConNode XCTRL
Definition: Env.java:21
com.cliffc.aa.type.TypeMem
Memory type; the state of all of memory; memory edges order memory ops.
Definition: TypeMem.java:53
com.cliffc.aa.node.FunNode._nongens
TV2[] _nongens
Definition: FunNode.java:70
com.cliffc.aa.util.Util.eq
static boolean eq(String s0, String s1)
Definition: Util.java:16
com.cliffc.aa.node.FunNode.make_new_fun
FunNode make_new_fun(RetNode ret, TypeTuple new_formals)
Definition: FunNode.java:619
com.cliffc.aa.GVNGCM.add_mono
public< N extends Node > N add_mono(N n)
Definition: GVNGCM.java:51
com.cliffc.aa.type.Type.join
Type join(Type t)
Definition: Type.java:619
com.cliffc.aa.node.FunNode._name
String _name
Definition: FunNode.java:59
com.cliffc.aa.node.FunNode.fidx
int fidx()
Definition: FunNode.java:102
com.cliffc.aa.node.PrimNode._thunk_rhs
boolean _thunk_rhs
Definition: PrimNode.java:25
com.cliffc.aa.node.Node._live
TypeMem _live
Definition: Node.java:89
com.cliffc.aa.node.Node.OP_LOOP
static final byte OP_LOOP
Definition: Node.java:32
com.cliffc.aa.node.FunNode._op_prec
final byte _op_prec
Definition: FunNode.java:65
com.cliffc.aa.GVNGCM.add_flow_uses
void add_flow_uses(Node n)
Definition: GVNGCM.java:55
com.cliffc.aa.type.Type.widen
Type widen()
Definition: Type.java:828
com.cliffc.aa.util.Ary.pop
E pop()
Definition: Ary.java:41
com.cliffc.aa.node.FunNode.type_special
TypeTuple type_special(Node[] parms)
Definition: FunNode.java:466
com.cliffc.aa.util.Ary.addAll
Ary< E > addAll(Collection<? extends E > c)
Definition: Ary.java:151
com.cliffc.aa.type.TypeMem.LIVE_BOT
static final TypeMem LIVE_BOT
Definition: TypeMem.java:226
com.cliffc.aa.node.FunNode.split_size
int split_size(Ary< Node > body, Node[] parms)
Definition: FunNode.java:536
com.cliffc.aa.node.Node.add_flow_use_extra
void add_flow_use_extra(Node chg)
Definition: Node.java:514
com.cliffc.aa.node.Node
Definition: Node.java:16
com.cliffc.aa.node.FunNode.has_unknown_callers
boolean has_unknown_callers()
Definition: FunNode.java:185
com.cliffc.aa.type.TypeRPC.ALL_CALL
static final TypeRPC ALL_CALL
Definition: TypeRPC.java:31
com.cliffc.aa.node.Node.subsume
Node subsume(Node nnn)
Definition: Node.java:201
com.cliffc.aa.node.Node.VALS
static final ConcurrentHashMap< Node, Node > VALS
Definition: Node.java:537
com.cliffc.aa.node.Node.OP_SPLIT
static final byte OP_SPLIT
Definition: Node.java:44
com.cliffc.aa.type.TypeMem.is_live
boolean is_live()
Definition: TypeMem.java:560
com.cliffc.aa.type.TypeFunPtr.GENERIC_FUNPTR
static final TypeFunPtr GENERIC_FUNPTR
Definition: TypeFunPtr.java:80
com.cliffc.aa.GVNGCM.add_work_all
Node add_work_all(Node n)
Definition: GVNGCM.java:73
com.cliffc.aa.type.Type
an implementation of language AA
Definition: Type.java:94
com.cliffc.aa.type.TypeFunSig.make
static TypeFunSig make(String[] args, TypeTuple formals, TypeTuple ret)
Definition: TypeFunSig.java:71
com.cliffc.aa.node.Node.OP_CALLEPI
static final byte OP_CALLEPI
Definition: Node.java:18
com.cliffc.aa.util.Ary
Definition: Ary.java:11
com.cliffc.aa.node.Node.is_multi_tail
boolean is_multi_tail()
Definition: Node.java:355
com.cliffc.aa.node.Node.add_flow_def_extra
void add_flow_def_extra(Node chg)
Definition: Node.java:515
com.cliffc.aa.type.BitsAlias
Definition: BitsAlias.java:8
com.cliffc.aa.type.TypeTuple
Definition: TypeTuple.java:11
com.cliffc.aa.node.Node.do_mono
Node do_mono()
Definition: Node.java:632
com.cliffc.aa.node.Node.keep
public< N extends Node > N keep()
Definition: Node.java:228
com.cliffc.aa.node.FunNode.str
String str()
Definition: FunNode.java:107
com.cliffc.aa.util.Ary._len
int _len
Definition: Ary.java:13
com.cliffc.aa.node.Node.err
ErrMsg err(boolean fast)
Definition: Node.java:526
com.cliffc.aa.type.TypeFunPtr._fidxs
BitsFun _fidxs
Definition: TypeFunPtr.java:26
com.cliffc.aa.node.Node.unelock
void unelock()
Definition: Node.java:128
com.cliffc.aa.type.TypeFunPtr.fidxs
BitsFun fidxs()
Definition: TypeFunPtr.java:127
com.cliffc.aa.GVNGCM.Mode._CG
final boolean _CG
Definition: GVNGCM.java:19
com.cliffc.aa.node.Node._val
Type _val
Definition: Node.java:88
com.cliffc.aa.node.Node.find
Node find(int uid)
Definition: Node.java:427
com.cliffc.aa.type.Type.ANY
static final Type ANY
Definition: Type.java:325
com.cliffc.aa.node.Node.OP_FRESH
static final byte OP_FRESH
Definition: Node.java:25
com.cliffc.aa.node.Node.OP_FUN
static final byte OP_FUN
Definition: Node.java:27
com.cliffc.aa.node.Node.add_def
Node add_def(Node n)
Definition: Node.java:152
com.cliffc.aa.node.PrimNode.NE_OOP
Definition: PrimNode.java:446
com.cliffc.aa.node.PrimNode.MulF64
Definition: PrimNode.java:293
com.cliffc.aa.node.FunNode.xstr
String xstr()
Definition: FunNode.java:105
com.cliffc.aa.type.Type.meet
final Type meet(Type t)
Definition: Type.java:412
com.cliffc.aa.node.FunNode.formal
Type formal(int idx)
Definition: FunNode.java:187
com.cliffc.aa.type.TypeStruct
A memory-based collection of optionally named fields.
Definition: TypeStruct.java:50
com.cliffc.aa.type.Bits.test_recur
boolean test_recur(int i)
Definition: Bits.java:232
com.cliffc.aa.type.Bits.test
static boolean test(long[] bits, int i)
Definition: Bits.java:224
com.cliffc.aa.type.Type.str
SB str(SB sb, VBitSet dups, TypeMem mem, boolean debug)
Definition: Type.java:131
com.cliffc.aa.node.PrimNode.EQ_I64
Definition: PrimNode.java:411
com.cliffc.aa.node.Node.OP_CALL
static final byte OP_CALL
Definition: Node.java:17
com.cliffc.aa.node.PrimNode._name
final String _name
Definition: PrimNode.java:21
com.cliffc.aa.node.FunNode._cnt_size_inlines
byte _cnt_size_inlines
Definition: FunNode.java:72
com.cliffc.aa.type.Types
Definition: Types.java:9
com.cliffc.aa.Env.START
static StartNode START
Definition: Env.java:14
com.cliffc.aa.node.Node.ideal_reduce
Node ideal_reduce()
Definition: Node.java:441
com.cliffc.aa.util.SB.unchar
SB unchar()
Definition: SB.java:58
com.cliffc.aa.type.Type.ALL
static final Type ALL
Definition: Type.java:324
com.cliffc.aa.type.TypeFunSig._ret
TypeTuple _ret
Definition: TypeFunSig.java:16
com.cliffc.aa.node.Node.is_prim
boolean is_prim()
Definition: Node.java:260
com.cliffc.aa.node.Node.postorder
void postorder(Ary< Node > nodes, VBitSet bs)
Definition: Node.java:383
com.cliffc.aa.node.RetNode.set_fidx
void set_fidx(int fidx)
Definition: RetNode.java:47
com.cliffc.aa.node.Node.Node
Node(byte op)
Definition: Node.java:247
com.cliffc.aa.util.VBitSet.tset
boolean tset(int idx)
Definition: VBitSet.java:7
com.cliffc.aa.type.TypeFunSig._args
String[] _args
Definition: TypeFunSig.java:14
com.cliffc.aa.node.Node.OP_MAX
static final byte OP_MAX
Definition: Node.java:52
com.cliffc.aa.type.TypeFunSig.arg
Type arg(int idx)
Definition: TypeFunSig.java:88
com.cliffc.aa.Env.GVN
static final GVNGCM GVN
Definition: Env.java:13
com.cliffc.aa.node.FunNode.find_type_split_index
int find_type_split_index(Node[] parms)
Definition: FunNode.java:326
com.cliffc.aa.node.FunNode.name
static String name(int fidx, boolean debug)
Definition: FunNode.java:109
com.cliffc.aa.node.Node.CNT
static int CNT
Definition: Node.java:59
com.cliffc.aa.type.TypeFunSig.nargs
int nargs()
Definition: TypeFunSig.java:87
com.cliffc.aa.type.TypeObj
Definition: TypeObj.java:15
com.cliffc.aa.node.FunNode.fptr
FunPtrNode fptr()
Definition: FunNode.java:908
com.cliffc.aa.node.Node.unkeep
public< N extends Node > N unkeep()
Definition: Node.java:232
com.cliffc.aa.type.Type.is_con
boolean is_con()
Definition: Type.java:776
com.cliffc.aa.util.Ary.add
Ary< E > add(E e)
Add element in amortized constant time.
Definition: Ary.java:49
com.cliffc.aa.type.BitsFun.is_parent
static boolean is_parent(int idx)
Definition: BitsFun.java:48
com.cliffc.aa.node.Node.OP_CAST
static final byte OP_CAST
Definition: Node.java:19
com.cliffc.aa.node.Node.FLOW_VISIT
static final VBitSet FLOW_VISIT
Definition: Node.java:746
com.cliffc.aa.type.Type.above_center
boolean above_center()
Definition: Type.java:741
com.cliffc.aa.node.FunNode._fidx
int _fidx
Definition: FunNode.java:61
com.cliffc.aa.node.Node.should_con
boolean should_con(Type t)
Definition: Node.java:651
com.cliffc.aa.node.Node.is_dead
boolean is_dead()
Definition: Node.java:820
com.cliffc.aa.node.Node.value
abstract Type value(GVNGCM.Mode opt_mode)
com.cliffc.aa.type.TypeFunPtr.fidx
int fidx()
Definition: TypeFunPtr.java:128
com.cliffc.aa.node.Node.OP_IF
static final byte OP_IF
Definition: Node.java:29
com.cliffc.aa.node.Node.kill
Node kill()
Definition: Node.java:211
com.cliffc.aa.node.Node.OP_DEFMEM
static final byte OP_DEFMEM
Definition: Node.java:23
com.cliffc.aa.node.PrimNode._sig
final TypeFunSig _sig
Definition: PrimNode.java:22
com.cliffc.aa.type.TypeTuple.RET
static final TypeTuple RET
Definition: TypeTuple.java:130
com.cliffc.aa.node.Node._keep
byte _keep
Definition: Node.java:86
com.cliffc.aa.type.TypeFunPtr._disp
Type _disp
Definition: TypeFunPtr.java:28
com.cliffc.aa.node.Node.adderr
void adderr(HashSet< ErrMsg > errs)
Definition: Node.java:789
com.cliffc.aa.GVNGCM.add_reduce_uses
void add_reduce_uses(Node n)
Definition: GVNGCM.java:57
com.cliffc.aa.node.Node.merge
Node merge(Node x)
Definition: Node.java:702
com.cliffc.aa.node.FunNode.check_callers
boolean check_callers()
Definition: FunNode.java:311
com.cliffc.aa.util.Util
Definition: Util.java:5
com.cliffc.aa.type.Type.CTRL
static final Type CTRL
Definition: Type.java:326
com.cliffc.aa.type.TypeObj.UNUSED
static final TypeObj UNUSED
Definition: TypeObj.java:46
com.cliffc.aa.util.SB.s
SB s()
Definition: SB.java:41
com.cliffc.aa.node.FunNode.find_fidx
static FunNode find_fidx(int fidx)
Definition: FunNode.java:101
com.cliffc.aa.node.FunNode._must_inline
static int _must_inline
Definition: FunNode.java:73
com.cliffc.aa.type.TypeMem.basic_live
boolean basic_live()
Definition: TypeMem.java:561
com.cliffc.aa.node.FunNode.parms
Node[] parms()
Definition: FunNode.java:893
com.cliffc.aa.node.Node.in
Node in(int i)
Definition: Node.java:126
com.cliffc.aa.node.Node.OP_SCOPE
static final byte OP_SCOPE
Definition: Node.java:43
com.cliffc.aa.GVNGCM.on_flow
boolean on_flow(Node n)
Definition: GVNGCM.java:40
com.cliffc.aa.type.Types.get
Type[] get()
Definition: Types.java:66
com.cliffc.aa.tvar.TV2.make_leaf
static TV2 make_leaf(Node n, @NotNull String alloc_site)
Definition: TV2.java:126
com.cliffc.aa.node.Node.set_dead
void set_dead()
Definition: Node.java:821
com.cliffc.aa.node.Node.OP_LOAD
static final byte OP_LOAD
Definition: Node.java:31
com.cliffc.aa.type.Type.may_be_con
boolean may_be_con()
Definition: Type.java:759
com.cliffc.aa.type.Type.XCTRL
static final Type XCTRL
Definition: Type.java:327
com.cliffc.aa.GVNGCM
Definition: GVNGCM.java:12
com.cliffc.aa.type.TypeFunPtr.make
static TypeFunPtr make(BitsFun fidxs, int nargs, Type disp)
Definition: TypeFunPtr.java:67
com.cliffc.aa.type.Type.sharptr
Type sharptr(Type ptr)
Definition: Type.java:930
com.cliffc.aa.node.Node.unuse
Node unuse(Node old)
Definition: Node.java:178
com.cliffc.aa.node.Node.OP_NEWOBJ
static final byte OP_NEWOBJ
Definition: Node.java:34
com.cliffc.aa.node.FunNode.name
String name()
Definition: FunNode.java:114
com.cliffc.aa.type.TypeFunPtr.make_no_disp
TypeFunPtr make_no_disp()
Definition: TypeFunPtr.java:77
com.cliffc.aa.node.Node._INIT0_CNT
static int _INIT0_CNT
Definition: Node.java:58
com.cliffc.aa.type.Type.simple_ptr
Type simple_ptr()
Definition: Type.java:358
com.cliffc.aa.node.PrimNode.EQ_OOP
Definition: PrimNode.java:415
com.cliffc.aa.type.BitsAlias.parent
static int parent(int kid)
Definition: BitsAlias.java:59
com.cliffc.aa.node.FunNode.noinline
boolean noinline()
Definition: FunNode.java:179
com.cliffc.aa.util.VBitSet
Definition: VBitSet.java:5
com.cliffc.aa.type.TypeFunSig.make_from_arg
TypeFunSig make_from_arg(int idx, Type arg)
Definition: TypeFunSig.java:80
com.cliffc.aa.node.Node.add_reduce_extra
void add_reduce_extra()
Definition: Node.java:517
com.cliffc.aa.node.Node.more_flow
final int more_flow(boolean lifting)
Definition: Node.java:747
com.cliffc.aa.type.BitsFun
Definition: BitsFun.java:7
com.cliffc.aa.node.Node.insert
Node insert(int idx, Node n)
Definition: Node.java:165
com.cliffc.aa.util.SB
Tight/tiny StringBuilder wrapper.
Definition: SB.java:8
com.cliffc.aa.GVNGCM.Mode.Mode
Mode(boolean CG)
Definition: GVNGCM.java:20
com.cliffc.aa.node.Node.con
static Node con(Type t)
Definition: Node.java:670
com.cliffc.aa.node.Node._uses
Ary< Node > _uses
Definition: Node.java:245
com.cliffc.aa.node.Node.OP_NEWSTR
static final byte OP_NEWSTR
Definition: Node.java:36
com.cliffc.aa.node.FunNode.nargs
int nargs()
Definition: FunNode.java:190
com.cliffc.aa.node.Node.ideal_grow
Node ideal_grow()
Definition: Node.java:450
com.cliffc.aa.AA
an implementation of language AA
Definition: AA.java:9
com.cliffc.aa.node.Node._header
static void _header(FunNode fun, SB sb)
Definition: Node.java:380
com.cliffc.aa.node.Node.OP_CPROJ
static final byte OP_CPROJ
Definition: Node.java:22
com.cliffc.aa.node.Node.is_CFG
boolean is_CFG()
Definition: Node.java:356
com.cliffc.aa.node.Node.OP_STORE
static final byte OP_STORE
Definition: Node.java:47
com.cliffc.aa.node.Node.val
Type val(int idx)
Definition: Node.java:470
com.cliffc.aa.node.Node.LIVE
static final VBitSet LIVE
Definition: Node.java:60
com.cliffc.aa.node.Node.all_live
TypeMem all_live()
Definition: Node.java:509
com.cliffc.aa.util.SB.nl
SB nl()
Definition: SB.java:48
com.cliffc.aa.node.Node.toString
String toString()
Definition: Node.java:284
com.cliffc.aa.node.Node.xstr
String xstr()
Definition: Node.java:282
com.cliffc.aa.node.FunNode._sig
TypeFunSig _sig
Definition: FunNode.java:62
com.cliffc.aa.node.Node._elock
boolean _elock
Definition: Node.java:87
com.cliffc.aa.node.Node.is_forward_ref
boolean is_forward_ref()
Definition: Node.java:830
com.cliffc.aa.node.PrimNode._op_prec
byte _op_prec
Definition: PrimNode.java:24
com.cliffc.aa.node.FunPtrNode._name
String _name
Definition: FunPtrNode.java:41
com.cliffc.aa.type.Bits.abit
int abit()
Definition: Bits.java:203
com.cliffc.aa.util.SB.p
SB p(String s)
Definition: SB.java:13
com.cliffc.aa.node.Node.OP_PRIM
static final byte OP_PRIM
Definition: Node.java:39
com.cliffc.aa.type.TypeTuple.at
Type at(int idx)
Definition: TypeTuple.java:182
com.cliffc.aa.type.TypeFunSig.display
Type display()
Definition: TypeFunSig.java:89
com.cliffc.aa.node.Node.set_def
Node set_def(int idx, Node n)
Definition: Node.java:154
com.cliffc.aa.node.Node.do_grow
Node do_grow()
Definition: Node.java:639
com.cliffc.aa.type.TypeFunSig
Definition: TypeFunSig.java:10
com.cliffc.aa.node.PrimNode.AndI64
Definition: PrimNode.java:350
com.cliffc.aa.node.Node.sharptr
Type sharptr(Node mem)
Definition: Node.java:855
com.cliffc.aa.GVNGCM.add_reduce
public< N extends Node > N add_reduce(N n)
Definition: GVNGCM.java:49
com.cliffc.aa.type.Type.dual
final T dual()
Definition: Type.java:361
com.cliffc.aa.node.FunNode.parm
ParmNode parm(int idx)
Definition: FunNode.java:887
com.cliffc.aa.node.Node._op
final byte _op
Definition: Node.java:85
com.cliffc.aa.node.PrimNode.MulI64
Definition: PrimNode.java:335
com.cliffc.aa.node.Node.walkerr_def
void walkerr_def(HashSet< ErrMsg > errs, VBitSet bs)
Definition: Node.java:771
com.cliffc.aa.tvar.TV2
Definition: TV2.java:23
com.cliffc.aa.node.FunNode._bal_close
String _bal_close
Definition: FunNode.java:60
com.cliffc.aa.GVNGCM.Mode.Opto
Opto
Definition: GVNGCM.java:17
com.cliffc.aa.GVNGCM.add_flow_defs
void add_flow_defs(Node n)
Definition: GVNGCM.java:54
com.cliffc.aa.type.TypeRPC
Definition: TypeRPC.java:7
com.cliffc.aa.node.Node.OP_PARM
static final byte OP_PARM
Definition: Node.java:37
com.cliffc.aa.node.Node.is_multi_head
boolean is_multi_head()
Definition: Node.java:354
com.cliffc.aa.node.Node.OP_RET
static final byte OP_RET
Definition: Node.java:42
com.cliffc.aa.GVNGCM._opt_mode
Mode _opt_mode
Definition: GVNGCM.java:22
com.cliffc.aa.node.Node.str
String str()
Definition: Node.java:283
com.cliffc.aa.node.Node.pop
Node pop()
Definition: Node.java:174
com.cliffc.aa.GVNGCM.add_flow
public< N extends Node > N add_flow(N n)
Definition: GVNGCM.java:50
com.cliffc.aa.util.SB.i
SB i(int d)
Definition: SB.java:38
com.cliffc.aa.GVNGCM.add_dead
void add_dead(Node n)
Definition: GVNGCM.java:48
com.cliffc.aa.node.Node.dump
String dump(int max)
Definition: Node.java:286
com.cliffc.aa.node.Node._tvar
TV2 _tvar
Definition: Node.java:94
com.cliffc.aa.node.Node.OP_NAME
static final byte OP_NAME
Definition: Node.java:33
com.cliffc.aa.node.Node.ideal_mono
Node ideal_mono()
Definition: Node.java:445
com.cliffc.aa.node.Node._uid
int _uid
Definition: Node.java:84
com.cliffc.aa.node.Node.tvar
TV2 tvar()
Definition: Node.java:96
com.cliffc.aa.type.TypeMemPtr.OOP0
static final TypeMemPtr OOP0
Definition: TypeMemPtr.java:93
com.cliffc.aa.node.FunNode
Definition: FunNode.java:58
com.cliffc.aa.node.PrimNode.EQ_F64
Definition: PrimNode.java:314
com.cliffc.aa.node.Node.check_vals
boolean check_vals()
Definition: Node.java:143
com.cliffc.aa.Env.ANY
static ConNode ANY
Definition: Env.java:24
com.cliffc.aa.node.Node.do_reduce
Node do_reduce()
Definition: Node.java:545
com.cliffc.aa.node.Node.replace
void replace(Node old, Node nnn)
Definition: Node.java:163
com.cliffc.aa.type.TypeMem.MEM
static final TypeMem MEM
Definition: TypeMem.java:224
com.cliffc.aa.node.Node.OP_PHI
static final byte OP_PHI
Definition: Node.java:38
com.cliffc.aa.Env.DEFMEM
static DefMemNode DEFMEM
Definition: Env.java:19
com.cliffc.aa.type.BitsFun.new_fidx
static int new_fidx(int par)
Definition: BitsFun.java:25
com.cliffc.aa.type.TypeTuple.NO_ARGS
static final TypeTuple NO_ARGS
Definition: TypeTuple.java:135
com.cliffc.aa.node.Node.op_prec
byte op_prec()
Definition: Node.java:533
com.cliffc.aa.Env
Definition: Env.java:12
com.cliffc.aa.node.FunNode.is_forward_ref
boolean is_forward_ref()
Definition: FunNode.java:886
com.cliffc.aa.util.SB.toString
String toString()
Definition: SB.java:62
com.cliffc.aa.node.Node.walk_opt
void walk_opt(VBitSet visit)
Definition: Node.java:797
com.cliffc.aa.node.FunNode.FUNS
static Ary< FunNode > FUNS
Definition: FunNode.java:99
com.cliffc.aa.GVNGCM.on_dead
boolean on_dead(Node n)
Definition: GVNGCM.java:39
com.cliffc.aa.node.Node.add_flow_extra
void add_flow_extra(Type old)
Definition: Node.java:513
com.cliffc.aa.node.Node._defs
Ary< Node > _defs
Definition: Node.java:124
com.cliffc.aa.tvar.TV2.find
TV2 find()
Definition: TV2.java:240
com.cliffc.aa.node.FunNode._thunk_rhs
final boolean _thunk_rhs
Definition: FunNode.java:68
com.cliffc.aa.type.TypeMemPtr
Definition: TypeMemPtr.java:14
com.cliffc.aa.node.Node.OP_REGION
static final byte OP_REGION
Definition: Node.java:41
com.cliffc.aa.Env.ALL_CTRL
static ConNode ALL_CTRL
Definition: Env.java:20
com.cliffc.aa.node.FunNode.bad_mem_use
static boolean bad_mem_use(Node n, TypeObj to)
Definition: FunNode.java:407
com.cliffc.aa.node.FunNode.ret
RetNode ret()
Definition: FunNode.java:900
com.cliffc.aa.GVNGCM.Mode
Definition: GVNGCM.java:14
com.cliffc.aa.type.TypeFunSig._formals
TypeTuple _formals
Definition: TypeFunSig.java:15
com.cliffc.aa.node.FunNode.find_body
Ary< Node > find_body(RetNode ret)
Definition: FunNode.java:478
com.cliffc.aa.node.ParmNode._idx
final int _idx
Definition: ParmNode.java:15
com.cliffc.aa.node.Node.xliv
Node xliv(GVNGCM.Mode opt_mode)
Definition: Node.java:500
com.cliffc.aa.type.TypeMemPtr.make
static TypeMemPtr make(BitsAlias aliases, TypeObj obj)
Definition: TypeMemPtr.java:66
com.cliffc.aa.node.FunNode.split_callers
void split_callers(RetNode oldret, FunNode fun, Ary< Node > body, int path)
Definition: FunNode.java:661