Go to the documentation of this file. 1 package com.cliffc.aa.node;
30 @Override
public String
xstr() {
32 if(
is_dead() )
return "XallEpi";
36 @Override
public boolean is_mem() {
return true; }
44 if( !(tc instanceof
TypeTuple) )
return null;
52 for(
int i = 0; i <
nwired(); i++ ) {
79 if( fun !=
null && fun.
_defs._len==2 &&
82 (tdef==
null || tretmem.
isa(tdef)) &&
101 if(
nwired()!=1 )
return null;
102 int fidx = fidxs.
abit();
103 if( fidx == -1 )
return null;
107 if(
call.
err(
true)!=
null )
return null;
113 && fun.
nargs() == cnargs;
116 if( ret==
null )
return null;
121 if( parm instanceof
ParmNode && parm.
in(0)==fun ) {
123 if( idx < 0 )
continue;
148 if( rrez instanceof
ParmNode && rrez.
in(CTL_IDX) == fun && cmem == rmem && inline )
153 if( trez.
is_con() && rctl==fun && cmem == rmem && inline )
157 boolean can_inline=!(rrez instanceof
ParmNode) && rmem==cmem &&
inline;
159 if( parm !=
null && parm != fun &&
160 !(parm instanceof
ParmNode && parm.
in(0) == fun) &&
170 GVN.add_work_all(irez);
183 if( !(tcall instanceof
TypeTuple) )
return false;
188 boolean progress =
false;
189 for(
int fidx : fidxs ) {
195 if( ret==
null )
continue;
196 if(
_defs.find(ret) != -1 )
continue;
208 assert
_defs.find(ret)==-1;
214 GVN.add_flow_defs(
call);
225 if( arg.
in(0) != fun || !(arg instanceof
ParmNode) )
continue;
239 GVN.add_flow_defs(arg);
245 GVN.add_flow_uses(fun);
246 if( fun instanceof
ThunkNode ) GVN.add_reduce_uses(fun);
260 if( tcall.
_ts.length < ARG_IDX )
return tcall.
oob();
299 for(
int fidx : fidxs ) {
301 for(
int i=0; i<
nwired(); i++ ) {
303 if( fidx == rfidx )
continue outerloop;
307 if( kids==2 )
continue;
322 for(
int i=0; i<
nwired(); i++ ) {
345 int len = opt_mode._CG ? Math.max(caller_mem.
len(),post_call.
len()) : defmem.
len();
347 for(
int i=1; i<pubs.length; i++ ) {
373 for(
int i=0; i<
nwired(); i++ )
381 for(
int i=0; i<
nwired(); i++ ) {
383 if( ret.
is_copy() )
return true;
388 { found=
true;
break; }
389 if( !found )
return false;
420 for(
int i = 1; i < fun.
_defs._len; i++ )
451 int fidx = ((
RetNode)def).fidx();
static int parent(int kid)
static final BitsFun EMPTY
static boolean good_call(Type tcall, Node ftun)
static final TypeMem DEAD
void wire0(CallNode call, Node fun)
static TypeRPC make(BitsRPC rpcs)
Memory type; the state of all of memory; memory edges order memory ops.
static final TypeMem XMEM
static final TypeMem ESCAPE
an implementation of language AA
static final byte OP_CALLEPI
static final BitsFun FULL
Type value(GVNGCM.Mode opt_mode)
static TypeFunPtr ttfpx(Type tcall)
static final TypeMem ALLMEM
boolean test_recur(int i)
static boolean test(long[] bits, int i)
static final TypeMem ANYMEM
CallEpiNode(Node... nodes)
static TypeMem make0(TypeObj[] as)
static boolean is_parent(int idx)
static final TypeTuple RET
static ProjNode proj(Node head, int idx)
void add_reduce_uses(Node n)
CallEpiNode set_is_copy(Node ctl, Node mem, Node rez)
static FunNode find_fidx(int fidx)
static BitsAlias esc_out(TypeMem tmem, Type trez)
static void retype_mem(BitSet aliases, Node mem, Node exit, boolean skip_calls)
static TypeTuple make(boolean any, Type[] ts)
void wire1(CallNode call, Node fun, Node ret)
an implementation of language AA
Node copy(boolean copy_edges)
static TypeFunPtr ttfp(Type tcall)
Node set_def(int idx, Node n)
static final TypeTuple CALLE
public< N extends Node > N add_reduce(N n)
CallEpiNode unwire(CallNode call, RetNode ret)
static Type tctl(Type tcall)
void add_flow_defs(Node n)
BitsAlias all_reaching_aliases(BitsAlias aliases)
public< N extends Node > N add_flow(N n)
static Type targ(Type tcall, int x)
TypeMem live_use(GVNGCM.Mode opt_mode, Node def)
static final TypeMemPtr OOP0
static TypeMem emem(Type tcall)
static TypeMemPtr tesc(Type tcall)
void add_flow_use_extra(Node chg)