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

Public Member Functions

 CallNode (boolean unpacked, Parse[] badargs, Node... defs)
 
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 ()
 
CallEpiNode cepi ()
 
CallNode copy (boolean copy_edges)
 
Node ctl ()
 
void del (int idx)
 
Node do_flow ()
 
Node do_grow ()
 
Node do_mono ()
 
Node do_reduce ()
 
Node dsp ()
 
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 fdx ()
 
BitsFun fidxs ()
 
Node find (int uid)
 
Node get_mem_writer ()
 
int hashCode ()
 
Node ideal_grow ()
 
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 ()
 
FunPtrNode least_cost (BitsFun choices, Node unk)
 
int len ()
 
TypeMem live (GVNGCM.Mode opt_mode)
 
TypeMem live_use (GVNGCM.Mode opt_mode, Node def)
 
boolean live_uses ()
 
Node mem ()
 
final int more_flow (boolean lifting)
 
final boolean more_ideal (VBitSet bs)
 
TV2 new_tvar (String alloc_site)
 
byte op_prec ()
 
Node[] parms ()
 
Node pop ()
 
Node remove (int idx)
 
void replace (Node old, Node nnn)
 
void set_dead ()
 
Node set_def (int idx, Node n)
 
Node set_dsp (Node dsp)
 
Node set_fdx (Node fun)
 
void set_mem (Node mem)
 
Type sharptr (Node mem)
 
boolean should_con (Type t)
 
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 void init0 ()
 
static void reset_to_init0 ()
 
static void roll_back_CNT ()
 
static TypeFunPtr ttfp (Type tcall)
 
static TypeFunPtr ttfpx (Type tcall)
 

Public Attributes

Ary< Node_defs
 
boolean _elock
 
byte _keep
 
TypeMem _live
 
boolean _not_resolved_by_gcp
 
int _uid
 
Ary< Node_uses
 
Type _val
 

Static Public Attributes

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

Package Functions

Node _elock ()
 
Node arg (int x)
 
boolean check_solo_mem_writer (Node memw)
 
BitsAlias escapees ()
 
boolean is_CFG ()
 
Node is_pure_call ()
 
public< N extends Node > N keep ()
 
public< N extends Node > N keep (int d)
 
TypeMem live_use_call (int dfidx)
 
int nargs ()
 
int newuid ()
 
Node set_arg (int idx, Node arg)
 
void set_rpc (int rpc)
 
String str ()
 
public< N extends Node > N unhook ()
 
public< N extends Node > N unkeep ()
 
public< N extends Node > N unkeep (int d)
 
Node walk_dom_last (Predicate< Node > P)
 

Static Package Functions

 [static initializer]
 
static TypeMem emem (Type tcall)
 
static TypeMem emem (Type[] ts)
 
static TypeTuple set_ttfp (TypeTuple tcall, TypeFunPtr nfptr)
 
static Type targ (Type tcall, int x)
 
static Type targ (Type[] ts, int x)
 
static Type tctl (Type tcall)
 
static TypeMemPtr tesc (Type tcall)
 

Package Attributes

Parse[] _badargs
 
boolean _is_copy
 
final byte _op
 
int _rpc
 
TV2 _tvar
 
boolean _unpacked
 

Static Package Attributes

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

Node _do_reduce ()
 
Node _ideal_grow (MrgProjNode mem, ProjNode cepim, ProjNode cepid, BitsAlias escs, int i)
 
void adderr (HashSet< ErrMsg > errs)
 
boolean all_fcns_wired ()
 
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)
 
BitsAlias get_alias (Type t)
 
boolean is_multi_tail ()
 
Node merge (Node x)
 
int more_flow (boolean lifting, int errs)
 
void postorder (Ary< Node > nodes, VBitSet bs)
 
Node swap_new (Node cepim, MrgProjNode mrg)
 
Node unuse (Node old)
 

Static Private Member Functions

static void _header (FunNode fun, SB sb)
 
static FunPtrNode get_fptr (FunNode fun, Node unk)
 

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 86 of file CallNode.java.

Constructor & Destructor Documentation

◆ CallNode()

com.cliffc.aa.node.CallNode.CallNode ( boolean  unpacked,
Parse[]  badargs,
Node...  defs 
)

Definition at line 95 of file CallNode.java.

95  {
96  super(OP_CALL,defs);
97  assert defs[DSP_IDX]==null || defs[DSP_IDX]._val==Type.ALL || defs[DSP_IDX]._val==Type.ANY || defs[DSP_IDX]._val instanceof TypeMemPtr; // Temp; not required
98  assert defs.length > DSP_IDX+1;
99  _rpc = BitsRPC.new_rpc(BitsRPC.ALL); // Unique call-site index
100  _unpacked=unpacked; // Arguments are typically packed into a tuple and need unpacking, but not always
101  _badargs = badargs;
102  }

References com.cliffc.aa.node.CallNode._badargs, com.cliffc.aa.node.CallNode._rpc, com.cliffc.aa.node.CallNode._unpacked, com.cliffc.aa.type.BitsRPC.ALL, com.cliffc.aa.type.Type< T extends Type< T >.ALL, com.cliffc.aa.type.Type< T extends Type< T >.ANY, com.cliffc.aa.type.BitsRPC.new_rpc(), and com.cliffc.aa.node.Node.OP_CALL.

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

Here is the call graph for this function:
Here is the caller 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:

◆ _ideal_grow()

Node com.cliffc.aa.node.CallNode._ideal_grow ( MrgProjNode  mem,
ProjNode  cepim,
ProjNode  cepid,
BitsAlias  escs,
int  i 
)
private

Definition at line 373 of file CallNode.java.

373  {
374  // No alias overlaps
375  int alias = mem.nnn()._alias;
376  if( escs.test_recur(alias) ) return null;
377  // No other readers or writers. Expect the Call (or Join) and optionally DEFMEM
378  if( mem._uses._len>2 ) return null;
379  if( mem._uses._len==2 && mem._uses.find(Env.DEFMEM)==-1 ) return null; // Something other than DEFMEM
380 
381  // If call returns same as new (via recursion), cannot split, but CAN swap.
382  TypeMem tmcepi = (TypeMem) cepim._val;
383  BitsAlias esc_out = CallEpiNode.esc_out(tmcepi,cepid==null ? Type.XNIL : cepid._val);
384  BitsAlias escs2 = escs.meet(esc_out);
385  Node jn = mem();
386  if( !escs2.is_empty() && !esc_out.test_recur(alias) ) { // No return conflict, so parallelize memory
387  if( jn==mem ) // Bare Call/New; add a Split/Join.
388  return MemSplitNode.insert_split(cepim,escs2,this,mem,mem);
389  return null; // TODO: allow Call to move into existing JOIN
390  } else { // Else move New below Call.
391  if( jn!=mem ) { // Move New below Join
392  Node pre = mem.mem();
393  jn.set_def(i,pre);
394  mem.set_def(MEM_IDX,jn);
395  set_mem(mem);
396  Env.GVN.add_unuse(jn);
397  Env.GVN.add_unuse(mem);
398  }
399  return swap_new(cepim,mem); // Move New below Call
400  }
401  }

References com.cliffc.aa.node.Node._uses, com.cliffc.aa.node.Node._val, com.cliffc.aa.GVNGCM.add_unuse(), com.cliffc.aa.Env.DEFMEM, com.cliffc.aa.node.CallEpiNode.esc_out(), com.cliffc.aa.Env.GVN, com.cliffc.aa.node.MemSplitNode.insert_split(), com.cliffc.aa.type.Bits< B extends Bits< B >.is_empty(), com.cliffc.aa.type.Bits< B extends Bits< B >.meet(), com.cliffc.aa.node.CallNode.mem(), com.cliffc.aa.node.Node.set_def(), com.cliffc.aa.node.CallNode.set_mem(), com.cliffc.aa.node.CallNode.swap_new(), com.cliffc.aa.type.Bits< B extends Bits< B >.test_recur(), and com.cliffc.aa.type.Type< T extends Type< T >.XNIL.

Referenced by com.cliffc.aa.node.CallNode.ideal_grow().

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.CallNode.add_flow_def_extra ( Node  chg)

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

Definition at line 493 of file CallNode.java.

493  {
494  // Projections live after a call alter liveness of incoming args
495  if( chg instanceof ProjNode )
496  Env.GVN.add_flow(in(((ProjNode)chg)._idx));
497  }

References com.cliffc.aa.GVNGCM.add_flow(), com.cliffc.aa.Env.GVN, and com.cliffc.aa.node.Node.in().

Here is the call graph for this function:

◆ add_flow_extra()

void com.cliffc.aa.node.CallNode.add_flow_extra ( Type  old)

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

Definition at line 481 of file CallNode.java.

481  {
482  if( old==Type.ANY || _val==Type.ANY ||
483  (old instanceof TypeTuple && ttfp(old).above_center()) )
484  Env.GVN.add_flow_defs(this); // Args can be more-alive or more-dead
485  // If Call flips to being in-error, all incoming args forced live/escape
486  for( Node def : _defs )
487  if( def!=null && def._live!=TypeMem.ESCAPE && err(true)!=null )
488  Env.GVN.add_flow(def);
489  // If not resolved, might now resolve
490  if( _val instanceof TypeTuple && ttfp(_val)._fidxs.abit()==-1 )
491  Env.GVN.add_reduce(this);
492  }

References com.cliffc.aa.node.Node._defs, com.cliffc.aa.node.Node._val, com.cliffc.aa.GVNGCM.add_flow(), com.cliffc.aa.GVNGCM.add_flow_defs(), com.cliffc.aa.GVNGCM.add_reduce(), com.cliffc.aa.type.Type< T extends Type< T >.ANY, com.cliffc.aa.node.CallNode.err(), com.cliffc.aa.type.TypeMem.ESCAPE, com.cliffc.aa.Env.GVN, and com.cliffc.aa.node.CallNode.ttfp().

Here is the call graph for this function:

◆ add_flow_use_extra()

void com.cliffc.aa.node.CallNode.add_flow_use_extra ( Node  chg)

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

Definition at line 498 of file CallNode.java.

498  {
499  CallEpiNode cepi = cepi();
500  if( chg == fdx() ) { // FIDX falls to sane from too-high
501  Env.GVN.add_flow_defs(this); // All args become alive
502  if( cepi!=null ) {
503  Env.GVN.add_work_all(cepi); // FDX gets stable, might wire, might unify_lift
504  Env.GVN.add_flow_defs(cepi); // Wired Rets might no longer be alive (might unwire)
505  }
506  } else if( chg == mem() ) {
507  if( cepi != null ) Env.GVN.add_flow(cepi);
508  } else { // Args lifted, may resolve
509  if( fdx() instanceof UnresolvedNode )
510  Env.GVN.add_reduce(this);
511  if( Env.GVN._opt_mode._CG && err(true)==null )
512  Env.GVN.add_flow(mem()); // Call not-in-error, memory may lift
513  }
514  }

References com.cliffc.aa.GVNGCM.Mode._CG, com.cliffc.aa.GVNGCM._opt_mode, com.cliffc.aa.GVNGCM.add_flow(), com.cliffc.aa.GVNGCM.add_flow_defs(), com.cliffc.aa.GVNGCM.add_reduce(), com.cliffc.aa.GVNGCM.add_work_all(), com.cliffc.aa.node.CallNode.cepi(), com.cliffc.aa.node.CallNode.err(), com.cliffc.aa.node.CallNode.fdx(), com.cliffc.aa.Env.GVN, and com.cliffc.aa.node.CallNode.mem().

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

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

◆ add_reduce_extra()

void com.cliffc.aa.node.CallNode.add_reduce_extra ( )

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

Definition at line 331 of file CallNode.java.

331  {
332  Node cepi = cepi();
333  if( !_is_copy && cepi!=null )
335  if( mem() instanceof MrgProjNode )
336  Env.GVN.add_reduce(this);
337  Env.GVN.add_flow(mem()); // Dead pointer args reduced to ANY, so mem() liveness lifts
338  }

References com.cliffc.aa.node.CallNode._is_copy, com.cliffc.aa.GVNGCM.add_flow(), com.cliffc.aa.GVNGCM.add_reduce(), com.cliffc.aa.node.CallNode.cepi(), com.cliffc.aa.Env.GVN, and com.cliffc.aa.node.CallNode.mem().

Here is the call 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_fcns_wired()

boolean com.cliffc.aa.node.CallNode.all_fcns_wired ( )
private

Definition at line 601 of file CallNode.java.

601  {
602  BitsFun fidxs = fidxs();
603  if( _is_copy || fidxs==null ) return true;
604  CallEpiNode cepi = cepi();
605  return cepi != null && fidxs.bitCount() <= cepi.nwired();
606  }

References com.cliffc.aa.node.CallNode._is_copy, com.cliffc.aa.type.Bits< B extends Bits< B >.bitCount(), com.cliffc.aa.node.CallNode.cepi(), com.cliffc.aa.node.CallNode.fidxs(), and com.cliffc.aa.node.CallEpiNode.nwired().

Referenced by com.cliffc.aa.node.CallNode.live_use().

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

◆ all_live()

TypeMem com.cliffc.aa.node.CallNode.all_live ( )

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

Definition at line 536 of file CallNode.java.

536 { return TypeMem.ALLMEM; }

References com.cliffc.aa.type.TypeMem.ALLMEM.

◆ arg()

Node com.cliffc.aa.node.CallNode.arg ( int  x)
package

◆ cepi()

CallEpiNode com.cliffc.aa.node.CallNode.cepi ( )

Definition at line 769 of file CallNode.java.

769  {
770  for( Node cepi : _uses ) // Find CallEpi for bypass aliases
771  if( cepi instanceof CallEpiNode )
772  return (CallEpiNode)cepi;
773  return null;
774  }

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

Referenced by com.cliffc.aa.node.CallNode.add_flow_use_extra(), com.cliffc.aa.node.CallNode.add_reduce_extra(), com.cliffc.aa.node.CallNode.all_fcns_wired(), com.cliffc.aa.node.CallNode.escapees(), com.cliffc.aa.node.CallNode.ideal_grow(), com.cliffc.aa.node.FunNode.ideal_inline(), com.cliffc.aa.node.CallNode.ideal_reduce(), com.cliffc.aa.node.CallNode.is_mem(), com.cliffc.aa.node.CallNode.live(), com.cliffc.aa.node.FunNode.split_callers(), and com.cliffc.aa.node.FunNode.unwire().

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()

CallNode com.cliffc.aa.node.CallNode.copy ( boolean  copy_edges)

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

Definition at line 176 of file CallNode.java.

176  {
177  CallNode call = (CallNode)super.copy(copy_edges);
178  Node old_rpc = Node.con(TypeRPC.make(_rpc));
179  call._rpc = BitsRPC.new_rpc(_rpc); // Children RPC
180  set_rpc(BitsRPC.new_rpc(_rpc)); // New child RPC for 'this' as well.
181  // Swap out the existing old rpc users for the new.
182  // Might be no users of either.
183  Node new_rpc = Node.con(TypeRPC.make(_rpc));
184  old_rpc.subsume(new_rpc);
185  return call;
186  }

References com.cliffc.aa.node.CallNode._rpc, com.cliffc.aa.node.CallNode.CallNode(), com.cliffc.aa.node.Node.con(), com.cliffc.aa.node.CallNode.copy(), com.cliffc.aa.type.TypeRPC.make(), com.cliffc.aa.type.BitsRPC.new_rpc(), com.cliffc.aa.node.CallNode.set_rpc(), and com.cliffc.aa.node.Node.subsume().

Referenced by com.cliffc.aa.node.CallNode.copy().

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

◆ ctl()

Node com.cliffc.aa.node.CallNode.ctl ( )

Definition at line 118 of file CallNode.java.

118 { return in(CTL_IDX); }

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

Referenced by com.cliffc.aa.GVNGCM.gcp(), com.cliffc.aa.node.CallEpiNode.ideal_reduce(), com.cliffc.aa.node.CallNode.ideal_reduce(), com.cliffc.aa.node.CallNode.live(), com.cliffc.aa.node.CallNode.live_use(), com.cliffc.aa.node.RetNode.tail_recursive(), and com.cliffc.aa.node.CallNode.value().

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

◆ 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:

◆ dsp()

Node com.cliffc.aa.node.CallNode.dsp ( )

Definition at line 120 of file CallNode.java.

120 { return in(DSP_IDX); } // Display

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

Referenced by com.cliffc.aa.node.CallNode.ideal_reduce(), com.cliffc.aa.node.CallNode.live_use(), and com.cliffc.aa.node.CallNode.set_dsp().

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:

◆ emem() [1/2]

static TypeMem com.cliffc.aa.node.CallNode.emem ( Type  tcall)
staticpackage

Definition at line 149 of file CallNode.java.

149 { return emem( ((TypeTuple)tcall)._ts ); }

References com.cliffc.aa.node.CallNode.emem().

Referenced by com.cliffc.aa.node.CallNode.emem(), com.cliffc.aa.node.CallEpiNode.ideal_reduce(), and com.cliffc.aa.node.CallNode.live_use().

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

◆ emem() [2/2]

static TypeMem com.cliffc.aa.node.CallNode.emem ( Type[]  ts)
staticpackage

Definition at line 150 of file CallNode.java.

150 { return (TypeMem ) ts[MEM_IDX]; } // callee memory passed into function

◆ equals()

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

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

Definition at line 778 of file CallNode.java.

778  {
779  if( this==o ) return true;
780  if( !super.equals(o) ) return false;
781  if( !(o instanceof CallNode) ) return false;
782  CallNode call = (CallNode)o;
783  return _rpc==call._rpc;
784  }

References com.cliffc.aa.node.CallNode._rpc, and com.cliffc.aa.node.CallNode.CallNode().

Here is the call graph for this function:

◆ err()

ErrMsg com.cliffc.aa.node.CallNode.err ( boolean  fast)

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

Definition at line 694 of file CallNode.java.

694  {
695  // Fail for passed-in unknown references directly.
696  for( int j=ARG_IDX; j<nargs(); j++ )
697  if( arg(j)!=null && arg(j).is_forward_ref() )
698  return fast ? ErrMsg.FAST : ErrMsg.forward_ref(_badargs[j-ARG_IDX+1], FunNode.find_fidx(((FunPtrNode)arg(j)).ret()._fidx).fptr());
699  // Expect a function pointer
700  TypeFunPtr tfp = ttfpx(_val);
701  if( tfp==null ) {
702  if( fast ) return ErrMsg.FAST;
703  Type t = _val;
704  if( t instanceof TypeTuple ) t = ((TypeTuple)t).at(DSP_IDX);
705  return ErrMsg.unresolved(_badargs[0],"A function is being called, but "+t+" is not a function type");
706  }
707 
708  // Indirectly, forward-ref for function type
709  if( tfp.is_forward_ref() ) // Forward ref on incoming function
710  return fast ? ErrMsg.FAST : ErrMsg.forward_ref(_badargs[0], FunNode.find_fidx(tfp.fidx()).fptr());
711 
712  BitsFun fidxs = tfp.fidxs();
713  if( fidxs.above_center() ) return null; // Not resolved (yet)
714  // bad-arg-count
715  if( tfp._nargs != nargs() )
716  return fast ? ErrMsg.FAST : ErrMsg.syntax(_badargs[0],"Passing "+(nargs()-ARG_IDX)+" arguments to "+tfp.names(false)+" which takes "+(tfp._nargs-ARG_IDX)+" arguments");
717 
718  // Call did not resolve.
719  if( fidxs.is_empty() ) // This is an unresolved call
720  return fast ? ErrMsg.FAST : ErrMsg.unresolved(_badargs[0],"Unable to resolve call");
721 
722  // Also happens if more than one FIDX shares the same Unresolved.
723  // Basically means we did not clone enough to remove a choice amongst primitives.
724  // Bail out here if we see more than one Unresolved.
725  Node munr = null;
726  for( int fidx : fidxs ) { // All fidxs to Call
727  FunNode fun = FunNode.find_fidx(fidx);
728  if( fun==null || fun.is_dead() || fun.ret()==null ) continue; // No such function (probably dead and mid-cleanup)
729  outer:
730  for( Node fptrs : fun.ret()._uses ) // FunPtrs for each fidx (typically 1)
731  if( fptrs instanceof FunPtrNode )
732  for( Node unr : fptrs._uses ) // Unresolved behind each FunPtr (typically 1)
733  if( unr instanceof UnresolvedNode && // Unresolved includes fdxs in this Call FDX set?
734  unr._val instanceof TypeFunPtr &&
735  ((TypeFunPtr)(tfp.join(unr._val)))._fidxs.abit() == -1 ) {
736  if( munr == null || munr._val==unr._val ) { munr = unr; continue outer; }
737  return fast ? ErrMsg.FAST : ErrMsg.unresolved(_badargs[0],"Unable to resolve call");
738  }
739  }
740 
741  // Now do an arg-check. No more than 1 unresolved, so the error message is
742  // more sensible.
743  BitsFun.Tree<BitsFun> tree = fidxs.tree();
744  for( int j=ARG_IDX; j<nargs(); j++ ) {
745  Type actual = arg(j).sharptr(mem());
746  Ary<Type> ts=null;
747  for( int fidx : fidxs ) {
748  if( fidx==0 ) continue;
749  for( int kid=fidx; kid!=0; kid = tree.next_kid(fidx,kid) ) {
750  FunNode fun = FunNode.find_fidx(kid);
751  if( fun==null || fun.is_dead() ) continue;
752  TypeTuple formals = fun._sig._formals; // Type of each argument
753  if( fun.parm(j)==null ) continue; // Formal is dead
754  Type formal = formals.at(j);
755  if( actual.isa(formal) ) continue; // Actual is a formal
756  if( fast ) return ErrMsg.FAST; // Fail-fast
757  if( ts==null ) ts = new Ary<>(new Type[1],0);
758  if( ts.find(formal) == -1 ) // Dup filter
759  ts.push(formal); // Add broken type
760  }
761  }
762  if( ts!=null )
763  return ErrMsg.typerr(_badargs[j-ARG_IDX+1],actual, mem()._val,ts.asAry());
764  }
765 
766  return null;
767  }

References com.cliffc.aa.node.CallNode._badargs, com.cliffc.aa.type.TypeFunPtr._fidxs, com.cliffc.aa.type.TypeFunSig._formals, com.cliffc.aa.type.TypeFunPtr._nargs, com.cliffc.aa.node.FunNode._sig, com.cliffc.aa.node.Node._uses, com.cliffc.aa.node.Node._val, com.cliffc.aa.type.Bits< B extends Bits< B >.abit(), com.cliffc.aa.type.Bits< B extends Bits< B >.above_center(), com.cliffc.aa.node.CallNode.arg(), com.cliffc.aa.util.Ary< E >.asAry(), com.cliffc.aa.type.TypeTuple.at(), com.cliffc.aa.node.Node.ErrMsg.FAST, com.cliffc.aa.type.TypeFunPtr.fidx(), com.cliffc.aa.type.TypeFunPtr.fidxs(), com.cliffc.aa.node.CallNode.fidxs(), com.cliffc.aa.util.Ary< E >.find(), com.cliffc.aa.node.FunNode.find_fidx(), com.cliffc.aa.node.Node.ErrMsg.forward_ref(), com.cliffc.aa.node.FunNode.fptr(), com.cliffc.aa.node.Node.is_dead(), com.cliffc.aa.type.Bits< B extends Bits< B >.is_empty(), com.cliffc.aa.type.TypeFunPtr.is_forward_ref(), com.cliffc.aa.node.Node.is_forward_ref(), com.cliffc.aa.type.Type< T extends Type< T >.isa(), com.cliffc.aa.type.Type< T extends Type< T >.join(), com.cliffc.aa.node.CallNode.mem(), com.cliffc.aa.type.TypeFunPtr.names(), com.cliffc.aa.node.CallNode.nargs(), com.cliffc.aa.type.BitsFun.next_kid(), com.cliffc.aa.node.FunNode.parm(), com.cliffc.aa.util.Ary< E >.push(), com.cliffc.aa.node.FunNode.ret(), com.cliffc.aa.node.Node.sharptr(), com.cliffc.aa.node.Node.ErrMsg.syntax(), com.cliffc.aa.type.BitsFun.tree(), com.cliffc.aa.node.CallNode.ttfpx(), com.cliffc.aa.node.Node.ErrMsg.typerr(), and com.cliffc.aa.node.Node.ErrMsg.unresolved().

Referenced by com.cliffc.aa.node.CallNode.add_flow_extra(), com.cliffc.aa.node.CallNode.add_flow_use_extra(), com.cliffc.aa.node.CallEpiNode.ideal_reduce(), com.cliffc.aa.node.CallNode.ideal_reduce(), and com.cliffc.aa.node.CallNode.live_use().

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

◆ escapees()

BitsAlias com.cliffc.aa.node.CallNode.escapees ( )
package

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

Definition at line 472 of file CallNode.java.

472  {
473  BitsAlias esc_in = tesc(_val)._aliases;
474  CallEpiNode cepi = cepi();
476  BitsAlias esc_out = CallEpiNode.esc_out((TypeMem)tcepi.at(1),tcepi.at(2));
477  TypeMem precall = (TypeMem) mem()._val;
478  BitsAlias esc_out2 = precall.and_unused(esc_out); // Filter by unused pre-call
479  return esc_out2.meet(esc_in);
480  }

References com.cliffc.aa.type.TypeMemPtr._aliases, com.cliffc.aa.node.Node._val, com.cliffc.aa.type.TypeMem.and_unused(), com.cliffc.aa.type.TypeTuple.at(), com.cliffc.aa.type.TypeTuple.CALLE, com.cliffc.aa.node.CallNode.cepi(), com.cliffc.aa.node.CallEpiNode.esc_out(), com.cliffc.aa.type.Bits< B extends Bits< B >.meet(), com.cliffc.aa.node.CallNode.mem(), com.cliffc.aa.type.Type< T extends Type< T >.oob(), and com.cliffc.aa.node.CallNode.tesc().

Referenced by com.cliffc.aa.node.CallNode.ideal_grow().

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

◆ fdx()

◆ fidxs()

BitsFun com.cliffc.aa.node.CallNode.fidxs ( )

Definition at line 133 of file CallNode.java.

133  {
134  Type tf = fdx()._val;
135  return tf instanceof TypeFunPtr ? ((TypeFunPtr)tf).fidxs() : null;
136  }

References com.cliffc.aa.node.Node._val, com.cliffc.aa.node.CallNode.fdx(), and com.cliffc.aa.type.TypeFunPtr.fidxs().

Referenced by com.cliffc.aa.node.CallNode.all_fcns_wired(), com.cliffc.aa.node.CallNode.err(), com.cliffc.aa.node.CallNode.ideal_reduce(), com.cliffc.aa.node.CallNode.live(), com.cliffc.aa.node.CallNode.live_use_call(), and com.cliffc.aa.node.CallNode.value().

Here is the call graph for this function:
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:

◆ get_alias()

BitsAlias com.cliffc.aa.node.CallNode.get_alias ( Type  t)
private

Definition at line 466 of file CallNode.java.

466  {
467  if( t instanceof TypeMemPtr ) return ((TypeMemPtr)t)._aliases;
468  if( TypeMemPtr.OOP.isa(t) ) return BitsAlias.FULL;
469  return BitsAlias.EMPTY;
470  }

References com.cliffc.aa.type.BitsAlias.EMPTY, com.cliffc.aa.type.BitsAlias.FULL, com.cliffc.aa.type.Type< T extends Type< T >.isa(), and com.cliffc.aa.type.TypeMemPtr.OOP.

Referenced by com.cliffc.aa.node.CallNode.value().

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

◆ get_fptr()

static FunPtrNode com.cliffc.aa.node.CallNode.get_fptr ( FunNode  fun,
Node  unk 
)
staticprivate

Definition at line 678 of file CallNode.java.

678  {
679  RetNode ret = fun.ret();
680  FunPtrNode fptr = ret.funptr();
681  if( fptr != null ) return fptr; // Only one choice
682  if( !(unk instanceof UnresolvedNode) ) return null; // No selection of fptrs to pick from
683  for( Node def : unk._defs )
684  if( ((FunPtrNode)def).ret()== ret )
685  return (FunPtrNode)def;
686  return null;
687  }

References com.cliffc.aa.node.Node._defs, com.cliffc.aa.node.RetNode.funptr(), and com.cliffc.aa.node.FunNode.ret().

Referenced by com.cliffc.aa.node.CallNode.least_cost().

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:

◆ hashCode()

int com.cliffc.aa.node.CallNode.hashCode ( )

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

Definition at line 777 of file CallNode.java.

777 { return super.hashCode()+_rpc; }

References com.cliffc.aa.node.CallNode._rpc.

◆ ideal_grow()

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

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

Definition at line 340 of file CallNode.java.

340  {
341  // Check for a prior New and move past the call (pushes a store-like
342  // behavior down). The New address must not be reachable from the Call
343  // arguments transitively, which is detected in the escape-in set.
344 
345  // Inserting a MemSplit is a ideal_grow, and swap_new could be an
346  // ideal_mono, but they both use the same large correctness tests, so both
347  // go under ideal_grow to avoid recomputing the test.
348  Node mem = mem();
349  CallEpiNode cepi = cepi();
350  if( _keep>0 || cepi==null || !(mem._val instanceof TypeMem) ) return null;
351  ProjNode cepim = ProjNode.proj(cepi,MEM_IDX); // Memory projection from CEPI
352  ProjNode cepid = ProjNode.proj(cepi,REZ_IDX); // Return projection from CEPI
353  if( cepim == null ) return null;
354  if( !(cepim._val instanceof TypeMem) ) return null;
355  TypeMem tmcepi = (TypeMem) cepim._val;
356  if( !mem._val.isa(tmcepi) ) return null; // Call entry stale relative to exit
357  BitsAlias escs = escapees();
358  // Check for prior MrgProj/New
359  if( mem instanceof MrgProjNode )
360  return _ideal_grow((MrgProjNode)mem,cepim,cepid,escs,-1);
361  // Check for prior Join/MrgProj/New
362  if( mem instanceof MemJoinNode ) {
363  for( int i=1; i<mem._defs._len; i++ )
364  if( mem.in(i) instanceof MrgProjNode ) {
365  Node x = _ideal_grow((MrgProjNode)mem.in(i),cepim,cepid,escs,i);
366  if( x!=null ) return x;
367  }
368  }
369  return null;
370  }

References com.cliffc.aa.node.Node._defs, com.cliffc.aa.node.CallNode._ideal_grow(), com.cliffc.aa.node.Node._keep, com.cliffc.aa.node.Node._val, com.cliffc.aa.node.CallNode.cepi(), com.cliffc.aa.node.CallNode.escapees(), com.cliffc.aa.node.Node.in(), com.cliffc.aa.type.Type< T extends Type< T >.isa(), com.cliffc.aa.node.CallNode.mem(), and com.cliffc.aa.node.ProjNode.proj().

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.CallNode.ideal_reduce ( )

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

Definition at line 188 of file CallNode.java.

188  {
189  Node cc = in(0).is_copy(0);
190  if( cc!=null ) return set_def(0,cc);
191  // When do I do 'pattern matching'? For the moment, right here: if not
192  // already unpacked a tuple, and can see the NewNode, unpack it right now.
193  if( !_unpacked ) { // Not yet unpacked a tuple
194  assert nargs()==ARG_IDX+1;// Memory, Display plus the arg tuple
195  Node arg = arg(ARG_IDX);
196  Type tadr = arg._val;
197  if( tadr instanceof TypeMemPtr && arg instanceof ProjNode ) {
198  int alias = ((TypeMemPtr)tadr)._aliases.abit();
199  if( alias == -1 ) throw unimpl(); // Handle multiple aliases, handle all/empty
200  Node mem = mem();
201  if( mem instanceof FreshNode ) mem = ((FreshNode)mem).id();
202  // Bypass a MemJoin
203  if( mem instanceof MemJoinNode ) {
204  int jdx = ((MemJoinNode)mem).msp().find_alias_index(alias);
205  if( jdx!=0 ) mem = mem.in(jdx);
206  }
207  // Find a tuple being passed in directly; unpack
208  if( mem instanceof MrgProjNode && mem.in(0)==arg.in(0) ) {
209  NewNode nnn = (NewNode)arg.in(0);
210  Node fdx = pop();
211  remove(_defs._len-1); // Pop off the NewNode tuple
212  int len = nnn._defs._len;
213  for( int i=1; NewNode.def_idx(i)<len; i++ ) // Push the args; unpacks the tuple
214  add_def( nnn.fld(i));
215  add_def(fdx); // FIDX is last
216  _unpacked = true; // Only do it once
217  keep().xval(); // Recompute value, this is not monotonic since replacing tuple with args
218  GVN.add_work_all(unkeep());// Revisit after unpacking
219  return this;
220  }
221  }
222  }
223 
224  Type tc = _val;
225  if( !(tc instanceof TypeTuple) ) return null;
226  TypeTuple tcall = (TypeTuple)tc;
227 
228  // Dead, do nothing
229  if( tctl(tcall)!=Type.CTRL ) { // Dead control (NOT dead self-type, which happens if we do not resolve)
230  if( (ctl() instanceof ConNode) ) return null;
231  // Kill all inputs with type-safe dead constants
232  set_mem(Node.con(TypeMem.XMEM));
234  if( is_dead() ) return this;
235  for( int i=ARG_IDX; i<_defs._len; i++ )
236  set_def(i,Env.ANY);
237  //gvn.add_work_defs(this);
238  //return set_def(0,Env.XCTRL,gvn);
239  throw unimpl();
240  }
241 
242  // Have some sane function choices?
243  TypeFunPtr tfp = ttfp(tcall);
244  BitsFun fidxs = tfp.fidxs();
245  if( fidxs==BitsFun.EMPTY ) // TODO: zap function to empty function constant
246  return null; // Zero choices
247 
248  // If we have a single function allowed, force the function constant.
249  Node fdx = fdx(); // Function epilog/function pointer
250  int fidx = fidxs.abit(); // Check for single target
251  if( fidx != -1 && !(fdx instanceof FunPtrNode) ) {
252  // Check that the single target is well-formed
253  FunNode fun = FunNode.find_fidx(Math.abs(fidx));
254  if( fun != null && !fun.is_dead() ) {
255  RetNode ret = fun.ret();
256  if( ret != null ) {
257  // The same function might be called with different displays; make
258  // sure we get the right one. See if there is a single un-escaped
259  // FunPtr. Common for non-upwardsly exposed targets.
260  FunPtrNode fptr = ret.funptr();
261  if( fptr != null && !fptr.display()._live.live().is_escape() )
262  return set_dsp(fptr);
263  // See if FunPtr is available just above an Unresolved.
264  if( fdx instanceof UnresolvedNode ) {
265  fptr = ((UnresolvedNode)fdx).find_fidx(fidx);
266  if( fptr != null ) { // Gonna improve
267  if( dsp() instanceof FP2DispNode && dsp().in(0)==fdx )
268  set_dsp(fptr.display());
269  return set_fdx(fptr);
270  }
271  }
272  }
273  }
274  }
275 
276  // If the function is unresolved, see if we can resolve it now.
277  // Fidxs are typically low during iter, but can be high during
278  // iter post-GCP on error calls where nothing resolves.
279  CallEpiNode cepi = cepi();
280  if( fidx == -1 && !fidxs.above_center() && !fidxs.test(1)) {
281  FunPtrNode fptr = least_cost(fidxs, fdx); // Check for least-cost target
282  if( fptr != null ) {
283  if( cepi!=null ) Env.GVN.add_reduce(cepi); // Might unwire
284  if( fptr.display()._val.isa(dsp()._val) )
285  set_dsp(fptr.display());
286  set_fdx(fptr); // Resolve to 1 choice
287  xval(); // Force value update; least-cost LOWERS types (by removing a choice)
288  add_flow_use_extra(fptr);
289  if( cepi!=null ) Env.GVN.add_reduce(cepi); // Might unwire
290  return this;
291  }
292  }
293 
294  // See if the display is always dead; common for Unresolved of primitives.
295  UnresolvedNode unk;
296  if( fdx instanceof UnOrFunPtrNode && (unk=((UnOrFunPtrNode)fdx).unk())!=null &&
297  !(dsp() instanceof ConNode && dsp()._val==Type.ANY) ) {
298  boolean dsp_nil=true;
299  for( Node fptr : unk._defs )
300  if( !(fptr instanceof FunPtrNode) || ((FunPtrNode)fptr).display()._val!=TypeMemPtr.NO_DISP )
301  { dsp_nil=false; break; }
302  if( dsp_nil ) { // Display is unused by any Unresolved
303  set_dsp(Env.ANY);
304  return this;
305  }
306  }
307 
308 
309  // Wire valid targets.
310  if( cepi!=null && cepi.check_and_wire() )
311  return this; // Some wiring happened
312 
313  // Check for dead args and trim; must be after all wiring is done because
314  // unknown call targets can appear during GCP and use the args. After GCP,
315  // still must verify all called functions have the arg as dead, because
316  // alive args still need to resolve. Constants are an issue, because they
317  // fold into the Parm and the Call can lose the matching DProj while the
318  // arg is still alive.
319  if( GVN._opt_mode._CG && err(true)==null ) {
320  Node progress = null;
321  for( int i=DSP_IDX; i<nargs(); i++ )
322  if( ProjNode.proj(this,i)==null &&
323  !(arg(i) instanceof ConNode) ) // Not already folded
324  progress = set_arg(i,Env.ANY); // Kill dead arg
325  if( progress != null ) return this;
326  }
327 
328  return null;
329  }

References com.cliffc.aa.node.Node._defs, com.cliffc.aa.node.Node._live, com.cliffc.aa.node.CallNode._unpacked, com.cliffc.aa.node.Node._val, com.cliffc.aa.type.Bits< B extends Bits< B >.abit(), com.cliffc.aa.type.Bits< B extends Bits< B >.above_center(), com.cliffc.aa.node.Node.add_def(), com.cliffc.aa.node.CallNode.add_flow_use_extra(), com.cliffc.aa.GVNGCM.add_reduce(), com.cliffc.aa.Env.ANY, com.cliffc.aa.type.Type< T extends Type< T >.ANY, com.cliffc.aa.node.CallNode.arg(), com.cliffc.aa.node.CallNode.cepi(), com.cliffc.aa.node.CallEpiNode.check_and_wire(), com.cliffc.aa.node.Node.con(), com.cliffc.aa.node.CallNode.ctl(), com.cliffc.aa.type.Type< T extends Type< T >.CTRL, com.cliffc.aa.node.NewNode< T extends TypeObj< T >.def_idx(), com.cliffc.aa.node.FunPtrNode.display(), com.cliffc.aa.node.CallNode.dsp(), com.cliffc.aa.type.Type< T extends Type< T >.dual(), com.cliffc.aa.type.BitsFun.EMPTY, com.cliffc.aa.node.CallNode.err(), com.cliffc.aa.node.CallNode.fdx(), com.cliffc.aa.type.TypeFunPtr.fidxs(), com.cliffc.aa.node.CallNode.fidxs(), com.cliffc.aa.node.FunNode.find_fidx(), com.cliffc.aa.node.NewNode< T extends TypeObj< T >.fld(), com.cliffc.aa.node.RetNode.funptr(), com.cliffc.aa.type.TypeFunPtr.GENERIC_FUNPTR, com.cliffc.aa.Env.GVN, com.cliffc.aa.node.Node.in(), com.cliffc.aa.node.Node.is_copy(), com.cliffc.aa.node.Node.is_dead(), com.cliffc.aa.type.TypeLive.is_escape(), com.cliffc.aa.type.Type< T extends Type< T >.isa(), com.cliffc.aa.node.Node.keep(), com.cliffc.aa.node.CallNode.least_cost(), com.cliffc.aa.node.Node.len(), com.cliffc.aa.type.TypeMem.live(), com.cliffc.aa.node.CallNode.mem(), com.cliffc.aa.node.CallNode.nargs(), com.cliffc.aa.type.TypeMemPtr.NO_DISP, com.cliffc.aa.node.Node.pop(), com.cliffc.aa.node.ProjNode.proj(), com.cliffc.aa.node.FunNode.ret(), com.cliffc.aa.node.CallNode.set_arg(), com.cliffc.aa.node.Node.set_def(), com.cliffc.aa.node.CallNode.set_dsp(), com.cliffc.aa.node.CallNode.set_fdx(), com.cliffc.aa.node.CallNode.set_mem(), com.cliffc.aa.node.CallNode.tctl(), com.cliffc.aa.type.Bits< B extends Bits< B >.test(), com.cliffc.aa.node.CallNode.ttfp(), com.cliffc.aa.node.Node.unkeep(), com.cliffc.aa.type.TypeMem.XMEM, and com.cliffc.aa.node.Node.xval().

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.CallNode.is_copy ( int  idx)

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

Definition at line 775 of file CallNode.java.

775 { return _is_copy ? (_val==Type.ANY ? Env.ANY : in(idx)) : null; }

References com.cliffc.aa.node.CallNode._is_copy, com.cliffc.aa.node.Node._val, com.cliffc.aa.Env.ANY, com.cliffc.aa.type.Type< T extends Type< T >.ANY, and com.cliffc.aa.node.Node.in().

Here is the call graph for this function:

◆ is_dead()

◆ is_forward_ref()

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

Reimplemented in com.cliffc.aa.node.FunNode, com.cliffc.aa.node.FunPtrNode, com.cliffc.aa.node.RetNode, and com.cliffc.aa.node.ConTypeNode.

Definition at line 830 of file Node.java.

830 { return false; }

Referenced by com.cliffc.aa.node.CallNode.err(), com.cliffc.aa.node.StoreNode.ideal_reduce(), com.cliffc.aa.Parse.inc(), com.cliffc.aa.node.NewObjNode.promote_forward(), com.cliffc.aa.Parse.stmt(), and com.cliffc.aa.node.Node.walkerr_def().

Here is the caller graph for this function:

◆ is_mem()

boolean com.cliffc.aa.node.CallNode.is_mem ( )

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

Definition at line 106 of file CallNode.java.

106  { // Some calls are known to not write memory
107  CallEpiNode cepi = cepi();
108  return cepi!=null && ProjNode.proj(cepi,MEM_IDX)!=null;
109  }

References com.cliffc.aa.node.CallNode.cepi(), and com.cliffc.aa.node.ProjNode.proj().

Here is the call graph for this function:

◆ 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.CallNode.is_pure_call ( )
package

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

Definition at line 785 of file CallNode.java.

785 { return fdx().is_pure_call()==null ? null : mem(); }

References com.cliffc.aa.node.CallNode.fdx(), com.cliffc.aa.node.Node.is_pure_call(), and com.cliffc.aa.node.CallNode.mem().

Referenced by com.cliffc.aa.node.CallEpiNode.ideal_reduce(), and com.cliffc.aa.node.CallEpiNode.is_pure_call().

Here is the call graph for this function:
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:

◆ least_cost()

FunPtrNode com.cliffc.aa.node.CallNode.least_cost ( BitsFun  choices,
Node  unk 
)

Definition at line 624 of file CallNode.java.

624  {
625  if( choices==BitsFun.EMPTY ) return null;
626  assert choices.bitCount() > 0; // Must be some choices
627  assert choices.abit()!= -1 || (choices.above_center() == (GVN._opt_mode==GVNGCM.Mode.Opto));
628  int best_cvts=99999; // Too expensive
629  FunPtrNode best_fptr=null; //
630  TypeTuple best_formals=null; //
631  boolean tied=false; // Ties not allowed
632  for( int fidx : choices ) {
633  // Parent/kids happen during inlining
634  for( int kidx=fidx; kidx!=0; kidx=BitsFun.next_kid(fidx,kidx) ) {
635  if( BitsFun.is_parent(kidx) )
636  continue;
637 
638  FunNode fun = FunNode.find_fidx(kidx);
639  if( fun.nargs()!=nargs() || fun.in(0)==fun ) continue; // BAD/dead
640  TypeTuple formals = fun._sig._formals; // Type of each argument
641  int cvts=0; // Arg conversion cost
642  for( int j=DSP_IDX; j<nargs(); j++ ) {
643  Type actual = arg(j)._val;
644  Type formal = formals.at(j);
645  if( actual==formal ) continue;
646  if( Type.ALL==formal ) continue; // Allows even error arguments
647  byte cvt = actual.isBitShape(formal); // +1 needs convert, 0 no-cost convert, -1 unknown, 99 never
648  if( cvt == -1 ) return null; // Might be the best choice, or only choice, dunno
649  cvts += cvt;
650  }
651 
652  if( cvts < best_cvts ) {
653  best_cvts = cvts;
654  best_fptr = get_fptr(fun,unk); // This can be null, if function is run-time computed & has multiple displays.
655  best_formals = formals;
656  tied=false;
657  } else if( cvts==best_cvts ) {
658  // Look for monotonic formals
659  int fcnt=0, bcnt=0;
660  for( int i=0; i<formals._ts.length; i++ ) {
661  Type ff = formals.at(i), bf = best_formals.at(i);
662  if( ff==bf ) continue;
663  Type mt = ff.meet(bf);
664  if( ff==mt ) bcnt++; // Best formal is higher than new
665  else if( bf==mt ) fcnt++; // New formal is higher than best
666  else { fcnt=bcnt=-1; break; } // Not monotonic, no obvious winner
667  }
668  // If one is monotonically higher than the other, take it
669  if( fcnt > 0 && bcnt==0 ) { best_fptr = get_fptr(fun,unk); best_formals = formals; }
670  else if( fcnt==0 && bcnt > 0 ) {} // Keep current
671  else tied=true; // Tied, ambiguous
672  }
673  }
674  }
675  if( best_cvts >= 99 ) return null; // No valid functions
676  return tied ? null : best_fptr; // Ties need to have the ambiguity broken another way
677  }

References com.cliffc.aa.type.TypeFunSig._formals, com.cliffc.aa.node.FunNode._sig, com.cliffc.aa.type.TypeTuple._ts, com.cliffc.aa.node.Node._val, com.cliffc.aa.type.Bits< B extends Bits< B >.abit(), com.cliffc.aa.type.Bits< B extends Bits< B >.above_center(), com.cliffc.aa.type.Type< T extends Type< T >.ALL, com.cliffc.aa.node.CallNode.arg(), com.cliffc.aa.type.TypeTuple.at(), com.cliffc.aa.type.Bits< B extends Bits< B >.bitCount(), com.cliffc.aa.type.BitsFun.EMPTY, com.cliffc.aa.node.FunNode.find_fidx(), com.cliffc.aa.node.CallNode.get_fptr(), com.cliffc.aa.node.Node.in(), com.cliffc.aa.type.BitsFun.is_parent(), com.cliffc.aa.type.Type< T extends Type< T >.isBitShape(), com.cliffc.aa.type.Type< T extends Type< T >.meet(), com.cliffc.aa.node.CallNode.nargs(), com.cliffc.aa.node.FunNode.nargs(), com.cliffc.aa.type.BitsFun.next_kid(), and com.cliffc.aa.GVNGCM.Mode.Opto.

Referenced by com.cliffc.aa.node.CallNode.ideal_reduce(), and com.cliffc.aa.GVNGCM.remove_ambi().

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.CallNode.live ( GVNGCM.Mode  opt_mode)

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

Definition at line 518 of file CallNode.java.

518  {
519  if( !opt_mode._CG ) {
520  BitsFun fidxs = fidxs();
521  if( fidxs == null ) return TypeMem.ALLMEM; // Assume Something Good will yet happen
522  if( fidxs.above_center() ) return _live; // Got choices, dunno which one will stick
523  CallEpiNode cepi = cepi();
524  if( cepi==null ) return _live; // Collapsing
525  if( ctl()._val == Type.XCTRL ) return _live; // Unreachable
526  // Expand (actually fail) if any parents
527  BitSet bs = fidxs.tree().plus_kids(fidxs);
528  if( bs.cardinality() > cepi.nwired() ) // More things to call
529  return _live; // Cannot improve
530  }
531  // All choices discovered during GCP. If the call is in-error it may not
532  // resolve and so will have no uses other than the CallEpi - which is good
533  // enough to declare this live, so it exists for errors.
534  return super.live(opt_mode);
535  }

References com.cliffc.aa.node.Node._live, com.cliffc.aa.node.Node._val, com.cliffc.aa.type.Bits< B extends Bits< B >.above_center(), com.cliffc.aa.type.TypeMem.ALLMEM, com.cliffc.aa.node.CallNode.cepi(), com.cliffc.aa.node.CallNode.ctl(), com.cliffc.aa.node.CallNode.fidxs(), com.cliffc.aa.type.TypeMem.live(), com.cliffc.aa.node.CallEpiNode.nwired(), com.cliffc.aa.type.BitsFun.tree(), and com.cliffc.aa.type.Type< T extends Type< T >.XCTRL.

Here is the call graph for this function:

◆ live_use()

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

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

Definition at line 537 of file CallNode.java.

537  {
538  if( def==fdx() ) { // Function argument
539  if( def instanceof ThretNode ) return TypeMem.ALLMEM; // Always inlines eagerly, so this is always temporary
540  if( !opt_mode._CG ) return TypeMem.ESCAPE; // Prior to GCP, assume all fptrs are alive and display escapes
541  // During GCP, unresolved calls might resolve & remove this use. Keep dead till resolve fails.
542  // If we have a fidx directly, use it more precisely.
543  int dfidx = def instanceof FunPtrNode ? ((FunPtrNode)def).ret()._fidx : -1;
544  return live_use_call(dfidx);
545  }
546  if( def==ctl() ) return TypeMem.ALIVE;
547  if( def!=mem() ) { // Some argument
548  // Check that all fidxs are wired; an unwired fidx might be in-error
549  // and we want the argument alive for errors. This is a value turn-
550  // around point (high fidxs need to fall)
551 
552  // Pre GCP, might not wire (yet), assume fully used by unwired valid fcn
553  // target, so ESCAPE.
554 
555  // 1st GCP, wiring appears over time, if not wired assume it will be and
556  // do the optimistic proj test.
557 
558  // Post GCP, if not wired, then Call is in error, so ESCAPE.
559  if( opt_mode._CG && _val==Type.ANY ) return TypeMem.DEAD;
560  if( opt_mode._CG && // Either mid-GCP or post-GCP
561  (def==dsp() || // Display is not a user-visible arg, so if unused can go away
562  (err(true)==null && // Not in-error
563  // And fully wired (no new users will wire)
564  (opt_mode==GVNGCM.Mode.Opto || all_fcns_wired()) )) ) {
565  int argn = _defs.find(def);
566  ProjNode proj = ProjNode.proj(this, argn);
567  if( proj == null || proj._live == TypeMem.DEAD )
568  return TypeMem.DEAD; // Arg not used
569  }
570  if( def instanceof ThretNode ) return TypeMem.ALLMEM;
571  assert def.all_live().basic_live();
572  return TypeMem.ESCAPE; // Args always alive and escape
573  }
574 
575  // After we have the exact callers, use liveness directly. True if we have
576  // the Call Graph, or the callers are known directly. If the call is
577  // in-error, act as-if we do not known the Call Graph.
578  if( !(_val instanceof TypeTuple) ) // No type to sharpen
579  return _val.oob(TypeMem.ALLMEM);
580  if( opt_mode._CG || fdx() instanceof FunPtrNode ) // All callers known
581  return err(true)==null ? _live : TypeMem.ALLMEM; // Use live directly (unless in error)
582 
583  // Unknown future callees act as-if all available aliases are read from and
584  // thus live.
585  BitsAlias aliases = BitsAlias.EMPTY;
586  for( int i=DSP_IDX; i<nargs(); i++ ) {
587  Type targ = targ(_val,i);
588  if( TypeMemPtr.OOP.isa(targ) )
589  { aliases=BitsAlias.FULL; break; } // All possible pointers, so all memory is alive
590  if( !(targ instanceof TypeMemPtr) ) continue; // Not a pointer, does not need memory to sharpen
591  if( targ.above_center() ) continue; // Have infinite choices still, no memory
592  aliases = aliases.meet(((TypeMemPtr)targ)._aliases);
593  }
594  // Conservative too strong; need only memories that go as deep as the
595  // formal types.
596  TypeMem caller_mem = emem(_val);
597  TypeMem tmem2 = caller_mem.slice_reaching_aliases(caller_mem.all_reaching_aliases(aliases));
598  return (TypeMem)tmem2.meet(_live);
599  }

References com.cliffc.aa.node.Node._defs, com.cliffc.aa.node.RetNode._fidx, com.cliffc.aa.node.Node._live, com.cliffc.aa.node.Node._val, com.cliffc.aa.type.Type< T extends Type< T >.above_center(), com.cliffc.aa.type.TypeMem.ALIVE, com.cliffc.aa.node.CallNode.all_fcns_wired(), com.cliffc.aa.node.Node.all_live(), com.cliffc.aa.type.TypeMem.all_reaching_aliases(), com.cliffc.aa.type.TypeMem.ALLMEM, com.cliffc.aa.type.Type< T extends Type< T >.ANY, com.cliffc.aa.type.TypeMem.basic_live(), com.cliffc.aa.node.CallNode.ctl(), com.cliffc.aa.type.TypeMem.DEAD, com.cliffc.aa.node.CallNode.dsp(), com.cliffc.aa.node.CallNode.emem(), com.cliffc.aa.type.BitsAlias.EMPTY, com.cliffc.aa.node.CallNode.err(), com.cliffc.aa.type.TypeMem.ESCAPE, com.cliffc.aa.node.CallNode.fdx(), com.cliffc.aa.type.BitsAlias.FULL, com.cliffc.aa.type.Type< T extends Type< T >.isa(), com.cliffc.aa.node.CallNode.live_use_call(), com.cliffc.aa.type.Bits< B extends Bits< B >.meet(), com.cliffc.aa.type.Type< T extends Type< T >.meet(), com.cliffc.aa.node.CallNode.mem(), com.cliffc.aa.node.CallNode.nargs(), com.cliffc.aa.type.Type< T extends Type< T >.oob(), com.cliffc.aa.type.TypeMemPtr.OOP, com.cliffc.aa.GVNGCM.Mode.Opto, com.cliffc.aa.node.ProjNode.proj(), com.cliffc.aa.node.FunPtrNode.ret(), com.cliffc.aa.type.TypeMem.slice_reaching_aliases(), and com.cliffc.aa.node.CallNode.targ().

Here is the call graph for this function:

◆ live_use_call()

TypeMem com.cliffc.aa.node.CallNode.live_use_call ( int  dfidx)
package

Definition at line 608 of file CallNode.java.

608  {
609  Type tcall = _val;
610  if( !(tcall instanceof TypeTuple) )
611  return tcall.above_center() ? TypeMem.DEAD : TypeMem.LNO_DISP;
612  TypeFunPtr tfp = ttfp(tcall);
613  // If resolve has chosen this dfidx, then the FunPtr is alive.
614  BitsFun fidxs = tfp.fidxs();
615  if( fidxs.above_center() ) return TypeMem.DEAD; // Nothing above-center is chosen
616  if( dfidx != -1 && !fidxs.test_recur(dfidx) ) return TypeMem.DEAD; // Not in the fidx set.
617  if( tfp.is_con() && !(fdx() instanceof FunPtrNode) )
618  return TypeMem.DEAD; // Will be replaced by a constant
619  // Otherwise the FIDX is alive
620  return TypeMem.LNO_DISP;
621  }

References com.cliffc.aa.node.Node._val, com.cliffc.aa.type.Bits< B extends Bits< B >.above_center(), com.cliffc.aa.type.Type< T extends Type< T >.above_center(), com.cliffc.aa.type.TypeMem.DEAD, com.cliffc.aa.node.CallNode.fdx(), com.cliffc.aa.type.TypeFunPtr.fidxs(), com.cliffc.aa.node.CallNode.fidxs(), com.cliffc.aa.type.TypeFunPtr.is_con(), com.cliffc.aa.type.TypeMem.LNO_DISP, com.cliffc.aa.type.Bits< B extends Bits< B >.test_recur(), and com.cliffc.aa.node.CallNode.ttfp().

Referenced by com.cliffc.aa.node.CallNode.live_use().

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

◆ 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:

◆ mem()

◆ 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:

◆ nargs()

int com.cliffc.aa.node.CallNode.nargs ( )
package

◆ 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:

◆ op_prec()

◆ parms()

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

Definition at line 786 of file CallNode.java.

786  {
787  return _defs._len>= DSP_IDX ? Arrays.copyOf(_defs._es,_defs._len-1) : new Node[0]; // All defs, except the FIDX.
788  }

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

◆ 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_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:

◆ 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_arg()

Node com.cliffc.aa.node.CallNode.set_arg ( int  idx,
Node  arg 
)
package

Definition at line 129 of file CallNode.java.

129 { assert idx>=DSP_IDX && idx <nargs(); return set_def(idx,arg); }

References com.cliffc.aa.node.CallNode.arg(), com.cliffc.aa.node.CallNode.nargs(), and com.cliffc.aa.node.Node.set_def().

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

Here is the call graph for this function:
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_dsp()

Node com.cliffc.aa.node.CallNode.set_dsp ( Node  dsp)

Definition at line 130 of file CallNode.java.

130 { return set_def(DSP_IDX, dsp); }

References com.cliffc.aa.node.CallNode.dsp(), and com.cliffc.aa.node.Node.set_def().

Referenced by com.cliffc.aa.node.CallNode.ideal_reduce(), and com.cliffc.aa.GVNGCM.remove_ambi().

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

◆ set_fdx()

Node com.cliffc.aa.node.CallNode.set_fdx ( Node  fun)

Definition at line 132 of file CallNode.java.

132 { return set_def(_defs._len-1,fun); }

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

Referenced by com.cliffc.aa.node.CallNode.ideal_reduce(), com.cliffc.aa.GVNGCM.remove_ambi(), com.cliffc.aa.node.FunNode.split_callers(), and com.cliffc.aa.node.TestNodeSmall.testCallNodeResolve().

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

◆ set_mem()

void com.cliffc.aa.node.CallNode.set_mem ( Node  mem)

Definition at line 131 of file CallNode.java.

131 { set_def(MEM_IDX, mem); }

References com.cliffc.aa.node.CallNode.mem(), and com.cliffc.aa.node.Node.set_def().

Referenced by com.cliffc.aa.node.CallNode._ideal_grow(), and com.cliffc.aa.node.CallNode.ideal_reduce().

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

◆ set_rpc()

void com.cliffc.aa.node.CallNode.set_rpc ( int  rpc)
package

Definition at line 776 of file CallNode.java.

776 { unelock(); _rpc=rpc; } // Unlock before changing hash

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

Referenced by com.cliffc.aa.node.CallNode.copy().

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

◆ set_ttfp()

static TypeTuple com.cliffc.aa.node.CallNode.set_ttfp ( TypeTuple  tcall,
TypeFunPtr  nfptr 
)
staticpackage

Definition at line 168 of file CallNode.java.

168 { return tcall.set(tcall.len()-2,nfptr); }

References com.cliffc.aa.type.TypeTuple.len(), and com.cliffc.aa.type.TypeTuple.set().

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

Here is the call graph for this function:
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:

◆ str()

String com.cliffc.aa.node.CallNode.str ( )
package

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

Definition at line 105 of file CallNode.java.

105 { return xstr(); } // Inline short name

References com.cliffc.aa.node.CallNode.xstr().

Here is the call 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:

◆ swap_new()

Node com.cliffc.aa.node.CallNode.swap_new ( Node  cepim,
MrgProjNode  mrg 
)
private

Definition at line 404 of file CallNode.java.

404  {
405  cepim.keep();
406  cepim.insert(mrg);
407  set_def(1,mrg.mem());
408  mrg.set_def(1,cepim.unkeep());
409  Env.GVN.revalive(mrg);
410  Env.GVN.add_flow_uses(mrg);
411  Env.GVN.add_flow(this);
412  Env.GVN.add_flow(cepim.in(0));
413  return this;
414  }

References com.cliffc.aa.GVNGCM.add_flow(), com.cliffc.aa.GVNGCM.add_flow_uses(), com.cliffc.aa.Env.GVN, com.cliffc.aa.node.Node.in(), com.cliffc.aa.node.Node.insert(), com.cliffc.aa.node.Node.keep(), com.cliffc.aa.node.MrgProjNode.mem(), com.cliffc.aa.GVNGCM.revalive(), com.cliffc.aa.node.Node.set_def(), and com.cliffc.aa.node.Node.unkeep().

Referenced by com.cliffc.aa.node.CallNode._ideal_grow().

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

◆ targ() [1/2]

static Type com.cliffc.aa.node.CallNode.targ ( Type  tcall,
int  x 
)
staticpackage

Definition at line 169 of file CallNode.java.

169 { return targ(((TypeTuple)tcall)._ts,x); }

References com.cliffc.aa.node.CallNode.targ().

Referenced by com.cliffc.aa.node.CallEpiNode.ideal_reduce(), com.cliffc.aa.node.CallNode.live_use(), and com.cliffc.aa.node.CallNode.targ().

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

◆ targ() [2/2]

static Type com.cliffc.aa.node.CallNode.targ ( Type[]  ts,
int  x 
)
staticpackage

Definition at line 170 of file CallNode.java.

170 { return ts[x]; }

◆ tctl()

static Type com.cliffc.aa.node.CallNode.tctl ( Type  tcall)
staticpackage

Definition at line 148 of file CallNode.java.

148 { return ((TypeTuple)tcall).at(CTL_IDX); }

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

Here is the caller graph for this function:

◆ tesc()

static TypeMemPtr com.cliffc.aa.node.CallNode.tesc ( Type  tcall)
staticpackage

Definition at line 151 of file CallNode.java.

151  {
152  if( !(tcall instanceof TypeTuple) ) return tcall.oob(TypeMemPtr.OOP);
153  TypeTuple tt = (TypeTuple)tcall;
154  return (TypeMemPtr)tt.at(tt.len()-1);
155  }

References com.cliffc.aa.type.TypeTuple.at(), com.cliffc.aa.type.TypeTuple.len(), com.cliffc.aa.type.Type< T extends Type< T >.oob(), and com.cliffc.aa.type.TypeMemPtr.OOP.

Referenced by com.cliffc.aa.node.LoadNode._find_previous_store_call(), com.cliffc.aa.node.CallNode.escapees(), and com.cliffc.aa.node.CallEpiNode.value().

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:

◆ ttfp()

static TypeFunPtr com.cliffc.aa.node.CallNode.ttfp ( Type  tcall)
static

Definition at line 157 of file CallNode.java.

157  {
158  TypeTuple tt = (TypeTuple)tcall;
159  return (TypeFunPtr)tt.at(tt.len()-2); // 2nd-to-last type
160  }

References com.cliffc.aa.type.TypeTuple.at(), and com.cliffc.aa.type.TypeTuple.len().

Referenced by com.cliffc.aa.node.TestNodeSmall._testMonotonicChain(), com.cliffc.aa.node.CallNode.add_flow_extra(), com.cliffc.aa.node.CallEpiNode.check_and_wire(), com.cliffc.aa.GVNGCM.gcp(), com.cliffc.aa.node.CEProjNode.good_call(), 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.CallEpiNode.live_use(), com.cliffc.aa.node.CallNode.live_use_call(), and com.cliffc.aa.node.FunNode.split_size().

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

◆ ttfpx()

static TypeFunPtr com.cliffc.aa.node.CallNode.ttfpx ( Type  tcall)
static

Definition at line 162 of file CallNode.java.

162  {
163  if( !(tcall instanceof TypeTuple) ) return null;
164  TypeTuple tt = (TypeTuple)tcall;
165  Type t = tt.at(tt.len()-2);
166  return t instanceof TypeFunPtr ? (TypeFunPtr)t : null;
167  }

References com.cliffc.aa.type.TypeTuple.at(), and com.cliffc.aa.type.TypeTuple.len().

Referenced by com.cliffc.aa.node.CallNode.err(), com.cliffc.aa.GVNGCM.remove_ambi(), and com.cliffc.aa.node.CallEpiNode.value().

Here is the call graph for this function:
Here is the caller 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:

◆ 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()

◆ 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:

◆ 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.CallNode.value ( GVNGCM.Mode  opt_mode)

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

Definition at line 421 of file CallNode.java.

421  {
422  // Pinch to XCTRL/CTRL
423  Type ctl = ctl()._val;
424  if( ctl != Type.CTRL ) return ctl.oob();
425 
426  // Not a memory to the call?
427  Type mem = mem()==null ? TypeMem.ANYMEM : mem()._val;
428  TypeMem tmem = mem instanceof TypeMem ? (TypeMem)mem : TypeMem.ANYMEM;
429 
430  // Result type includes a type-per-input and an extra roll-up type of all
431  // escaping aliases.
432  final Type[] ts = Types.get(_defs._len+1);
433  ts[CTL_IDX] = Type.CTRL;
434  ts[MEM_IDX] = tmem; // Memory into the callee, not caller
435 
436  // Copy args for called functions. FIDX is refined below.
437  // Also gather all aliases from all args.
439  for( int i=DSP_IDX; i<nargs(); i++ )
440  as = as.meet(get_alias(ts[i] = arg(i)==null ? Type.XSCALAR : arg(i)._val));
441  // Recursively search memory for aliases; compute escaping aliases
442  BitsAlias as2 = tmem.all_reaching_aliases(as);
443  ts[_defs._len] = TypeMemPtr.make(as2,TypeObj.ISUSED); // Set escapes as last type
444  // Only pass along escaping aliases; others are not available to the call
445  // body. In the case of recursive calls, aliases made new in the body may
446  // not be passed into the recursive calls, and thus not into the call head
447  // and thus avoids self-merging. Once we decide to inline, keep the entire
448  // alias set since this filtering by the CallNode goes away as we inline.
449  if( !_is_copy ) ts[MEM_IDX] = tmem.slice_reaching_aliases(as2);
450 
451  // Not a function to call?
452  Type tfx = fdx()==null ? TypeFunPtr.GENERIC_FUNPTR : fdx()._val;
453  if( !(tfx instanceof TypeFunPtr) )
454  tfx = tfx.oob(TypeFunPtr.GENERIC_FUNPTR);
455  TypeFunPtr tfp = (TypeFunPtr)tfx;
456  BitsFun fidxs = tfp.fidxs();
457  if( _not_resolved_by_gcp && // If overloads not resolvable, then take them all and we are in-error
459  tfp = tfp.make_from(fidxs.dual()); // Force FIDXS low (take all), and we are in-error
460 
461  ts[_defs._len-1] = tfp; // FIDX is the last _def, 2nd-to-last type in ts
462 
463  return TypeTuple.make(ts);
464  }

References com.cliffc.aa.node.Node._defs, com.cliffc.aa.node.CallNode._is_copy, com.cliffc.aa.node.CallNode._not_resolved_by_gcp, com.cliffc.aa.node.Node._val, com.cliffc.aa.type.Bits< B extends Bits< B >.above_center(), com.cliffc.aa.type.TypeMem.all_reaching_aliases(), com.cliffc.aa.type.TypeMem.ANYMEM, com.cliffc.aa.node.CallNode.arg(), com.cliffc.aa.node.CallNode.ctl(), com.cliffc.aa.type.Type< T extends Type< T >.CTRL, com.cliffc.aa.type.Type< T extends Type< T >.dual(), com.cliffc.aa.type.Bits< B extends Bits< B >.dual(), com.cliffc.aa.type.BitsAlias.EMPTY, com.cliffc.aa.node.CallNode.fdx(), com.cliffc.aa.type.TypeFunPtr.fidxs(), com.cliffc.aa.node.CallNode.fidxs(), com.cliffc.aa.type.TypeFunPtr.GENERIC_FUNPTR, com.cliffc.aa.type.Types.get(), com.cliffc.aa.node.CallNode.get_alias(), com.cliffc.aa.type.TypeObj< O extends TypeObj< O >.ISUSED, com.cliffc.aa.type.TypeMemPtr.make(), com.cliffc.aa.type.TypeTuple.make(), com.cliffc.aa.type.TypeFunPtr.make_from(), com.cliffc.aa.type.Bits< B extends Bits< B >.meet(), com.cliffc.aa.node.CallNode.mem(), com.cliffc.aa.node.CallNode.nargs(), com.cliffc.aa.type.Type< T extends Type< T >.oob(), com.cliffc.aa.type.TypeMem.slice_reaching_aliases(), and com.cliffc.aa.type.Type< T extends Type< T >.XSCALAR.

Referenced by com.cliffc.aa.node.TestNodeSmall.testCallNodeResolve2().

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

◆ walk_dom_last()

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

Reimplemented in com.cliffc.aa.node.ScopeNode, com.cliffc.aa.node.RegionNode, com.cliffc.aa.node.ConNode< T extends Type >, com.cliffc.aa.node.ThunkNode, com.cliffc.aa.node.StartNode, and com.cliffc.aa.node.LoopNode.

Definition at line 863 of file Node.java.

863  {
864  assert in(0) != null; // All default control nodes pass ctrl in slot 0
865  Node n = in(0).walk_dom_last(P);
866  if( n != null ) return n; // Take last answer first
867  return P.test(this) ? this : null;
868  }

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

Referenced by com.cliffc.aa.node.CastNode.ideal_mono(), com.cliffc.aa.node.LoopNode.walk_dom_last(), com.cliffc.aa.node.ThunkNode.walk_dom_last(), com.cliffc.aa.node.RegionNode.walk_dom_last(), and com.cliffc.aa.node.Node.walk_dom_last().

Here is the call graph for this function:
Here is the caller 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.CallNode.xstr ( )

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

Definition at line 104 of file CallNode.java.

104 { return _is_copy ? "CopyCall" : (is_dead() ? "Xall" : "Call"); } // Self short name

References com.cliffc.aa.node.CallNode._is_copy, and com.cliffc.aa.node.Node.is_dead().

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

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

◆ _badargs

◆ _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

◆ _INIT0_CNT

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

◆ _is_copy

◆ _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().

◆ _not_resolved_by_gcp

boolean com.cliffc.aa.node.CallNode._not_resolved_by_gcp

◆ _op

◆ _rpc

◆ _tvar

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

◆ _uid

◆ _unpacked

boolean com.cliffc.aa.node.CallNode._unpacked
package

◆ _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().

◆ 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.Bits.dual
B dual()
Definition: Bits.java:368
com.cliffc.aa.type.BitsAlias.FULL
static BitsAlias FULL
Definition: BitsAlias.java:27
com.cliffc.aa.node.CallNode.live_use_call
TypeMem live_use_call(int dfidx)
Definition: CallNode.java:608
com.cliffc.aa.type.TypeTuple.set
TypeTuple set(int idx, Type t)
Definition: TypeTuple.java:186
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.node.CallNode.set_mem
void set_mem(Node mem)
Definition: CallNode.java:131
com.cliffc.aa.type.TypeMemPtr.NO_DISP
static final Type NO_DISP
Definition: TypeMemPtr.java:80
com.cliffc.aa.type.BitsRPC.ALL
static final int ALL
Definition: BitsRPC.java:25
com.cliffc.aa.node.Node._do_reduce
Node _do_reduce()
Definition: Node.java:570
com.cliffc.aa.node.CallNode._unpacked
boolean _unpacked
Definition: CallNode.java:88
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.util.Ary.push
E push(E e)
Add element in amortized constant time.
Definition: Ary.java:58
com.cliffc.aa.type.TypeFunPtr._nargs
int _nargs
Definition: TypeFunPtr.java:27
com.cliffc.aa.type.TypeRPC.make
static TypeRPC make(BitsRPC rpcs)
Definition: TypeRPC.java:25
com.cliffc.aa.node.Node.OP_START
static final byte OP_START
Definition: Node.java:45
com.cliffc.aa.type.Type.isa
boolean isa(Type t)
Definition: Type.java:623
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.node.CallNode.cepi
CallEpiNode cepi()
Definition: CallNode.java:769
com.cliffc.aa.AA.UID
static int UID
Definition: AA.java:43
com.cliffc.aa.node.CallNode.mem
Node mem()
Definition: CallNode.java:119
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.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.Node.len
int len()
Definition: Node.java:125
com.cliffc.aa.type.TypeMem.XMEM
static final TypeMem XMEM
Definition: TypeMem.java:225
com.cliffc.aa.type.TypeMemPtr.OOP
static final TypeMemPtr OOP
Definition: TypeMemPtr.java:94
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.GVNGCM.add_flow_uses
void add_flow_uses(Node n)
Definition: GVNGCM.java:55
com.cliffc.aa.node.CallNode._is_copy
boolean _is_copy
Definition: CallNode.java:89
com.cliffc.aa.node.CallNode.get_alias
BitsAlias get_alias(Type t)
Definition: CallNode.java:466
com.cliffc.aa.type.Type.XSCALAR
static final Type XSCALAR
Definition: Type.java:329
com.cliffc.aa.type.TypeMem.LIVE_BOT
static final TypeMem LIVE_BOT
Definition: TypeMem.java:226
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.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.type.TypeMem.ESCAPE
static final TypeMem ESCAPE
Definition: TypeMem.java:227
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.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.GVNGCM.revalive
void revalive(Node... ns)
Definition: GVNGCM.java:103
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.is_pure_call
Node is_pure_call()
Definition: Node.java:834
com.cliffc.aa.node.Node.keep
public< N extends Node > N keep()
Definition: Node.java:228
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.node.CallNode.ttfpx
static TypeFunPtr ttfpx(Type tcall)
Definition: CallNode.java:162
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.type.TypeMem.ALLMEM
static final TypeMem ALLMEM
Definition: TypeMem.java:228
com.cliffc.aa.type.BitsFun.tree
Tree< BitsFun > tree()
Definition: BitsFun.java:23
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_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.type.Type.meet
final Type meet(Type t)
Definition: Type.java:412
com.cliffc.aa.node.CallEpiNode.check_and_wire
boolean check_and_wire()
Definition: CallEpiNode.java:179
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.Node.OP_CALL
static final byte OP_CALL
Definition: Node.java:17
com.cliffc.aa.type.TypeMem.ANYMEM
static final TypeMem ANYMEM
Definition: TypeMem.java:228
com.cliffc.aa.type.Types
Definition: Types.java:9
com.cliffc.aa.type.BitsRPC.new_rpc
static int new_rpc(int par)
Definition: BitsRPC.java:26
com.cliffc.aa.node.Node.ideal_reduce
Node ideal_reduce()
Definition: Node.java:441
com.cliffc.aa.type.Type.ALL
static final Type ALL
Definition: Type.java:324
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.Node.Node
Node(byte op)
Definition: Node.java:247
com.cliffc.aa.util.Ary.asAry
E[] asAry()
Definition: Ary.java:172
com.cliffc.aa.util.VBitSet.tset
boolean tset(int idx)
Definition: VBitSet.java:7
com.cliffc.aa.type.TypeFunPtr.is_forward_ref
boolean is_forward_ref()
Definition: TypeFunPtr.java:186
com.cliffc.aa.type.Bits.above_center
boolean above_center()
Definition: Bits.java:204
com.cliffc.aa.Env.GVN
static final GVNGCM GVN
Definition: Env.java:13
com.cliffc.aa.type.TypeMem.LNO_DISP
static final TypeMem LNO_DISP
Definition: TypeMem.java:226
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.TypeObj
Definition: TypeObj.java:15
com.cliffc.aa.type.Type.isBitShape
byte isBitShape(Type t)
Definition: Type.java:814
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.node.CallNode.nargs
int nargs()
Definition: CallNode.java:125
com.cliffc.aa.type.Type.is_con
boolean is_con()
Definition: Type.java:776
com.cliffc.aa.type.TypeMem.and_unused
BitsAlias and_unused(BitsAlias escs)
Definition: TypeMem.java:498
com.cliffc.aa.type.BitsFun.is_parent
static boolean is_parent(int idx)
Definition: BitsFun.java:48
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.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.type.TypeMem.live
TypeLive live()
Definition: TypeMem.java:559
com.cliffc.aa.node.CallNode._rpc
int _rpc
Definition: CallNode.java:87
com.cliffc.aa.node.Node.OP_IF
static final byte OP_IF
Definition: Node.java:29
com.cliffc.aa.node.CallNode._ideal_grow
Node _ideal_grow(MrgProjNode mem, ProjNode cepim, ProjNode cepid, BitsAlias escs, int i)
Definition: CallNode.java:373
com.cliffc.aa.node.Node.kill
Node kill()
Definition: Node.java:211
com.cliffc.aa.node.CallNode._not_resolved_by_gcp
boolean _not_resolved_by_gcp
Definition: CallNode.java:90
com.cliffc.aa.node.Node._keep
byte _keep
Definition: Node.java:86
com.cliffc.aa.node.CallNode.escapees
BitsAlias escapees()
Definition: CallNode.java:472
com.cliffc.aa.node.Node.adderr
void adderr(HashSet< ErrMsg > errs)
Definition: Node.java:789
com.cliffc.aa.node.Node.merge
Node merge(Node x)
Definition: Node.java:702
com.cliffc.aa.type.BitsRPC
Definition: BitsRPC.java:8
com.cliffc.aa.type.Type.CTRL
static final Type CTRL
Definition: Type.java:326
com.cliffc.aa.node.Node.is_copy
Node is_copy(int idx)
Definition: Node.java:827
com.cliffc.aa.type.TypeTuple.len
int len()
Definition: TypeTuple.java:183
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.type.TypeMem.basic_live
boolean basic_live()
Definition: TypeMem.java:561
com.cliffc.aa.type.TypeObj.ISUSED
static final TypeObj ISUSED
Definition: TypeObj.java:45
com.cliffc.aa.type.TypeTuple.make
static TypeTuple make(boolean any, Type[] ts)
Definition: TypeTuple.java:82
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.type.Type.may_be_con
boolean may_be_con()
Definition: Type.java:759
com.cliffc.aa.type.TypeMem.ALIVE
static final TypeMem ALIVE
Definition: TypeMem.java:226
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.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.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.CallNode.fidxs
BitsFun fidxs()
Definition: CallNode.java:133
com.cliffc.aa.type.BitsAlias.EMPTY
static BitsAlias EMPTY
Definition: BitsAlias.java:27
com.cliffc.aa.util.VBitSet
Definition: VBitSet.java:5
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.node.CallNode.least_cost
FunPtrNode least_cost(BitsFun choices, Node unk)
Definition: CallNode.java:624
com.cliffc.aa.util.SB
Tight/tiny StringBuilder wrapper.
Definition: SB.java:8
com.cliffc.aa.node.CallNode.ctl
Node ctl()
Definition: CallNode.java:118
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.type.Bits.bitCount
int bitCount()
Definition: Bits.java:113
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.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.util.SB.nl
SB nl()
Definition: SB.java:48
com.cliffc.aa.node.Node.xstr
String xstr()
Definition: Node.java:282
com.cliffc.aa.node.CallNode.all_fcns_wired
boolean all_fcns_wired()
Definition: CallNode.java:601
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.CallNode.add_flow_use_extra
void add_flow_use_extra(Node chg)
Definition: CallNode.java:498
com.cliffc.aa.node.CallNode.set_arg
Node set_arg(int idx, Node arg)
Definition: CallNode.java:129
com.cliffc.aa.node.Node.is_forward_ref
boolean is_forward_ref()
Definition: Node.java:830
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.CallEpiNode.nwired
int nwired()
Definition: CallEpiNode.java:37
com.cliffc.aa.node.CallNode.ttfp
static TypeFunPtr ttfp(Type tcall)
Definition: CallNode.java:157
com.cliffc.aa.type.TypeMemPtr._aliases
BitsAlias _aliases
Definition: TypeMemPtr.java:16
com.cliffc.aa.type.TypeTuple.at
Type at(int idx)
Definition: TypeTuple.java:182
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.TypeTuple.CALLE
static final TypeTuple CALLE
Definition: TypeTuple.java:131
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.CallNode.tctl
static Type tctl(Type tcall)
Definition: CallNode.java:148
com.cliffc.aa.node.Node._op
final byte _op
Definition: Node.java:85
com.cliffc.aa.node.Node.walkerr_def
void walkerr_def(HashSet< ErrMsg > errs, VBitSet bs)
Definition: Node.java:771
com.cliffc.aa.type.BitsFun.next_kid
static int next_kid(int alias, int kid)
Definition: BitsFun.java:52
com.cliffc.aa.tvar.TV2
Definition: TV2.java:23
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.CallNode.xstr
String xstr()
Definition: CallNode.java:104
com.cliffc.aa.type.Type.oob
Type oob()
Definition: Type.java:635
com.cliffc.aa.type.TypeMem.all_reaching_aliases
BitsAlias all_reaching_aliases(BitsAlias aliases)
Definition: TypeMem.java:349
com.cliffc.aa.node.Node.is_multi_head
boolean is_multi_head()
Definition: Node.java:354
com.cliffc.aa.node.CallNode.get_fptr
static FunPtrNode get_fptr(FunNode fun, Node unk)
Definition: CallNode.java:678
com.cliffc.aa.node.Node.xval
Type xval()
Definition: Node.java:460
com.cliffc.aa.type.TypeTuple._ts
Type[] _ts
Definition: TypeTuple.java:13
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.type.Type.XNIL
static final Type XNIL
Definition: Type.java:333
com.cliffc.aa.type.TypeFunPtr.names
String names(boolean debug)
Definition: TypeFunPtr.java:64
com.cliffc.aa.node.Node.str
String str()
Definition: Node.java:283
com.cliffc.aa.node.CallNode.swap_new
Node swap_new(Node cepim, MrgProjNode mrg)
Definition: CallNode.java:404
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.node.CallNode.set_fdx
Node set_fdx(Node fun)
Definition: CallNode.java:132
com.cliffc.aa.util.SB.i
SB i(int d)
Definition: SB.java:38
com.cliffc.aa.node.RetNode.funptr
FunPtrNode funptr()
Definition: RetNode.java:37
com.cliffc.aa.node.CallNode.targ
static Type targ(Type tcall, int x)
Definition: CallNode.java:169
com.cliffc.aa.node.CallNode.set_dsp
Node set_dsp(Node dsp)
Definition: CallNode.java:130
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.util.Ary.find
int find(E e)
Find the first matching element using ==, or -1 if none.
Definition: Ary.java:192
com.cliffc.aa.node.Node._tvar
TV2 _tvar
Definition: Node.java:94
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.node.CallNode.arg
Node arg(int x)
Definition: CallNode.java:127
com.cliffc.aa.node.FunNode
Definition: FunNode.java:58
com.cliffc.aa.type.Bits.meet
B meet(final B bs)
Definition: Bits.java:298
com.cliffc.aa.node.CallNode.fdx
Node fdx()
Definition: CallNode.java:121
com.cliffc.aa.node.CallNode._badargs
Parse[] _badargs
Definition: CallNode.java:94
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.CallNode.err
ErrMsg err(boolean fast)
Definition: CallNode.java:694
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.node.Node.OP_PHI
static final byte OP_PHI
Definition: Node.java:38
com.cliffc.aa.node.CallNode.CallNode
CallNode(boolean unpacked, Parse[] badargs, Node... defs)
Definition: CallNode.java:95
com.cliffc.aa.Env.DEFMEM
static DefMemNode DEFMEM
Definition: Env.java:19
com.cliffc.aa.type.TypeFunPtr.is_con
boolean is_con()
Definition: TypeFunPtr.java:136
com.cliffc.aa.Env
Definition: Env.java:12
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.CallNode.set_rpc
void set_rpc(int rpc)
Definition: CallNode.java:776
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.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.type.TypeMem.slice_reaching_aliases
TypeMem slice_reaching_aliases(BitsAlias aliases)
Definition: TypeMem.java:392
com.cliffc.aa.node.CallNode.emem
static TypeMem emem(Type tcall)
Definition: CallNode.java:149
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.CallNode.dsp
Node dsp()
Definition: CallNode.java:120
com.cliffc.aa.node.CallNode.tesc
static TypeMemPtr tesc(Type tcall)
Definition: CallNode.java:151
com.cliffc.aa.type.Bits.is_empty
boolean is_empty()
Definition: Bits.java:207
com.cliffc.aa.type.TypeFunPtr.make_from
TypeFunPtr make_from(TypeMemPtr disp)
Definition: TypeFunPtr.java:75
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