#include "defs.h"#include "errors.h"#include "cxx_memory.h"#include "wn.h"#include "stab.h"#include "dep_graph.h"#include "region_util.h"#include "name.h"

Go to the source code of this file.
| #define lnoutils_INCLUDED "lnoutils.h" |
This file has some miscellaneous routines of interest to LNO/C++ people.
INT32 Dot_Product(const mINT32* v1, mINT32* v2, INT count) INT64 Dot_Product(const mINT64* v1, mINT64* v2, INT count) INT64 Dot_Product(const mINT32* v1, mINT64* v2, INT count) INT64 Dot_Product(const mINT64* v1, mINT32* v2, INT count)
Sum(c=0 to c=count-1) (v1[c]*v2[c])
void Dump_WN(WN*, FILE*, INT fancy, INT indent_start = 2, INT indent_inc = 2, ARRAY_DIRECTED_GRAPH16* =NULL, WN** list = NULL, WN* parent = NULL, BOOL recursive = TRUE)
Dumps the WN node and all its children (unless recursive is FALSE in which case just dump the node) into the specified file in a fairly human readable format. 'fancy' of 0 is boring output. 1 is more concise. 2 do loop info. 3 parents. 'indent_start' indicates how much whitespace to put before each node, and indent_inc indicates how much more whitespace to add for each level of structured control flow. list is a NULL terminated array of WNs. If one of these is encountered, the output is annotated with '**x**' for that node. If a dependence graph is passed in (non-null), each load/store is looked up in the graph, and if found, a '[v#]' is put next to the opcode.
inline WN* LWN_Make_Icon(TYPE_ID wtype, INT64 i)
Make an integer constant whirl node.
TYPE_ID Max_Wtype(TYPE_ID a, TYPE_ID b)
Given two indices to be added/subtracted/maxed/mined, what is the type that holds them? It's not an easy question. If we have 32 bit signed and 32 bit unsigned, there is no correct answer other than 64 bit signed. Since we are trying not to expand, given that the odds of there being a problem are infinitesimal, we risk a bug by choosing a 32 bit version, but it's the only real choice. Which 32 bits to choose?? Could be wrong either way. We prefer the signed, because that's probably the right choice. Making every new index a signed 64 bit might be closer to correct.
Thankfully, in FORTRAN it's rarely a problem, since everything's the same type.
INT Do_Depth(WN* wn, WN** loops = NULL, INT mx = 0)
How deep is this statement nested within do loops. The outermost loop is loop 0.
INT Good_Do_Depth(WN* wn, WN** loops = NULL, INT mx = 0)
How deep is this statement nested within good do loops. The outermost loop is loop 0. Good dos outside of bad dos don't count. The number of dependence components in an edge must exactly agree with the common nesting of this.
void Build_Doloop_Stack(WN* wn, DOLOOP_STACK* stack)
Build a do loop stack. Pass in an empty but non-NULL DOLOOP_STACK when calling.
void Replace_Symbol(WN* wn, SYMBOL symold, SYMBOL symnew, WN* alias_wn, WN* ancestor = NULL)
Walk the tree of wn and replace all instances of old symbol with the new symbol. The new symbol is a pseudo register iff alias_wn is NULL. Otherwise, alias_wn holds a WN from which we can steal alias info. When one knows that the symbol can only have du chain arcs pointing from that symbol to itself, then one can call with ancestor being non-NULL. Specifically, Replace_Symbol(wn,...,wn).
void Replace_Symbols(WN* wn, SYMBOL* sold, SYMBOL* snew, INT count, WN** alias_wns, WN* ancestors = NULL)
Walk the tree of wn and replace all instances of old symbols with the corresponding new symbol. All new symbols are pseudo registers iff alias_wns is NULL. Otherwise, alias_wns[i] holds alias info for snew[i]. All ancestors are null if ancestors==NULL; otherwise use ancestors[i].
BOOL Add_To_Symbol(WN* wn, INT64 i, ST* st, WN_OFFSET offset, TYPE_ID wtype, BOOL stok = FALSE) BOOL Add_To_Symbol(WN* wn, INT64 i, SYMBOL sym, BOOL stok = FALSE)
Recursively replace st with st+i. If stok is true, then a store is ok, and is ignored. Typically, stok is false, because when adding to a symbol, we don't expect to see a store to it. The return value is TRUE if anything changed that has not been simplified. NOTE: The first version is obsolete.
WN* Replace_Wnexp_With_Exp_Copy(WN* wn, WN* expr, DU_MANAGER* =NULL, BOOL* added_cvt=NULL,ARRAY_DIRECTED_GRAPH16 *dep_graph=NULL)
Replace wn with a copy of expr, and adjust parent pointers. If DU parameter is not null, then assume that expr's ldids when copied to wn arise from the same defs. It will do casts between integer types, and otherwise doesn't cast, so be careful. Returns a WN* to the copy of the expression. If *added_cvt != NULL, set *added_cvt to TRUE if a convert was added to the expression after copying, set *added_cvt to FALSE otherwise.
WN* Replace_Scalar_Store_With_Array_Store(WN* scalar_store, WN* array_store, DU_MANAGER* =NULL)
Replace the 'scalar_store' with the 'array_store' and adjust the parent pointers. The DU parameter is used in the same way as in Replace_Wnexp_With_Exp_Copy() above.
void Replace_Ldid_With_Exp_Copy( SYMBOL symbol, WN* wn, WN* expr, DU_MANAGER* du = NUL, ARRAY_DIRECTED_GRAPH16 *dep_graph=NULLL );
Replace occurances of LDID symbol recursively found in wn with a copy of the given expression. Adjust parent pointers. If the du/dep_graph is not null, then also update by assuming that the uses in wn that are copied from expr will arise from the same defs as in expr.
WN* LWN_Integer_Cast(WN* tree, TYPE_ID to, TYPE_ID from)
Create a cast which casts 'tree' from type 'from' to type 'to'.
WN* LWN_Integer_Casts(WN* tree, TYPE_ID to, TYPE_ID from)
Create a cast which casts 'tree' from type 'from' to type 'to', producing a CVTL as well as a CVT, if necessary.
SYMBOL Create_Preg_Symbol(const char* name, TYPE_ID type)
Makes a new preg symbol with the given name and type.
SYMBOL Create_Stack_Symbol(const char* name, TYPE_ID type)
Makes a new local stack variable symbol with the given name and type.
ST* Lookup_Function_Name(const char* name);
Returns ST for this function, creating a new one if necessary.
void Reset_Do_Loop_Depths(WN* loop, INT depth)
Set this loop to the given depth and loops further in appropriately.
void Unmapped_Vertices_Here_In(WN* wn)
Indicate in all DO annotations from here in that a vertex may be unmapped. NOTE: assumes there exist unmapped vertices.
TYPE_ID Do_Wtype(WN* wn)
The TYPE_ID of the index for the DO_LOOP.
ACCESS_VECTOR* Difference_Inequality( ACCESS_VECTOR* lb, ACCESS_VECTOR* ub, INT var, DIFFERENCE_KIND code, MEM_POOL* pool );
Allocate from pool and compute an access vector that represents either the inequality ub - lb < 0, ub - lb <= 1, or ub - lb >= 0, depending on the DIFFERENCE_KIND, which can be one of DIFFERENCE_EXEC_NEVER, DIFFERENCE_EXEC_NEVER_OR_ONCE, DIFFERENCE_EXEC_ALWAYS. The expression is created for variable var, typically Nest_Depth()-1.
void Print_Def_Use(WN *func_nd, FILE *fp)
Print out all the def-use/use-def chains for things rooted at func_nd.
BOOL Statically_Safe_Exp(WN *wn)
Is this expression safe to speculate? Currently, we say it is if it only contains, ldids, INTCONST, CONST, +, -, *, MAX, MIN, ABS,NEG,SQRT,BNOT,LNOT,COMPLEX,EQ,NE,GE,GT,LE,LT,BAND,BIOR,BXOR, LAND,LIOR,SHL,ASHR,LSHR,SELECT,MADD,MSUB,NMADD,NMSUB. Furthermore, for floating point ops and complex ops, we require that TENV:X >= 2. If X >= 3, everything is safe except Loads and expression calls. If X >= 4, always return TRUE
extern BOOL Statically_Safe_Node(WN* wn)
Returns TRUE if the node is safe to speculate, FALSE otherwise.
void Unrolled_DU_Update(WN **bodies, UINT u, INT loopno, BOOL update_pointers = TRUE, BOOL cross_index=TRUE)
Fix the def-use and use-def chains after unrolling. Loopno is the number of the loop being unrolled u times. bodies[0..u-1] are identical copies of code bodies 0 is the original. Return 0 on error
If update_pointers is true, then def_list pointers to loops that are themselves in the bodies are updated. This is the default, and you usually want this, unless you know the do loops in the boides are placeholders and that really you will put things (without the loops) back into bodies[0]. This can be convenient for certain kinds of unrolling.
If cross_index is FALSE, we don't put in any cross edges between bodies[i] and bodies[j] for references to loop variable loopno
THIS ROUTINE REQUIRES THAT LOOPS BE ANNOTATED WITH CORRECT DEPTH INFORMATION.
Find the ST_Base of a memory reference. If it's an OPR_LDA, just look at it's ST_Base(WN_st(ref)). Otherwise, follow the def-use chain backwards looking for a single OPR_LDA. Return NULL if can't find the base or if there is more than one possible base.
BOOL Index_Variable_Live_At_Entry(WN* loop) BOOL Index_Variable_Live_At_Exit(WN* loop)
Use this function to determine whether loop's index variable is possibly live on exit/entry. Don't use exit routine unless you know that the DU/UD information is up to date. Entry routine just sees if variable is on start list.
WN* Outermost_Enclosing_Loop(WN* loop)
Returns the outermost loop enclosing 'loop', which may be 'loop' itself.
void Finalize_Index_Variable(WN *wn, BOOL insert_after_loop, BOOL try_sink)
Use this function to generate a final value expression for the loop 'wn' after or before the loop. If 'insert_after_loop', insert the final value expression after the loop, otherwise put it before the loop. If 'insert_after_loop' and 'try_sink', attempt to sink it out of as many loops as possible.
void Finalize_Index_Variable_For_Remove_Unity_Trip_Loop(WN *wn, BOOL insert_after_loop, BOOL try_sink)
Same as the above, but doesn't require Upper_Bound_Standardize() to work, because the final value is the initial value.
void DU_Sanity_Check(WN* func_nd, FILE* fp, INT fancy)
I'm not sure how this differs from LNO_Check_Du. I know it's better, but I don't know if both should exist.
void LNO_Check_Graph(ARRAY_DIRECTED_GRAPH16* dg);
More extensive checking than just dg->Check_Graph() -- makes sure the arcs are the appropriate length.
void LNO_Check_Du(WN* func_nd)
Defined only when Is_True_On is set. Check that the function's DU/UD arcs are a superset of those generated by rerunning preopt.
void IV_Loop_Stmt_Check(WN* wn, MEM_POOL* pool)
Called from DU_Sanity_Check, but you can call this on your own. Check that loop_stmt() for induction variables point to the right thing. Print a warning and fix it if not.
extern WN* WN_prev_executable(WN* wn) extern WN* WN_next_executable(WN* wn)
Call WN_prev/next, skipping over non-executable wn's.
void LNO_Erase_Vertices_In_Loop(WN* wn,ARRAY_DIRECTED_GRAPH16* dg);
Deletes all vertices directly in the DO loop surrounding wn (wn itself if wn is a loop). Don't erase anything in a deeper loop.
BOOL Wn_Is_Inside(WN* inner, const WN* outer);
Returns TRUE if and only if 'outer' is an ancestor of 'inner' (or if they are the same.)
BOOL Do_Loop_Is_Unsigned(WN* wn_loop)
Returns TRUE if the do loop 'wn_loop' an unsigned index variable, FALSE otherwise.
BOOL Upper_Bound_Standardize(WN* ub, BOOL = FALSE)
Make the upper bound look like i <= bound. Assertion fails if cannot do this (except if ok_to_fail is set, then just return false).
INT64 LWN_Get_Linenum(const WN* wn)
Like WN_Get_Linenum (get the linenumber for the wn), but if WN_Get_Linenum returns zero (presumably because of missing info or because this wn is not a statement), then get the line number of the parent
BOOL Is_Permutation_Vector(const INT order, INT count)
Return TRUE if the order[] vector is a permutation of the vector (0 1 ... nloops-1), FALSE otherwise.
BOOL Are_Permutations(const INT* order1, const INT* order2, INT count)
Return TRUE if the order1[] vector contains no duplicates, likewise for order2[], and the elements they do contain are the same. FALSE otherwise.
BOOL Is_Loop_Invariant_Use(WN* wn, WN* outerloop)
Returns TRUE if use 'wn' is invariant in the 'outerloop'. FALSE if it is unknown or not loop invariant.
BOOL Is_Loop_Invariant_Exp(WN* wn, WN* outerloop)
Returns TRUE if all uses in the expression 'wn' are invariant in the 'outerloop'. FALSE if it at least one of them are either unknown or not loop invariant.
HASH_TABLE<WN*,WN*>* Make_Loop_Mapping(WN* orig, WN* copy, MEM_POOL*)
Create a hash table from the specified pool. The hash table maps a WN do loop to a do loop. orig a loop, and so is copy. The original and copy must be identical except possibly for some expression trees (e.g. if header, do step, etc). The loop structure must be identical. A hash table is returned with a map of the original loops to the corresponding in the copy. <orig,copy> is in the hash table
HASH_TABLE<WN*,BOOL>* Find_Loops_Within(WN* orig, MEM_POOL*)
Create a hash table from the specified pool. The hash table holds "TRUE" for every WN* that is a loop within orig, including orig itself, if orig is a loop (which it needn't be).
BOOL Equivalent_Access_Arrays(ACCESS_ARRAY *array1, ACCESS_ARRAY *array2, WN *wn1, WN *wn2)
Returns TRUE if these two access vectors equivalent, with neither having symbolic terms varying in the common loops of the two references.
INT Num_Common_Loops(WN *wn1, WN *wn2)
Returns the number of loops that the array references 'wn1' and 'wn2' share in common.
WN* LNO_Common_Loop(WN *wn1, WN *wn2)
Returns the innermost common loop. NULL if none.
Returns the do loop enclosing 'wn', NULL if there is no enclosing
Returns the loop enclosing 'wn', NULL if there is no enclosing
WN* Enclosing_Loop_Body(WN* wn)
Returns the loop whose body encloses 'wn', NULL if there is no loop body enclosing 'wn'.
BOOL Loop_Is_Trapezoidal(WN* wn_loop, ARRAY_DIRECTED_GRAPH16* dg, DU_MANAGER* du)
Returns TRUE if the loop is trapezoidal, FALSE otherwise.
class LS_IN_LOOP
LS_IN_LOOP(WN* loop, ARRAY_DIRECTED_GRAPH16*, MEM_POOL* pool, BOOL use_scalars = FALSE);
Create a list of the loads and stores in the 'loop', given the dependence graph, and using the memory 'pool'. If 'use_scalars' is TRUE, put scalar loads and stores in the list, otherwise only put arrays in the list.
INT In(WN* wn)
Return the value of the data field associated with the node in the loop list.
Depth
The Do_Depth() of the loop, i.e. the number of do loops surrounding this loop, including the loop itself.
Good_Depth
The Good_Do_Depth() of the loop, i.e. the Do_Depth() minus the number of bad do loops enclosing the loop.
Loop
The loop itself.
class LS_IN_LOOP_ITER
A class of to iterate through the members of the above class.
void Remove_Redundant_Stids(WN* wn_start, DU_MANAGER* du)
Removes all STIDs in the tree with root 'wn_start' which have no uses, as indicated by the DU_MANAGER '*du'.
OPCODE Matching_Load_Opcode(OPCODE store_op)
Returns the load opcode which corresponds to the store opcode 'store_op'.
WN* Create_ILoad_From_IStore(WN* wn_store, DU_MANAGER* du, ARRAY_DIRECTED_GRAPH16* dg)
Return an array load patterned after the array store 'wn_store'. If 'du' is non-null, copy the DU information from 'wn_store' to the newly created array node. If 'dg' is non-null, copy the dependence information from 'wn_store' to the newly_created array node.
BOOL Is_Local_Array_Reference(WN* array)
Input must be an OPR_ARRAY, else return FALSE. Otherwise, output is whether it definitely references a local array.
extern void FB_Sanity_Check(WN *wn)
Check if every WN rooted at wn has frequency count set.
extern BOOL Is_Mp_Region(WN *wn)
Is this an MP OPC_REGION node
extern RID * Get_Enclosing_Region_ID(WN *wn)
Returns the RID of the region enclosing the node 'wn'.
extern void Remark_Depth(WN *wn, ,mUINT8 depth)
Go through the code to set the depth field as this might have been changed due to dismantling or loop peeling. 'depth' is the number of enclosing do loops.
extern WN*& UBexp(WN* end, BOOL* ne = NULL) extern WN*& UBvar(WN* end)
Given a do loop, pass WN_end(doloop) as a parameter. The function then returns kid1 (kid0 for UBvar) when end's opr is LE/LT. If it's GE/GT, return kid0 (kid1). Otherwise error. If it's GT or LT, then ne is set to TRUE, if it's passed. Otherwise FALSE.
extern INT Loop_Depth(WN* stat)
Returns the depth of the loop in which 'stat' is nested. Returns -1 if 'stat' is not nested within any loop.
extern INT Block_Loop_Depth(WN* stat)
Similar to 'Loop_Depth', except that index expressions for DO loops are considered to belong to the next outermost enclosing DO loop rather than to the DO loop of which they are a part.
extern void Add_Pragma_To_MP_Region (const WN* wn, ST* st, WN_OFFSET offset, WN_PRAGMA_ID pragma_id, BOOL make_compiler_generated=FALSE)
extern void Add_Pragma_To_MP_Region (const WN* wn, ST* st_idx, WN_OFFSET offset, WN_PRAGMA_ID pragma_id, BOOL make_compiler_generated=FALSE)
Find an MP region containing "wn" (if any). If so, add a pragma node of the specified kind for the specified ST. Mark the pragma as compiler-generated, if so requested.
extern void MP_Sanity_Check_Func(WN *func_nd)
extern void Update_MP_Local_Var(ST* st, WN_OFFSET offset, WN *wn)
Given that we're creating a new local variable, put in on the local list of the innermost MP regions surrounding wn
extern WN* Outer_Tile(WN* wn_loop, DU_MANAGER* du)
Returns the outer tile loop corresponding to the inner tile loop 'wn_loop'. Returns NULL if this is not an inner tile loop or if we can't determine what the outer tile loop is.
In this function, we define "outer tile" and "inner tile" loops as a pair of loops of the form: do ii = LBii, UBii, Sii do i = f1(ii), f2(ii), Si
extern WN* Return_Node(WN* wn_func_nd)
Returns one of the function "wn_func_nd"'s return nodes.
extern WN* Common_Loop_Ancestor(WN* wn1, WN* wn2)
Returns the loop with the greatest depth which is a common ancestor of both 'wn1' and 'wn2'. Returns NULL if there is no loop which is a common ancestor of both.
extern void Build_Parent_Stack(WN* wn, STACK<WN*>* stack)
Push all of the ancestors of 'wn' (including 'wn' itself) onto the 'stack'.
extern WN* Common_Ancestor(WN* wn1, WN* wn2)
Returns the node furthest away from the FUNC_ENTRY node which is a common ancestor of both 'wn1' and 'wn2'. Returns NULL if there is no loop which is a common ancestor of both.
extern BOOL Is_Lex_Before(WN* wn1, WN* wn2)
Returns TRUE if 'wn1' is lexically before 'wn2', FALSE otherwise.
extern INT Symbol_Count(WN* wn, const SYMBOL& sym)
Returns the number of LDIDs which are encountered with symbol 'sym' in the tree rooted at 'wn'.
extern WN* Find_Node(SYMBOL sym, WN* wn_tree)
Find the first node the the tree rooted at 'wn_tree' with symbol 'sym' and return it.
extern BOOL Identity_Permutation(INT permutation[], INT nloops)
Returns TRUE if the 'permutation' of length 'nloops' is the identity permutation, FALSE otherwise.
extern WN* Trip_Count(WN* wn_loop)
Returns the trip count of the loop 'wn_loop'.
extern INT Reduce_Permutation(INT permutation[], INT nloops, INT spermutation[], INT max_reduction)
Let M be the largest integer for which the first M components of the 'permutation' of length 'nloops' is the identity permutation. Let N = MIN(M, 'reduction_max'). Return nloops - N and set 'spermu- tation' to the reduced permutation consisting of the last 'nloops'
BOOL Index_Variable(WN* wn_index)
Return TRUE if 'wn_index' is an STID or LDID of an index variable for some loop enclosing it. Returns FALSE otherwise.
BOOL Contains_Dedicated_Preg(WN* wn_tree)
Returns TRUE when 'wn_tree' contains a reference to a dedicated preg, FALSE otherwise.
INT Factorial(INT n)
Returns the factorial of 'n'. The value 'n' must be a non- negative integer.
void Permutation(INT order, INT nloops, INT permutation[])
Sets 'permutation' to the 'order'th permutation of length 'nloops'.
INT WN_Whirl_Linenum(WN* wn_ref)
Returns the best guess at a line number for 'wn_ref'. This is the line number of the node itself, if it has one, or that of the closest enclosing parent node that has one, or 0, if no enclosing parent node has one.
void Constant_Propogate(WN *stid, INT64 const_val)
Use the DU chains to constant propogate the statement stid = const_val
WN* Messy_Subscript(WN* wn_array)
If 'wn_array' has an OPR_ARRAY ancestor with a Too_Messy sub- script, return the WN* of that ancestor. Otherwise, return NULL.
void Replace_Index_Variable(WN* loop, WN* cp_loop, const char prefix[])
Create a new index variable for the loop 'cp_loop' so that its index variable is not the same as that of 'loop'. Give the new index variable a name that starts with 'prefix[]'.
WN* Enclosing_Proper_Do_Loop(WN* wn_ref)
Returns the closest loop for which 'wn_ref' is in its WN_do_body(), if there is such a loop, returns NULL otherwise.
Definition at line 667 of file lnoutils.h.
| enum DIFFERENCE_KIND |
Definition at line 786 of file lnoutils.h.
| void Add_Pragma_To_MP_Region | ( | const WN * | wn, | |
| ST * | st, | |||
| WN_OFFSET | offset, | |||
| WN_PRAGMA_ID | pragma_id, | |||
| BOOL | make_compiler_generated = FALSE | |||
| ) |
Definition at line 4120 of file lnoutils.cxx.
References Add_Pragma_To_MP_Regions(), BOOL, CLASS_PREG, Is_Mp_Region(), Is_True, LWN_Get_Parent, LWN_Insert_Block_Before(), Malloc_Mem_Pool, NULL, OPC_REGION, OPR_PRAGMA, OPR_XPRAGMA, Parent_Map, Preg_Name(), REGION_get_rid(), RID_TYPE_mp, ST_class, ST_name, tmp, WN_CreatePragma, WN_first(), WN_Get_Linenum(), WN_next(), WN_opcode(), WN_operator(), WN_pragma(), WN_pragma_arg1(), WN_PRAGMA_FIRSTPRIVATE, WN_PRAGMA_LASTLOCAL, WN_PRAGMA_LASTTHREAD, WN_PRAGMA_LOCAL, WN_PRAGMA_SHARED, WN_pragmas, WN_region_pragmas, WN_Set_Linenum(), WN_set_pragma_compiler_generated, and WN_st().
Referenced by Freeze_Cur_Numthreads_Func(), Gen_Init_DART(), Generate_Blkcyc_Bounds(), Generate_Block_Bounds(), Generate_Block_Bounds_Negative(), ARA_LOOP_INFO::Generate_Copyout_Loop(), Generate_Cyclic_Bounds(), Generate_Dynamic_Bounds(), Generate_Interleaved_Bounds(), Generate_Runtime_Cyclic_Bounds(), Generate_Simple_Bounds(), Hoist_Expression(), Mp_Coordinate_Copy_Out_Coordinates(), Mp_Localize_Onto_and_Layout(), and Mp_Nested_Last_Thread().
Definition at line 954 of file lnoutils.cxx.
References Add_To_Symbol(), BOOL, FALSE, FmtAssert, INT, Is_True, LWN_CreateExp2(), LWN_Get_Parent, LWN_Make_Icon(), LWN_Parentize(), LWN_Set_Parent, MTYPE_V, SYMBOL::Name(), OPCODE_is_stmt(), OPCODE_make_op(), OPR_ADD, OPR_BLOCK, OPR_LDID, OPR_STID, TRUE, WN_first(), WN_kid(), WN_kid_count(), WN_next(), WN_opcode(), WN_operator(), WN_rtype(), and WN_Simplify_Tree().
Referenced by Add_To_Symbol(), Post_loop_peeling(), SNL_Regtile_Loop(), Twod_Setbound(), and Unroll_Loop_By_Trip_Count().
Definition at line 1016 of file lnoutils.cxx.
References Add_To_Symbol(), FALSE, INT, printf(), sym, and TRUE.
Definition at line 4101 of file lnoutils.cxx.
References BOOL, Do_Loop_Depth(), FALSE, LWN_Get_Parent, NULL, OPC_BLOCK, OPC_DO_LOOP, TRUE, and WN_opcode().
Referenced by Get_Expansion_Space(), Remove_Unity_Trip_Loop_Dep_Update(), and Scalar_Expand().
| void Build_Doloop_Stack | ( | WN * | wn, | |
| DOLOOP_STACK * | stack | |||
| ) |
Definition at line 776 of file lnoutils.cxx.
References Build_Doloop_Stack_Rec(), LWN_Get_Parent, OPC_DO_LOOP, STACK< T >::Push(), and WN_opcode().
Referenced by Add_Condition(), Analyse_Dependencies(), ARA_LOOP_INFO::ARA_LOOP_INFO(), BS_Replace_Load(), BS_Replace_Store(), BS_Substitute(), Build_Statement_Dependence_Graph(), Check_Doacross_Sync_Coverage(), Common_Loop_Ancestor(), Constant_Propogate(), Convert_Do_Loops_Conditionals(), Convex_Peeling_Depth(), Create_Initialize_Loop(), Create_Shackle_If_Per_Stmt(), PAR_STAT::Distribute(), PAR_STAT::Distribute_By_Splitting(), PAR_STAT::Distribute_For_Permutation(), Do_Automatic_Transformation(), Doacross_Cost(), Extended_Lower_Bound(), Extended_Upper_Bound(), Fiss_Gather_Inner_Loop(), Fission_DU_Update(), Fission_Inner_Loop(), Fix_Access_Arrays_In_Copy_Block(), Fix_Blockable_Dependences(), Fix_Deps_For_Load(), Fix_Deps_For_Load_Or_Store(), Forward_Substitute_Ldids(), Freeze_Numthreads_Ldid(), Fully_Permutable_Permutation(), Fuse(), Fuse_Outer_Loops(), Fusion_Du_Update(), Fusion_Loop_Stmt_Update(), Gather_Scatter_Scalar_Expand(), Gen_CheckNo_DART(), ARA_LOOP_INFO::Generate_Copyout_Loop(), Generate_If_Accesses(), ARA_LOOP_INFO::Generate_Parallel_Pragma(), Guard_A_Do(), HAB_Copy_Array_Deps(), Handle_Sink_Promotion_Case(), HMB_Compound_Guard_Test(), HMB_Copy_Array_Deps(), HMB_Hoist_Expressions(), HMB_Hoist_Messy_Bounds(), HMB_Hoist_Messy_Subscripts(), HMB_Maximum_Point(), HMB_Replace_Messy_Bounds_Loop(), HMB_Simple_Guard_Test(), Hoist_Bounds_One_Level(), Hoist_Iload_Ldid_Upper_Bound_One_Level(), Hoist_Outer_Invar(), Hoist_Varying_Lower_Bounds_Traverse(), Initialize_Pdo_Last_Local_Index(), PAR_STAT::Innermost_Sandwiched_Code(), Inv_Dep_Info(), Invariant_Loop_Count(), Invariant_Loops(), Invariant_Permutation(), IPA_LNO_Evaluate_Array_Formals(), IPA_LNO_Read_Projected_Region(), Is_Rectangular_Nested_Doacross(), Lego_Skew_Loop(), LNO_FB_Inv_Interchange(), Loop_Invariant_Access(), Loop_Stmt_Update(), ARRAY_LOWER_REF::Lower_Array_Expr(), SX_INFO::Make_Sx_Info(), Mark_Code(), Max_Dep_Distance(), Maybe_Handle_Sink_Promotion_Case(), MIR_Replace(), MIR_Update_Dependences(), Mp_Collapse_Cleanup(), Mp_Collapse_Loop_Heads(), Mp_Collapse_Loop_Statements(), Mp_Coordinate_Copy_Out_Coordinates(), Mp_Fix_Deps(), Mp_Layout_Copy_Out_Layout(), Mp_Layout_Lego_Layout(), Mp_Version_Loop(), Mp_Version_Parallel_Region(), Parallel_Directive_Class(), PAR_STAT::Parallel_Interchange(), Parallelizable_At_Depth(), Parallelize_Doacross_Loop(), Perform_Gather_Scatter(), PAR_STAT::Permute_Loops(), Post_loop_peeling(), Pre_loop_peeling(), Processor_2D_Tile_Loop(), Processor_3D_Tile_Loop(), Processor_Update_Outer_Tile(), Prompf_Interchange(), Prompf_Interchanges(), Prompf_Nested_Tile(), Read_Pragma_Thread_Affinity(), Rebuild_Access_Arrays(), Recompute_Deps(), Red_Dep_Info(), Redundant_Condition(), Remove_Unity_Trip_Loop(), Repair_Bad_Dependences(), Rewrite_Bounds(), RV_Reverse_Loop(), Scalar_Dependence_Prevent_Fusion(), Scalar_Expand(), Scalar_Variable_Renaming(), Scan_Parameters(), SE_CT_New_Tile_Infos(), SE_Fix_Dependence(), SE_Guard_Tests(), Shackle_Postprocess_Do_Loop_Bounds(), Simd_Analysis(), Simd_Finalize_Loops(), Sink_Out_Sandwiched_Statement(), SNL_Auto_Parallelization(), SNL_Bad_Scalars_Are_Distributable(), SNL_Dir_Cannot_Interchange(), SNL_Distribute(), SNL_Distribute_By_Splitting(), SNL_Distribute_For_Permutation(), SNL_Finalize_Index_Variables(), SNL_GEN_2D_Regtile(), SNL_GEN_Distribute(), SNL_GEN_Permute_Loops(), SNL_GEN_Protect_Nest_With_Conditionals(), SNL_GEN_Scalar_Expand(), SNL_GEN_U_Ctiling(), SNL_Inner_Cache_Cost(), SNL_Inner_Machine_Cost(), SNL_INV_Distribute(), SNL_INV_Distribution(), SNL_INV_Limited_SE_And_Dist(), SNL_INV_Permute_Loops(), SNL_INV_Scalar_Expand(), SNL_INV_Scalar_Expand_Tile(), SNL_INV_SE_Distribute(), SNL_INV_Transforms(), SNL_Is_Distributable(), SNL_Is_Scalar_Expandable(), SNL_Legal_Permutation(), SNL_Lift_Lego_Tile_Loops_Once(), SNL_Lift_Lego_Tile_Loops_Shifts(), SNL_Min_Parallel_Overhead_Cost(), SNL_NEST_INFO::SNL_NEST_INFO(), SNL_Parallelization_Costs(), SNL_Peel_Iteration(), SNL_Permutation_Is_Distributable(), SNL_Permutation_Needs_Distribution(), SNL_Permute_Loops(), SNL_Rebuild_Access_Arrays(), SNL_Scalar_Expand(), SNL_Scalar_Expand_For_Splitting(), SNL_Transform(), SNL_Upper_Bound_Standardize(), Split_Depth(), PF_LOOPNODE::Split_Loops(), Splittable(), Statement_Sinkable_Out_Of_Loop(), Tile_Loop(), Transform_Code(), LOOP_MODEL::Try_Inner(), Unify_Loop(), SX_INFO::Update_Reduction_Loop_Stmts(), UT_Generate_Imperfect_If_Code(), Version_Loop(), Version_Region(), Vintrinsic_Fission(), Walk_Projected_Region(), and Wind_Down().
Definition at line 4507 of file lnoutils.cxx.
References Build_Parent_Stack(), LWN_Get_Parent, and STACK< T >::Push().
Referenced by Build_Parent_Stack(), and Common_Ancestor().
Definition at line 4522 of file lnoutils.cxx.
References STACK< T >::Bottom_nth(), Build_Parent_Stack(), STACK< T >::Elements(), i, INT, LNO_local_pool, and NULL.
Referenced by Hoist_Place(), Is_Lex_Before(), New_Lowest_Statement(), Scalar_Store_Hoist_Place(), SE_New_Outer_Loop(), and Wn_Is_Above().
Definition at line 4478 of file lnoutils.cxx.
References STACK< T >::Bottom_nth(), Build_Doloop_Stack(), Do_Depth(), STACK< T >::Elements(), FmtAssert, i, INT, LNO_local_pool, and NULL.
Definition at line 4821 of file lnoutils.cxx.
References STACK< T >::Bottom_nth(), Build_Doloop_Stack(), Constant_Propogate(), CXX_NEW, defs, DU_MANAGER::Du_Get_Use(), Du_Mgr, STACK< T >::Elements(), DO_LOOP_INFO::Est_Num_Iterations, FALSE, SLIST_ITER::First(), USE_LIST_ITER::First(), Get_Do_Loop_Info(), i, DEF_LIST::Incomplete(), USE_LIST::Incomplete(), INT, INT64, SLIST_ITER::Is_Empty(), iter, Iterations(), LNO_Build_Access(), LNO_default_pool, LNO_local_pool, loop_stack, LWN_Delete_Tree(), LWN_Get_Parent, LWN_Make_Icon(), LWN_Set_Parent, MEM_POOL_Pop, MEM_POOL_Push, SLIST_ITER::Next(), USE_LIST_ITER::Next(), node, DO_LOOP_INFO::Num_Iterations_Profile, DO_LOOP_INFO::Num_Iterations_Symbolic, OPC_BLOCK, OPC_DO_LOOP, OPCODE_is_expression(), OPR_INTCONST, OPR_LDID, OPR_STID, STACK< T >::Push(), tmp, TYPE_ID, DU_MANAGER::Ud_Get_Def(), DU_NODE::Wn(), WN_const_val(), WN_kid(), WN_kid0(), WN_offset(), WN_opcode(), WN_operator(), WN_rtype(), WN_Simplify_Tree(), and WN_st().
Referenced by Constant_Propogate(), and Remove_Unity_Trip_Loop().
Definition at line 4736 of file lnoutils.cxx.
References CLASS_PREG, Contains_Dedicated_Preg(), FALSE, i, INT, Last_Dedicated_Preg_Offset, NULL, OPC_BLOCK, OPCODE_has_sym(), ST_class, TRUE, WN_first(), WN_kid(), WN_kid_count(), WN_next(), WN_offset(), WN_opcode(), and WN_st().
Referenced by Contains_Dedicated_Preg(), Forward_Substitutable(), FS_Array_Worthwhile(), and FS_Worthwhile().
| WN* Create_ILoad_From_IStore | ( | WN * | wn_store, | |
| DU_MANAGER * | du, | |||
| ARRAY_DIRECTED_GRAPH16 * | dg | |||
| ) |
Definition at line 3861 of file lnoutils.cxx.
References Alias_Mgr, Duplicate_alias_info(), LWN_Copy_Tree(), LWN_CreateIload(), Matching_Load_Opcode(), NULL, TY_pointed, WN_kid1(), WN_offset(), WN_opcode(), and WN_ty().
Referenced by BS_Substitute().
Definition at line 1298 of file lnoutils.cxx.
References Create_Preg(), MTYPE_To_PREG, and NULL.
Referenced by LEGO_INFO::Create_Local_Index(), Create_Loop_Symbol(), Create_Unroll_Copy(), EC_Array_Portion_Calls(), Fuse(), Gather_Scatter_Scalar_Expand(), Generate_Blkcyc_Bounds(), Generate_Block_Bounds(), Generate_Block_Bounds_Negative(), Generate_Cyclic_Bounds(), Generate_Dynamic_Bounds(), Generate_Interleaved_Bounds(), Generate_Runtime_Cyclic_Bounds(), Generate_Simple_Bounds(), Get_Expansion_Space(), Initialize_Pdo_Last_Local_Index(), MIR_Replace(), Mp_Collapse_Cleanup(), Mp_Layout_Load_Pids(), Numprocs(), Perform_Gather_Scatter(), Processor_2D_Tile_Loop(), Processor_3D_Tile_Loop(), Read_Pragma_Thread_Affinity(), Replace_Index_Variable(), Rewrite_Bounds(), RR_Map_Setup_Traverse(), Scalar_Expansion_Tile(), scalar_rename(), Simd_Vectorize_Induction_Variables(), Simd_Vectorize_Load_And_Equilvalent(), SNL_GEN_2D_Regtile(), SNL_INV_Cache_Block(), SNL_Regtile_Loop(), SNL_TRANS_INDEX_DATA::SNL_TRANS_INDEX_DATA(), Thread_Affinity_Lower(), WBTR_Loop_Tiling(), and Wind_Down().
Definition at line 228 of file lnoutils.cxx.
References Add_Barrier_Vertex(), PROMPF_LINES::Add_Lines(), BOOL, CXX_NEW, FALSE, FmtAssert, Get_Enclosing_Region_ID(), INT, PROMPF_INFO::Is_Enabled(), LNO_default_pool, LNO_Info_Map, LWN_Extract_From_Block(), LWN_Get_Parent, LWN_Insert_Block_After(), LWN_Insert_Block_Before(), LWN_Parentize(), New_Construct_Id(), NULL, OPC_PRAGMA, OPC_REGION, pl, Prompf_Id_Map, Prompf_Info, PROMPF_pool, REGION_KIND_MP, RID_Add_kid(), RID_Create(), RID_CREATE_NEW_ID, RID_depth, RID_level, RID_map, RID_TYPE_mp_Set, RL_LNO, PROMPF_INFO::Single_Process(), TRUE, wn, WN_CreateBarrier, WN_CreateBlock, WN_CreatePragma, WN_CreateRegion, WN_first(), WN_MAP32_Set, WN_MAP_Set, WN_next(), WN_opcode(), WN_pragma(), WN_pragma_omp, WN_PRAGMA_PARALLEL_BEGIN, WN_PRAGMA_SINGLE_PROCESS_BEGIN, WN_region_id(), WN_region_pragmas, WN_set_pragma_compiler_generated, and WN_set_pragma_omp.
Referenced by ARA_LOOP_INFO::Generate_Copyout_Loop(), and Lego_Fix_Local_Rec().
Definition at line 1308 of file lnoutils.cxx.
References Be_Type_Tbl, CLASS_VAR, CURRENT_SYMTAB, EXPORT_LOCAL, New_ST(), Save_Str(), SCLASS_AUTO, Set_ST_is_temp_var, and ST_Init().
Referenced by Generate_Dynamic_Bounds(), Generate_Runtime_Cyclic_Bounds(), Generate_Simple_Bounds(), and Mp_Nested_Last_Thread().
| ACCESS_VECTOR* Difference_Inequality | ( | ACCESS_VECTOR * | lb, | |
| ACCESS_VECTOR * | ub, | |||
| INT | var, | |||
| DIFFERENCE_KIND | code, | |||
| MEM_POOL * | pool | |||
| ) |
Definition at line 1440 of file lnoutils.cxx.
References Add(), ACCESS_VECTOR::Const_Offset, CXX_DELETE, CXX_NEW, DIFFERENCE_EXEC_ALWAYS, DIFFERENCE_EXEC_NEVER, DIFFERENCE_EXEC_NEVER_OR_ONCE, INT, Is_True, lcm(), Lcm(), ACCESS_VECTOR::Loop_Coeff(), Mul, ACCESS_VECTOR::Negate_Me(), and x.
Referenced by Always_Executes(), COND_Do_Info(), and SNL_NEST_INFO::SNL_NEST_INFO().
Definition at line 723 of file lnoutils.cxx.
References Do_Depth(), FmtAssert, INT, LWN_Get_Parent, NULL, OPC_DO_LOOP, and WN_opcode().
Referenced by Always_Executes(), BS_Has_Varying_Access_Array_In_Region(), ARRAY_REF::Build_Array(), Common_Loop_Ancestor(), Dismantle_Do_Walk(), Do_Depth(), Est_Num_Iters_Suspect(), Generate_Sink_Out_Code(), Hoistable_Statement(), Invariant_Loops(), Is_Bad_Array(), Lego_Index_From_Access_Vector(), Lego_Loop_Want_Skew(), Lego_Simplify(), Lego_Skew_Canonical(), Lego_Skew_Equivalent(), LWN_Process_FF_Pragmas_Walk_r(), MIR_Ok_Hoist_Wn_Dependence(), MIR_Partition_Lists(), MIR_Update_Dependences(), Mp_Collapse_Dependences(), Mp_Fix_Deps(), Mp_Layout_Call(), Mp_Layout_Copy_In_Onto(), Mp_Layout_Copy_Out_Layout(), Mp_Layout_Lego_Layout(), Mp_Version_Parallel_Region(), Num_Common_Loops(), Outer_Tile(), Peelable(), Processor_Update_Outer_Tile(), Recompute_Deps_For_Tree(), Scalar_Expand(), SE_Find_Stid(), Set_Invariant_Symbols(), SNL_Finalizable_Loops(), SNL_Regtile_Loop(), SNL_SPL_Split_Tile_Sets(), SNL_Transform(), and Wind_Down().
Definition at line 3967 of file lnoutils.cxx.
References FALSE, Get_Current_PU, Get_Do_Loop_Info(), Is_Mp_Region(), LWN_Get_Parent, DO_LOOP_INFO::Mp_Info, NULL, OPC_PRAGMA, PU_cxx_lang(), TRUE, WN_first(), WN_opcode(), WN_pragma(), WN_PRAGMA_DOACROSS, WN_PRAGMA_PARALLEL_DO, WN_PRAGMA_PDO_BEGIN, and WN_region_pragmas.
Referenced by FIZ_FUSE_INFO::Build(), Check_Suggested_Parallel(), Delete_MP_Region(), Eliminate_Dead_Do(), Eliminate_Dead_SCF_rec(), Find_MP(), Fission(), Fiz_Fuse(), Fiz_Fuse_Phase(), Fully_Unroll_Short_Loops(), DISTRIBUTION::Gather_Arrays(), Gather_Scatter_Walk(), Guard_Dos_Rec(), Highest_Condition_Point(), Hoist_Conditionals(), Hoist_Expression(), HoistIf_Walk(), If_While_Region_Fiz_Fuse(), Index_Variable_Is_Last_Local(), Innermore_Parallel_Loop(), Innermore_Parallel_Or_Lego_Loop(), Inter_Iteration_Cses_R(), Is_Aggressive_Vintr_Loop(), Is_Vectorizable_Loop(), Is_Well_Formed_Simd(), Mark_Auto_Vectorizable_Loops(), Mark_Dos(), MIR_Hoistable_Ref(), Mp_Disable_Opts_On_Internal_Regions(), MP_Problem(), Outermore_Parallel_Construct(), Outermore_Parallel_Construct_Or_Lego_Loop(), Print_Prompf_Msgs(), Print_Prompl_Msgs(), DISTRIBUTION::Process_Memory(), Prompf_Nest_Depth(), Rename_Update_MP(), SA_Version_F90_Loops_For_Contiguous(), Simd_Finalize_Loops(), Simd_Pre_Analysis(), Simd_Vectorize_Scalar_Reduction(), STD_Canonicalize_Upper_Bound(), Vintrinsic_Fission(), and Vintrinsic_Fission_Walk().
Definition at line 2210 of file lnoutils.cxx.
References FmtAssert, MTYPE_is_unsigned, OPC_DO_LOOP, TYPE_ID, WN_desc(), WN_end, and WN_opcode().
Referenced by Find_Do_Loop_With_Min(), Fiss_Gather_Inner_Loop(), STD_Traverse(), and Upper_Bound_Standardize().
Definition at line 99 of file lnoutils.cxx.
References Is_True, OPC_DO_LOOP, OPR_STID, TYPE_ID, WN_desc(), WN_opcode(), WN_operator(), and WN_start.
Referenced by SNL_BOUNDS_INFO::Canonicize(), ARA_LOOP_INFO::Create_New_IF_Clause(), ARA_LOOP_INFO::Create_Old_IF_Clause(), Finalize_Index_Variable(), Finalize_Index_Variable_For_Remove_Unity_Trip_Loop(), Find_Highest_Type_Of_Loop(), Freeze_Numthreads_Ldid(), Gather_Scatter_Scalar_Expand(), Generate_Blkcyc_Bounds(), Generate_Block_Bounds(), Generate_Block_Bounds_Negative(), Generate_Cyclic_Bounds(), Generate_Dynamic_Bounds(), Generate_Guard_Test(), Generate_Interleaved_Bounds(), Generate_Runtime_Cyclic_Bounds(), Generate_Simple_Bounds(), Initialize_Pdo_Last_Local_Index(), Interleaved_Pragma_Chunksize(), Lego_Skew_Index(), Lego_Skew_Loop(), Mp_Collapse_Loop_Heads(), Mp_Layout_Load_Pids(), Mp_Version_Loop(), Mp_Version_Parallel_Region(), Perform_Gather_Scatter(), Processor_2D_Tile_Loop(), Processor_3D_Tile_Loop(), Processor_Update_Outer_Tile(), Rewrite_Bounds(), RV_Reverse_Index_Ldid(), Scalar_Expansion_Tile(), SE_Findxs(), SE_Indxs_and_Bounds(), SNL_GEN_2D_Regtile(), SNL_INV_Cache_Block(), SNL_Is_Transformable(), SNL_Regtile_Loop(), SNL_TRANS_INDEX_DATA::SNL_TRANS_INDEX_DATA(), Step_Size(), Trip_Count(), Twod_Setbound(), Unroll_Loop_By_Trip_Count(), and WBTR_Loop_Tiling().
Definition at line 314 of file lnoutils.cxx.
References i, INT, INT32, and s.
Referenced by SNL_GEN_U_Ctiling().
Definition at line 3248 of file lnoutils.cxx.
References Du_Sanity_Check_Matching_Du(), Du_Sanity_Check_r(), fprintf(), IV_Loop_Stmt_Check(), LNO_local_pool, LNO_Verbose, MEM_POOL_Pop, and MEM_POOL_Push.
Referenced by Lego_Lower_Pragmas(), Lego_Read_Pragmas(), Lnoptimizer(), and WB_check().
| void Dump_WN | ( | WN * | , | |
| FILE * | , | |||
| INT | , | |||
| INT | = 2, |
|||
| INT | = 2, |
|||
| ARRAY_DIRECTED_GRAPH16 * | = NULL, |
|||
| WN ** | = NULL, |
|||
| WN * | = NULL, |
|||
| BOOL | recursive = TRUE | |||
| ) |
Definition at line 497 of file lnoutils.cxx.
References DevWarn, Dump_WN(), fflush(), fprintf(), Get_Do_Loop_Info(), i, INT, INT32, LWN_Get_Parent, OPC_BLOCK, OPC_COMPGOTO, OPC_DO_LOOP, OPC_DO_WHILE, OPC_FUNC_ENTRY, OPC_IF, OPC_REGION, OPC_WHILE_DO, OPCODE_has_next_prev(), OPERATOR_name(), DO_LOOP_INFO::Print(), printws(), TRUE, WN_do_body, wn_dumpexpr(), WN_else, WN_end, WN_first(), WN_Get_Linenum(), WN_if_test, WN_index, WN_kid(), WN_kid_count(), WN_next(), WN_opcode(), WN_operator(), WN_region_body, WN_start, WN_step, WN_then, WN_while_body, and WN_while_test.
Referenced by ARA_Initialize_Loops(), Do_Automatic_Transformation(), Du_Sanity_Check_Matching_Du(), Du_Sanity_Check_r(), Dump_WN(), Eliminate_Dead_Do(), Eliminate_Dead_If(), Fiss_Gather_Inner_Loop(), Fission_Inner_Loop(), Fuse(), Lnoptimizer(), Loop_Stmt_Update(), Max_Dep_Distance(), Perform_Gather_Scatter(), ARRAY_DIRECTED_GRAPH16::Print(), SNL_TRANS_INDEX_DATA::Print(), TRANSPOSE_DIRECTED_GRAPH16::Print(), Print_Def_Use(), Simd_Analysis(), SNL_GEN_U_Ctiling(), SNL_Transform(), and Vintrinsic_Fission().
Definition at line 3660 of file lnoutils.cxx.
References LWN_Get_Parent, NULL, OPR_DO_LOOP, and WN_operator().
Referenced by _xanalyze_stmt_for_conds(), Add_Barrier_Vertex(), Code_Expansion_Limit_Loop(), Convex_Peeling_Depth(), Enclosing_Do_Loop_Of_Chain(), Enclosing_Ith_Do_Loop(), Fiz_Fuse(), FS_Array_Worthwhile(), PF_LG::Gen_Pref_Node(), Highest_Guard_Point(), IPA_LNO_Read_Projected_Region(), LWN_Process_FF_Pragmas_Walk_r(), MIR_Test_Hoist(), Parallelization_Process_Deps(), Parallelize_Doacross_Loop(), Post_loop_peeling(), Recompute_Deps_For_Tree(), REGION::REGION(), Scalar_Expandable(), Scan_Parameters(), SE_Assign_Lexcounts(), SE_Final_Value(), SE_Findxs(), Simd(), Simd_Vectorize_Induction_Variables(), and Walk_Projected_Region().
Definition at line 3676 of file lnoutils.cxx.
References LWN_Get_Parent, NULL, OPR_DO_LOOP, OPR_DO_WHILE, OPR_WHILE_DO, and WN_operator().
Referenced by AS_Traverse(), BS_Has_Varying_Access_Array_In_Region(), BS_Loop_Within_Equivalence_Class(), Exp_Depends_On_Outer_Loop(), Exp_Node_Varies_In_Loop(), Fix_Accesses_And_Deps(), FS_Array_Single_Def_Use(), FS_Array_Substitute(), FS_Substitute(), FS_Worthwhile(), Sinkable_Into_Loop(), SNL_GEN_2D_Regtile(), SNL_Legal_Perm_Array(), SX_INFO::Update_Reduction_Loop_Stmts(), and Walk_Loop_Dependence().
Definition at line 3694 of file lnoutils.cxx.
References BOOL, FALSE, LWN_Get_Parent, NULL, OPR_BLOCK, OPR_DO_LOOP, OPR_DO_WHILE, OPR_WHILE_DO, TRUE, and WN_operator().
Referenced by SNL_Legal_Perm_Array().
Definition at line 3719 of file lnoutils.cxx.
References BOOL, FALSE, LWN_Get_Parent, NULL, OPC_BLOCK, OPC_DO_LOOP, TRUE, and WN_opcode().
Referenced by Fix_Exp_Deps(), Forward_Substitutable(), MIR_Patch_Loop_Stmt(), and Patch_Loop_Statement_Expression().
| BOOL Equivalent_Access_Arrays | ( | ACCESS_ARRAY * | array1, | |
| ACCESS_ARRAY * | array2, | |||
| WN * | wn1, | |||
| WN * | wn2 | |||
| ) |
Definition at line 3632 of file lnoutils.cxx.
References FALSE, FmtAssert, INT, ACCESS_ARRAY::Non_Const_Loops(), NULL, Num_Common_Loops(), and TRUE.
Referenced by BS_Matching_Load(), and Process_Store().
Definition at line 4761 of file lnoutils.cxx.
References FmtAssert, i, and INT.
Referenced by Choose(), and Is_Legal_Permutation_Class().
Definition at line 3271 of file lnoutils.cxx.
References cur, Cur_PU_Feedback, DevWarn, INT32, LNO_Test_Dump, LWN_ITER, LWN_WALK_TreeIter, LWN_WALK_TreeNext, OPERATOR_name(), WN_MAP32_Get, WN_MAP_FEEDBACK, and WN_operator().
Definition at line 2375 of file lnoutils.cxx.
References DU_MANAGER::Add_Def_Use(), Array_Dependence_Graph, DU_MANAGER::Create_Use_List(), DU_MANAGER::Delete_Def_Use(), div(), Do_Loop_Has_Calls(), Do_Wtype(), DU_MANAGER::Du_Get_Use(), Du_Mgr, FALSE, USE_LIST_ITER::First(), FmtAssert, USE_LIST::Incomplete(), index(), SLIST_ITER::Is_Empty(), iter, LNO_Erase_Dg_From_Here_In(), LNO_Info_Map, LWN_Copy_Tree(), LWN_CreateExp1(), LWN_CreateExp2(), LWN_CreateStid(), LWN_Get_Parent, LWN_Insert_Block_After(), LWN_Insert_Block_Before(), max, MTYPE_F4, MTYPE_F8, MTYPE_I4, MTYPE_I8, MTYPE_is_float, MTYPE_V, USE_LIST_ITER::Next(), NULL, OPC_DO_LOOP, OPC_FUNC_ENTRY, OPCODE_make_op(), OPCODE_rtype(), OPR_ADD, OPR_CVT, OPR_DIV, OPR_IF, OPR_INTCONST, OPR_LDID, OPR_LE, OPR_MAX, OPR_MPY, OPR_STID, OPR_SUB, OPR_TRUNC, Patch_Uses_In_Loop(), Promote_Type(), USE_LIST::Reset_Incomplete(), scalar_rename(), USE_LIST::Set_Incomplete(), Sink_Out_Sandwiched_Statement(), Statement_Sinkable_Out_Of_Loop(), sub, TRUE, TYPE_ID, Update_Nest_Depth(), Upper_Bound_Standardize(), wn, WN_const_val(), WN_end, WN_kid0(), WN_kid1(), WN_opcode(), WN_operator(), WN_start, and WN_step.
Referenced by Eliminate_Dead_Do(), Fix_Array_Deps_On_Index_Variable(), Fuse(), HoistIf(), Lego_Skew_Loop(), Post_loop_peeling(), Pre_loop_peeling(), Simd_Pre_Analysis(), SNL_Finalize_Index_Variables(), SNL_Is_Transformable(), and Vintrinsic_Fission().
| void Finalize_Index_Variable_For_Remove_Unity_Trip_Loop | ( | WN * | wn, | |
| BOOL | insert_after_loop = TRUE, |
|||
| BOOL | try_sink = FALSE | |||
| ) |
Definition at line 2541 of file lnoutils.cxx.
References DU_MANAGER::Add_Def_Use(), Array_Dependence_Graph, DU_MANAGER::Create_Use_List(), DU_MANAGER::Delete_Def_Use(), Do_Loop_Has_Calls(), Do_Wtype(), DU_MANAGER::Du_Get_Use(), Du_Mgr, FALSE, USE_LIST_ITER::First(), USE_LIST::Incomplete(), index(), SLIST_ITER::Is_Empty(), iter, LNO_Erase_Dg_From_Here_In(), LNO_Info_Map, LWN_Copy_Tree(), LWN_CreateExp2(), LWN_CreateStid(), LWN_Get_Parent, LWN_Insert_Block_After(), LWN_Insert_Block_Before(), MTYPE_V, USE_LIST_ITER::Next(), NULL, OPC_DO_LOOP, OPC_FUNC_ENTRY, OPCODE_make_op(), OPR_ADD, OPR_LDID, OPR_STID, Patch_Uses_In_Loop(), Promote_Type(), USE_LIST::Reset_Incomplete(), scalar_rename(), USE_LIST::Set_Incomplete(), Sink_Out_Sandwiched_Statement(), Statement_Sinkable_Out_Of_Loop(), TRUE, TYPE_ID, wn, WN_kid0(), WN_kid1(), WN_opcode(), WN_operator(), WN_start, and WN_step.
Referenced by Remove_Unity_Trip_Loop().
| HASH_TABLE<WN*,BOOL>* Find_Loops_Within | ( | WN * | orig, | |
| MEM_POOL * | ||||
| ) |
Definition at line 3529 of file lnoutils.cxx.
References CXX_NEW, and Find_Loops_Within_Walk().
Referenced by SX_INFO::Make_Sx_Info().
Definition at line 4587 of file lnoutils.cxx.
References Find_Node(), i, INT, NULL, OPC_BLOCK, OPCODE_has_sym(), WN_first(), WN_kid(), WN_kid_count(), WN_next(), and WN_opcode().
Referenced by Find_Node(), Generate_Interleaved_Bounds(), Generate_Simple_Bounds(), Lego_Skew_Offset(), Mp_Nested_Last_Thread(), Post_loop_peeling(), SNL_Access_Index_Section(), SNL_Access_Linear_Section(), and SNL_Access_Nonlinear_Section().
Definition at line 3992 of file lnoutils.cxx.
References Is_True, LWN_Get_Parent, NULL, OPR_FUNC_ENTRY, OPR_REGION, REGION_get_rid(), and WN_operator().
Referenced by Create_Single_Region(), ARA_LOOP_INFO::Generate_Copyout_Loop(), and ARA_LOOP_INFO::Generate_Parallel_Pragma().
Definition at line 1943 of file lnoutils.cxx.
Definition at line 744 of file lnoutils.cxx.
References Do_Loop_Is_Good(), FmtAssert, Good_Do_Depth(), INT, LWN_Get_Parent, NULL, OPC_DO_LOOP, and WN_opcode().
Referenced by Fuse(), Good_Do_Depth(), LWN_Process_FF_Pragmas_Walk_r(), MIR_Replace(), Post_loop_peeling(), Pre_loop_peeling(), SNL_NEST_INFO::SNL_NEST_INFO(), and Split_Array().
Definition at line 4614 of file lnoutils.cxx.
References FALSE, i, INT, and TRUE.
Referenced by Distribute_Traverse(), LNO_FB_Inv_Interchange(), Parallel_Interchange(), Prompf_Interchange(), SNL_GEN_Permute_Loops(), SNL_INV_Permute_Loops(), and SNL_INV_Transforms().
Definition at line 4718 of file lnoutils.cxx.
References FALSE, LWN_Get_Parent, NULL, OPC_DO_LOOP, OPR_LDID, OPR_STID, TRUE, WN_index, WN_opcode(), and WN_operator().
Referenced by SD_INFO::Make_Sd_Info(), and SD_INFO::Push_Memory_Nodes().
Definition at line 2022 of file lnoutils.cxx.
References Is_Used(), WN_index, and WN_start.
Referenced by Minimal_Kernel(), and SNL_Is_Transformable().
Definition at line 1996 of file lnoutils.cxx.
References All_Uses_Within(), WN_start, and WN_step.
Referenced by Eliminate_Dead_Do(), ARA_LOOP_INFO::Generate_Copyout_Loop(), ARA_LOOP_INFO::Generate_Parallel_Pragma(), Guard_A_Do(), Highest_Condition_Point(), HoistIf(), Lego_Skew_Loop(), Minimal_Kernel(), Remove_Unity_Trip_Loop(), Remove_Zero_Trip_Loop(), Simd_Pre_Analysis(), SNL_Finalize_Index_Variables(), SNL_Is_Transformable(), Trip_Reducible_Loop(), Unifiable_Loop(), and Vintrinsic_Fission().
Definition at line 4549 of file lnoutils.cxx.
References Common_Ancestor(), FALSE, FmtAssert, i, INT, LWN_Get_Parent, NULL, OPC_BLOCK, TRUE, WN_first(), WN_kid(), WN_kid_count(), WN_next(), and WN_opcode().
Referenced by Fix_Deps_For_Load(), and PF_LG::Gen_Pref_Node().
Definition at line 3876 of file lnoutils.cxx.
References base, Current_Symtab, CURRENT_SYMTAB, FALSE, OPR_ARRAY, OPR_LDA, OPR_LDID, SCLASS_BASED, ST_base_idx(), ST_level, ST_sclass, ST_st_idx, ST_symtab_id, SYMTAB_id, TRUE, WN_array_base, WN_operator(), and WN_st().
Definition at line 3398 of file lnoutils.cxx.
References Array_Dependence_Graph, dg, FALSE, DIRECTED_GRAPH16< EDGE_TYPE, VERTEX_TYPE >::Get_In_Edge(), DIRECTED_GRAPH16< EDGE_TYPE, VERTEX_TYPE >::Get_Next_In_Edge(), DIRECTED_GRAPH16< EDGE_TYPE, VERTEX_TYPE >::Get_Source(), ARRAY_DIRECTED_GRAPH16::Get_Vertex(), ARRAY_DIRECTED_GRAPH16::Get_Wn(), i, INT, Is_Loop_Invariant_Exp(), Is_Loop_Invariant_Use(), NULL, OPCODE_is_call(), OPR_ILOAD, OPR_INTRINSIC_OP, OPR_LDID, Statically_Safe_Node(), TRUE, Wn_Is_Inside(), WN_kid(), WN_kid0(), WN_kid_count(), WN_opcode(), WN_operator(), and WN_Parm_By_Reference.
Referenced by Is_Loop_Invariant_Exp(), MIR_Hoistable_Ref(), Non_Const_Loops(), SNL_Is_Invariant(), and Unit_Stride_Reference().
Definition at line 3360 of file lnoutils.cxx.
References Du_Mgr, FALSE, SLIST_ITER::First(), FmtAssert, SLIST_ITER::Is_Empty(), iter, SLIST_ITER::Next(), node, NULL, OPR_CALL, OPR_GOTO_OUTER_BLOCK, OPR_ICALL, OPR_ILOAD, OPR_INTRINSIC_CALL, OPR_IO, OPR_ISTORE, OPR_LDID, OPR_RETURN, TRUE, DU_MANAGER::Ud_Get_Def(), DU_NODE::Wn(), Wn_Is_Inside(), and WN_operator().
Referenced by Is_Loop_Invariant_Exp(), and Same_Invariant_Expression().
Definition at line 3945 of file lnoutils.cxx.
References FALSE, FmtAssert, NULL, OPC_REGION, REGION_get_rid(), RID_TYPE_mp, TRUE, and WN_opcode().
Definition at line 4002 of file lnoutils.cxx.
References Get_Do_Loop_Info(), DO_LOOP_INFO::Mp_Info, MP_INFO::Nest_Total(), and NULL.
Referenced by Eliminate_Dead_Do(), Eliminate_Dead_SCF_rec(), Fully_Unroll_Short_Loops(), Remove_Unity_Trip_Loop(), Remove_Zero_Trip_Loop(), and SNL_Finalizable_Loops().
Definition at line 3312 of file lnoutils.cxx.
References alloca, FALSE, i, INT, save, and TRUE.
Referenced by Load_SNL_And_Permutation(), LWN_Process_FF_Pragmas_Walk_r(), One_Cache_Model(), Permutation(), Permutation_Vector(), Reduced_Permutation(), SE_Permutation_To_Order(), SNL_INV_Local_Permute_Loops(), SNL_Scalar_Expand_For_Splitting(), Unimodular_To_Permutation(), and Update_Available_Order().
Definition at line 3240 of file lnoutils.cxx.
References Initialize_Symbols(), IV_Loop_Stmt_Check_X(), LWN_Get_Parent, and symbols.
Referenced by Du_Sanity_Check().
Definition at line 3584 of file lnoutils.cxx.
| void LNO_Erase_Vertices_In_Loop | ( | WN * | wn, | |
| ARRAY_DIRECTED_GRAPH16 * | dg | |||
| ) |
Definition at line 2856 of file lnoutils.cxx.
References INT, LNO_Erase_Vertices_In_Loop_Rec(), LWN_Get_Parent, OPC_DO_LOOP, WN_kid(), WN_kid_count(), and WN_opcode().
Referenced by Parallelize_Doacross_Loop().
| ST* Lookup_Function_Name | ( | const char * | name | ) |
Definition at line 1322 of file lnoutils.cxx.
References Be_Type_Tbl, CLASS_FUNC, Enter_ST, Enter_TY, EXPORT_PREEMPTIBLE, FmtAssert, FOREACH_SYMBOL, GLOBAL_SYMTAB, i, INT, KIND_FUNCTION, Make_Pointer_Type(), MTYPE_I4, MTYPE_U1, MTYPE_UNKNOWN, New_FTI(), New_ST(), New_TY(), New_TYLIST(), Save_Str(), SCLASS_EXTERN, SCLASS_TEXT, Set_ST_sclass, Set_TY_align, Set_TY_size, Set_TY_tylist(), ST_class, ST_Init(), ST_name, ST_type, strcmp(), TRUE, TY_ftinfo, TY_Init(), TY_kind, TY_name, TY_ret_type, Tylist_Table, and Void_Type.
Definition at line 4093 of file lnoutils.cxx.
References Do_Loop_Depth(), LWN_Get_Parent, NULL, OPC_DO_LOOP, and WN_opcode().
Referenced by SD_INFO::Create(), HMB_Has_Messy_Subscript(), HMB_Push_Messy_Expressions(), Hoist_Iload_Ldid_Upper_Bound_One_Level(), Hoist_Out_Nested_Statements(), Hoist_Point(), Hoist_Statement(), Hoist_Statements(), Hoistable_Statement(), Inv_Dep_Info(), Invariant_Red_Depth(), Loop_Statement(), PAR_STAT::PAR_STAT(), Red_Dep_Info(), Region_Depth(), and SD_INFO::Update().
| BOOL Loop_Is_Trapezoidal | ( | WN * | wn_loop, | |
| ARRAY_DIRECTED_GRAPH16 * | dg, | |||
| DU_MANAGER * | du | |||
| ) |
Definition at line 3773 of file lnoutils.cxx.
References Exp_Depends_On_Outer_Loop(), FALSE, TRUE, WN_end, WN_start, and WN_step.
Referenced by Inner_Loop_Is_Trapezoidal().
Definition at line 4459 of file lnoutils.cxx.
References FmtAssert, OPC_DO_LOOP, OPR_ADD, OPR_LDID, WN_kid0(), WN_kid1(), WN_opcode(), WN_operator(), and WN_step.
Definition at line 3299 of file lnoutils.cxx.
References DevWarn, INT64, LWN_Get_Parent, and WN_Get_Linenum().
Referenced by Check_Invalid_Accesses(), DISTR_ARRAY::Convert_Expr_To_Symbol(), Do_Automatic_Transformation(), Fission(), Fission_Test(), Gen_Alloc_DART(), Gen_Alloc_Reshape(), Gen_Compare_DARTS(), Gen_Dealloc_DART(), Gen_HT_DART(), Gen_Init_DART(), Gen_Lookup_DART(), Gen_Migrate_Array(), PF_LG::Gen_Pref_Node(), Gen_Symbols_In_DINFO(), Get_Callee_TY(), Is_Reshaped_Array_Expr(), Read_Pragma_Page_Place(), Rewrite_Reshaped_Commons(), and WN_Whirl_Linenum().
Definition at line 1228 of file lnoutils.cxx.
References INT, LWN_CreateExp1(), OPCODE_make_op(), OPR_CVT, and sz().
Referenced by Freeze_Numthreads_Ldid(), Generate_Dynamic_Bounds(), Generate_Runtime_Cyclic_Bounds(), Generate_Simple_Bounds(), LWN_Integer_Casts(), and Processor_Update_Outer_Tile().
Definition at line 1239 of file lnoutils.cxx.
References bitcount(), FALSE, FmtAssert, LWN_Integer_Cast(), LWN_Parentize_One_Level(), LWN_Short_Integer_Cast(), MTYPE_I1, MTYPE_I2, MTYPE_I4, MTYPE_I8, MTYPE_U1, MTYPE_U2, MTYPE_U4, MTYPE_U8, MTYPE_UNKNOWN, OPC_I4CVTL, OPC_U4CVTL, TYPE_ID, and WN_CreateCvtl.
Referenced by Mp_Coordinate_Call(), Mp_Coordinate_Copy_Out_Coordinates(), Mp_Layout_Call(), and Mp_Layout_Copy_Out_Layout().
Definition at line 93 of file lnoutils.cxx.
References MTYPE_V, OPCODE_make_op(), OPR_INTCONST, and WN_CreateIntconst.
Referenced by Add_To_Symbol(), Affinity_Array_Lower_Bound(), Affinity_Array_Upper_Bound(), BND_Max_Expr(), BND_Min_Expr(), DISTR_DIM::Chunksize(), Constant_Propogate(), Copy_Array(), Create_Array_Load(), Create_Array_Store(), Create_Initialize_Loop(), ARRAY_LOWER_REF::Create_Local_Blkcyc_Dim(), ARRAY_LOWER_REF::Create_Local_Block_Dim(), ARRAY_LOWER_REF::Create_Local_Cyclic_Dim(), LEGO_INFO::Create_Local_Index(), ARA_LOOP_INFO::Create_New_IF_Clause(), ARA_LOOP_INFO::Create_Old_IF_Clause(), Create_Positive_Divceil(), Create_Tmp_Array(), Current_Numprocs(), ARRAY_DESCRIPTOR::Distribute_Array(), EC_Array_Portion_Calls(), Extended_Lower_Bound(), Extended_Upper_Bound(), Fold_Base(), Fold_Offset(), Fuse(), Gather_Scatter_Scalar_Expand(), Gen_Alloc_DART(), Gen_Init_DART(), Gen_Malloc_Cart(), PF_LG::Gen_Pref_Node(), Generate_Blkcyc_Bounds(), Generate_Block_Bounds(), Generate_Block_Bounds_Negative(), ARA_LOOP_INFO::Generate_Copyout_Loop(), Generate_Cyclic_Bounds(), Generate_Dynamic_Bounds(), ARA_LOOP_INFO::Generate_Parallel_Pragma(), Generate_Runtime_Cyclic_Bounds(), Generate_Simple_Bounds(), generate_tree_add(), generate_tree_from_bounds_info_row(), generate_tree_from_row(), Get_Array_Dimension_LB(), Get_Array_Dimension_Size(), Get_Runtime_Numthreads_Ldid(), Increase_By(), Initialize_Pdo_Last_Local_Index(), Instrument_Address(), Interleaved_Pragma_Chunksize(), Lego_Index_From_Access_Vector(), Lego_Skew_Offset(), ARRAY_LOWER_REF::Lower_Array_Expr(), Lower_Bound_In_Affinity_Range(), Mark_Code(), Mp_Coordinate_Call(), Mp_Layout_Call(), Mp_Layout_Copy_In_Onto(), Mp_Version_Loop(), Mp_Version_Parallel_Region(), New_DACT(), Parallelize_Doacross_Loop(), Perform_Gather_Scatter(), Post_loop_peeling(), Pre_loop_peeling(), Processor_Update_Outer_Tile(), Promote_Pointer(), Rewrite_Bounds(), SE_Array(), SE_Findxs(), SE_Indxs_and_Bounds(), SE_Wrap_Array(), SNL_Access_Index_Section(), SNL_Access_Linear_Section(), SNL_Access_Nonlinear_Section(), SNL_GEN_2D_Regtile(), SNL_INV_Cache_Block(), SNL_Optimize_LB_With_Access_Vectors(), SNL_Optimize_UB_With_Access_Vectors(), SNL_Peel_Iteration(), SNL_SPL_Fix_First_Outer_Loop_Limits(), STD_Canonicalize_Upper_Bound(), Step_Size(), Thread_Affinity_Lower(), Trip_Count(), Trip_Reduce_Loop(), Upper_Bound_In_Affinity_Range(), Upper_Bound_Standardize(), Version_Loop(), and Version_Region().
Definition at line 3489 of file lnoutils.cxx.
References CXX_NEW, HASH_TABLE< SIG_TYPE, DATA_TYPE >::Enter(), SNL_Make_Loop_Mapping_Inside(), and WN_do_body.
Referenced by SNL_Regtile_Loop(), and SX_INFO::SX_INFO().
Definition at line 3828 of file lnoutils.cxx.
References FmtAssert, OPCODE_desc(), OPCODE_is_load(), OPCODE_is_store(), OPCODE_make_op(), OPCODE_operator(), OPERATOR_FIRST, OPR_ILOAD, OPR_ILOADX, OPR_ISTORE, OPR_ISTOREX, OPR_LDID, OPR_MLOAD, OPR_MSTORE, OPR_STID, and Promote_Type().
Referenced by Create_ILoad_From_IStore(), and Lego_Index_From_Access_Vector().
Definition at line 690 of file lnoutils.cxx.
References MTYPE_I1, MTYPE_I2, MTYPE_I4, MTYPE_I8, MTYPE_U1, MTYPE_U2, MTYPE_U4, MTYPE_V, and TYPE_ID.
Referenced by ARRAY_LOWER_REF::Create_Remote_Blkcyc_Dim(), ARRAY_LOWER_REF::Create_Remote_Block_Dim(), ARRAY_LOWER_REF::Create_Remote_Cyclic_Dim(), Extended_Lower_Bound(), Extended_Upper_Bound(), generate_tree_from_bounds_info_row(), IFMM_Convert(), Lego_Index_From_Access_Vector(), Lego_Skew_Offset(), Mp_Trip_Count(), SE_Indxs_and_Bounds(), SNL_Opr(), and SNL_TRANS_INDEX_DATA::SNL_TRANS_INDEX_DATA().
Definition at line 4918 of file lnoutils.cxx.
References ACCESS_ARRAY::Dim(), i, INT, LNO_Info_Map, LWN_Get_Parent, NULL, ACCESS_ARRAY::Num_Vec(), OPR_ARRAY, ACCESS_VECTOR::Too_Messy, ACCESS_ARRAY::Too_Messy, WN_MAP_Get, and WN_operator().
Referenced by HMB_Hoist_Easy_Messy_Subscripts(), MIR_Messy_Subscript(), and MIR_Update_Dependences().
Definition at line 3576 of file lnoutils.cxx.
References Do_Depth(), and LNO_Common_Loop().
Referenced by _xdependence_is_preserved(), Convert_Do_Loops_Conditionals(), Create_Shackle_If_Per_Stmt(), Equivalent_Access_Arrays(), Remove_Redundant_And_Inconsistent_If(), and Sink_If2do().
| WN* Outer_Tile | ( | WN * | wn_loop, | |
| DU_MANAGER * | du | |||
| ) |
Definition at line 4407 of file lnoutils.cxx.
References Do_Depth(), Get_Do_Loop_Info(), DO_LOOP_INFO::Lego_Mp_Key_Lower, DO_LOOP_INFO::Lego_Mp_Key_Upper, LWN_Get_Parent, Normal_Outer_Tile(), NULL, OPC_DO_LOOP, and WN_opcode().
Referenced by Cache_Model(), Is_Outer_Tile(), Normal_Outer_Tile(), SNL_GEN_U_Ctiling(), and WB_access().
Definition at line 2271 of file lnoutils.cxx.
References Do_Loop_Depth(), LWN_Get_Parent, OPC_DO_LOOP, and WN_opcode().
Definition at line 4776 of file lnoutils.cxx.
References CXX_NEW_ARRAY, i, INT, Is_Permutation_Vector(), Is_True, LNO_local_pool, and next_index.
Definition at line 1512 of file lnoutils.cxx.
References defs, DevWarn, DU_MANAGER::Du_Get_Use(), Du_Mgr, Dump_WN(), SLIST_ITER::First(), USE_LIST_ITER::First(), fprintf(), DEF_LIST::Incomplete(), USE_LIST::Incomplete(), INT, SLIST_ITER::Is_Empty(), iter, DEF_LIST::Loop_stmt(), LWN_Get_Parent, SLIST_ITER::Next(), USE_LIST_ITER::Next(), node, NULL, OPC_BLOCK, OPC_DO_LOOP, OPC_FUNC_ENTRY, OPC_IO, opcode, OPCODE_operator(), OPERATOR_name(), OPR_CALL, OPR_FUNC_ENTRY, OPR_GOTO_OUTER_BLOCK, OPR_ICALL, OPR_ILOAD, OPR_INTRINSIC_CALL, OPR_IO, OPR_ISTORE, OPR_LDID, OPR_RETURN, OPR_STID, Print_Def_Use(), TRUE, DU_MANAGER::Ud_Get_Def(), wn_dumpexpr(), WN_first(), WN_index, WN_kid(), WN_kid_count(), WN_next(), and WN_opcode().
Referenced by Print_Def_Use(), separate_loop_by_scc(), and SNL_Transform().
Definition at line 4010 of file lnoutils.cxx.
References DO_LOOP_INFO::Depth, INT, Is_True, LNO_Info_Map, OPC_BLOCK, OPC_DO_LOOP, Remark_Depth(), WN_first(), WN_kid(), WN_kid_count(), WN_MAP_Get, WN_next(), and WN_opcode().
| void Remove_Redundant_Stids | ( | WN * | wn_start, | |
| DU_MANAGER * | du | |||
| ) |
Definition at line 3794 of file lnoutils.cxx.
References DU_MANAGER::Du_Get_Use(), USE_LIST_ITER::First(), i, USE_LIST::Incomplete(), INT, iter, LWN_Delete_Tree(), LWN_Extract_From_Block(), NULL, OPC_BLOCK, OPR_STID, Remove_Redundant_Stids(), WN_first(), WN_kid(), WN_kid_count(), WN_next(), WN_opcode(), and WN_operator().
Referenced by Remove_Redundant_Stids(), and SNL_Peel_Iteration().
Definition at line 4940 of file lnoutils.cxx.
References buf, Create_Preg_Symbol(), Fix_Do_Du_Info(), INT, Name, NULL, offset, Replace_Symbol(), sprintf(), TRUE, TYPE_ID, WN_desc(), WN_index, WN_offset(), WN_st(), and WN_start.
Referenced by SNL_SPL_Split_Tile_Sets().
| void Replace_Ldid_With_Exp_Copy | ( | SYMBOL | , | |
| WN * | wn, | |||
| WN * | expr, | |||
| DU_MANAGER * | du = NULL, |
|||
| ARRAY_DIRECTED_GRAPH16 * | dep_graph = NULL | |||
| ) |
Definition at line 1120 of file lnoutils.cxx.
References INT, NULL, OPR_BLOCK, OPR_DO_LOOP, OPR_DO_WHILE, OPR_IF, OPR_LDID, OPR_WHILE_DO, Replace_Ldid_With_Exp_Copy(), Replace_Wnexp_With_Exp_Copy(), void, WN_do_body, WN_else, WN_end, WN_first(), WN_if_test, WN_kid(), WN_kid_count(), WN_next(), WN_operator(), WN_start, WN_step, WN_then, WN_while_body, and WN_while_test.
Referenced by Fuse(), Guard_A_Do(), Guard_Test_Redundant(), Post_loop_peeling(), Pre_loop_peeling(), Remove_Unity_Trip_Loop(), Replace_Ldid_With_Exp_Copy(), return_upper_bound(), Rewrite_Bounds(), SE_Guard_Tests(), SNL_GEN_2D_Regtile(), SNL_Peel_Iteration(), Transform_Code(), and Vintrinsic_Fission().
| WN* Replace_Scalar_Store_With_Array_Store | ( | WN * | scalar_store, | |
| WN * | array_store, | |||
| DU_MANAGER * | = NULL | |||
| ) |
Definition at line 1098 of file lnoutils.cxx.
References LWN_Copy_Frequency_Tree(), LWN_Copy_Tree(), LWN_Delete_Tree(), LWN_Extract_From_Block(), LWN_Get_Parent, LWN_Insert_Block_Before(), LWN_Set_Parent, NULL, WN_kid0(), and WN_kid1().
Referenced by BS_Replace_Store().
Definition at line 787 of file lnoutils.cxx.
References Alias_Mgr, buf, CLASS_PREG, Copy_alias_info(), Create_alias(), DU_MANAGER::Delete_Def_Use(), DevWarn, DU_MANAGER::Du_Get_Use(), Du_Mgr, SLIST_ITER::First(), USE_LIST_ITER::First(), FmtAssert, INT, SLIST_ITER::Is_Empty(), Is_True, iter, LWN_Get_Parent, SYMBOL::Name(), SLIST_ITER::Next(), USE_LIST_ITER::Next(), node, NULL, OPC_BLOCK, OPCODE_has_sym(), OPCODE_operator(), OPR_LDID, OPR_STID, p, Replace_Symbol(), SYMBOL::St(), ST_class, ST_st_idx, DU_MANAGER::Ud_Get_Def(), DU_NODE::Wn(), WN_first(), WN_kid(), WN_kid_count(), WN_next(), SYMBOL::WN_Offset(), WN_offset(), WN_opcode(), and WN_st_idx().
Referenced by Copy_Array_Section(), Freeze_Numthreads_Ldid(), Fuse(), Gather_Scatter_Scalar_Expand(), Mp_Collapse_Cleanup(), Perform_Gather_Scatter(), Replace_Index_Variable(), Replace_Symbol(), Replace_Symbols(), Rewrite_Bounds(), Simd_Align_Analysis(), SNL_GEN_2D_Regtile(), SNL_INV_Cache_Block(), and Wind_Down().
Definition at line 863 of file lnoutils.cxx.
References Alias_Mgr, buf, CLASS_PREG, Copy_alias_info(), Create_alias(), DU_MANAGER::Delete_Def_Use(), DevWarn, DU_MANAGER::Du_Get_Use(), Du_Mgr, SLIST_ITER::First(), USE_LIST_ITER::First(), FmtAssert, i, INT, SLIST_ITER::Is_Empty(), Is_True, iter, LWN_Get_Parent, Name, SLIST_ITER::Next(), USE_LIST_ITER::Next(), node, NULL, OPC_BLOCK, OPCODE_has_sym(), OPCODE_operator(), OPR_LDID, OPR_STID, p, Replace_Symbol(), Replace_Symbols(), ST_class, ST_st_idx, DU_MANAGER::Ud_Get_Def(), DU_NODE::Wn(), WN_first(), WN_kid(), WN_kid_count(), WN_next(), SYMBOL::WN_Offset(), WN_offset(), WN_opcode(), and WN_st_idx().
Referenced by Replace_Symbols(), and SNL_Regtile_Loop().
| WN* Replace_Wnexp_With_Exp_Copy | ( | WN * | wn, | |
| WN * | expr, | |||
| DU_MANAGER * | = NULL, |
|||
| BOOL * | = NULL, |
|||
| ARRAY_DIRECTED_GRAPH16 * | dep_graph = NULL | |||
| ) |
Definition at line 1030 of file lnoutils.cxx.
References BOOL, copy, FALSE, INT, Is_True, LNO_Erase_Dg_From_Here_In(), LNO_Info_Map, LWN_Copy_Frequency_Tree(), LWN_Copy_Tree(), LWN_Delete_Tree(), LWN_Get_Parent, LWN_Int_Type_Conversion(), LWN_Set_Parent, mtype, MTYPE_byte_size, MTYPE_complement, MTYPE_is_integral, MTYPE_is_signed, NULL, OPCODE_is_expression(), OPR_CVT, OPR_CVTL, OPR_ILOAD, OPR_LDID, TRUE, TYPE_ID, WN_desc(), WN_kid(), WN_kid_count(), WN_opcode(), WN_operator(), WN_rtype(), WN_set_desc(), and WN_set_rtype().
Referenced by BS_Replace_Load(), FS_Array_Substitute(), FS_Substitute(), HMB_Replace_Messy_Bounds(), Lego_Simplify(), Lego_Skew_Loop(), LWN_Copy_Tree_With_High_Defs(), Processor_Update_Inner_Tile(), Processor_Update_Outer_Tile(), Replace_Ldid_With_Exp_Copy(), SNL_Finalize_Loops(), SNL_Optimize_LB_With_Access_Vectors(), SNL_Optimize_UB_With_Access_Vectors(), SNL_Peel_Iteration(), Trip_Reduce_Loop(), Unify_Loop(), UT_Body_Exp(), and ut_body_exp_pre().
Definition at line 1430 of file lnoutils.cxx.
References DO_LOOP_INFO::Depth, Get_Do_Loop_Info(), DO_LOOP_INFO::Is_Inner, Is_True, OPC_DO_LOOP, reset_do(), WN_do_body, and WN_opcode().
Referenced by Create_Simple_Shackle_Loops(), and reset_do().
Definition at line 4439 of file lnoutils.cxx.
References LWN_CreateReturn(), LWN_Get_Parent, LWN_Insert_Block_After(), NULL, OPC_RETURN, WN_first(), WN_func_body, WN_next(), and WN_opcode().
Referenced by Generate_Blkcyc_Bounds(), Generate_Block_Bounds(), Generate_Block_Bounds_Negative(), Generate_Cyclic_Bounds(), Generate_Interleaved_Bounds(), Mp_Nested_Last_Thread(), and RR_Map_Setup_Traverse().
Definition at line 2052 of file lnoutils.cxx.
References BOOL, FALSE, Flip_Le_And_Ge(), FmtAssert, INT, Is_True, lr, LWN_CreateDivceil(), LWN_CreateDivfloor(), LWN_Parentize(), MTYPE_complement, MTYPE_I4, MTYPE_I8, MTYPE_is_unsigned, MTYPE_V, ok(), OPCODE_desc(), OPCODE_is_load(), OPCODE_make_op(), OPCODE_operator(), OPCODE_rtype(), OPR_ADD, OPR_CVT, OPR_GE, OPR_GT, OPR_INTCONST, OPR_LE, OPR_LT, OPR_MPY, OPR_NEG, OPR_SUB, out, r, Symbol_Count(), TRUE, TYPE_ID, void, WN_const_val(), WN_CreateExp1, WN_Delete, WN_kid0(), WN_kid1(), WN_kid_count(), WN_opcode(), WN_operator(), WN_rtype(), WN_set_opcode(), WN_Simplifier_Enable(), and WN_Simplify_Tree().
Referenced by Fiss_Gather_Inner_Loop(), and Upper_Bound_Standardize().
Definition at line 1506 of file lnoutils.cxx.
References Alias_Mgr, and WN_Expr_Can_Be_Speculative().
Referenced by Guard_A_Do(), Has_Statically_Safe_Messy_Bounds(), HMB_Hoist_Easy_Messy_Subscripts(), Hoist_Conditionals(), and Is_Messy_Expression().
Definition at line 1495 of file lnoutils.cxx.
References Alias_Mgr, and WN_Can_Be_Speculative().
Referenced by Hoist_Place(), and Is_Loop_Invariant_Exp().
Definition at line 114 of file lnoutils.cxx.
References BOOL, DevWarn, Do_Wtype(), FmtAssert, index(), INT, INT64, LWN_Delete_Tree(), LWN_Make_Icon(), LWN_Set_Parent, neg(), OPC_DO_LOOP, OPERATOR_name(), OPR_ADD, OPR_INTCONST, OPR_LDID, OPR_STID, OPR_SUB, ST_name, step(), tmp, WN_const_val(), WN_index, WN_kid(), WN_kid0(), WN_kid1(), WN_offset(), WN_opcode(), WN_operator(), WN_st(), and WN_step.
Referenced by SNL_BOUNDS_INFO::Collect_Do_Info(), SUMMARIZE< program >::Easy_Trip_Count(), Gather_Scatter_Scalar_Expand(), General_Kernel(), Generate_Runtime_Cyclic_Bounds(), LEGO_INFO::Get_Local_Step(), Iterations(), Iters(), Loop_Bounds_Simple(), Num_Iters(), Post_loop_peeling(), Pre_loop_peeling(), Rewrite_Bounds(), separate_loop_and_scalar_expand(), SNL_GEN_2D_Regtile(), SNL_INV_Cache_Block(), SNL_Is_Transformable(), SNL_Regtile_Loop(), SNL_SPL_Loop_Is_Inner_Tile(), SNL_SPL_Propagate_Tiled_Lower_Bound(), Step_Size(), Unroll_Loop_By_Trip_Count(), vintr_fis_separate_loop_and_scalar_expand(), and WBTR_Loop_Tiling().
Definition at line 2027 of file lnoutils.cxx.
References INT, OPR_LDID, Symbol_Count(), WN_kid(), WN_kid_count(), and WN_operator().
Referenced by SNL_Bound_Lin_Symb_Worth_Optimizing(), SNL_Bound_Loop_Coeff_Worth_Optimizing(), SNL_Bound_Non_Lin_Symb_Worth_Optimizing(), Solve_For(), and Symbol_Count().
Definition at line 4623 of file lnoutils.cxx.
References Array_Dependence_Graph, AWN_Add, AWN_Div, AWN_Mpy, AWN_Sub, BOOL, Do_Wtype(), Du_Mgr, FALSE, index_type, Loop_Step(), LWN_Copy_Tree(), LWN_Make_Icon(), NULL, OPR_GT, OPR_INTCONST, OPR_LDID, OPR_LT, Promote_Type(), TYPE_ID, Upper_Bound_Standardize(), WN_const_val(), WN_end, WN_index, WN_kid0(), WN_kid1(), WN_operator(), and WN_start.
Definition at line 4042 of file lnoutils.cxx.
References FALSE, NULL, OPR_GE, OPR_GT, OPR_LE, OPR_LT, TRUE, WN_kid0(), WN_kid1(), and WN_operator().
Referenced by Extended_Upper_Bound(), Forward_Substitute_For_Access_Arrays(), Generate_Blkcyc_Bounds(), Generate_Block_Bounds(), Generate_Block_Bounds_Negative(), Generate_Cyclic_Bounds(), Generate_Dynamic_Bounds(), Generate_Guard_Test(), Generate_Interleaved_Bounds(), Generate_Runtime_Cyclic_Bounds(), Generate_Simple_Bounds(), Has_Statically_Safe_Messy_Bounds(), HMB_Add_Guard_Condition(), HMB_Maximum_Point(), HMB_Replace_Messy_Bounds_Loop(), Hoist_Bounds_One_Level(), Hoist_Iload_Ldid_Upper_Bound_One_Level(), Hoist_Upper_Bound(), Is_Loop_Upper_Bound(), Lego_Skew_Loop(), Mp_Collapse_Loop_Heads(), Processor_Update_Inner_Tile(), Processor_Update_Outer_Tile(), SNL_Finalize_Loops(), SNL_Is_Invariant(), SNL_Legal_Perm_Bounds(), SNL_Optimize_UB_With_Access_Vectors(), SNL_UB_Worth_Optimizing(), Trip_Reduce_Loop(), Unify_Loop(), and Upper_Bound_In_Affinity_Range().
Definition at line 4064 of file lnoutils.cxx.
References LWN_Get_Parent, NULL, OPC_DO_LOOP, OPR_GE, OPR_GT, OPR_LDID, OPR_LE, OPR_LT, WN_index, WN_kid0(), WN_kid1(), WN_opcode(), and WN_operator().
Definition at line 1881 of file lnoutils.cxx.
References BOOL, CXX_DELETE, CXX_NEW, Do_Loop_Depth(), FALSE, LNO_local_pool, load_stack, LWN_Get_Parent, MEM_POOL_Pop, MEM_POOL_Push, NULL, OPC_DO_LOOP, tmp, TRUE, Unrolled_DU_Update_E(), Unrolled_DU_Update_V(), WN_index, and WN_opcode().
Referenced by canonicalize_if_condition(), Convert_Do_Loops_Conditionals(), Create_Shackle_If_Per_Stmt(), Create_Simple_Shackle_Loops(), SHACKLE_INFO::Expr_Lower(), SHACKLE_INFO::Expr_Upper(), Fission_DU_Update(), Handle_Sink_General_Case(), Handle_Sink_Promotion_Case(), HMB_Hoist_Messy_Bounds(), Maybe_Handle_Sink_Promotion_Case(), Mp_Version_Loop(), Mp_Version_Parallel_Region(), Post_loop_peeling(), Pre_loop_peeling(), return_upper_boundplus1(), SNL_GEN_2D_Regtile(), SNL_GEN_Protect_Nest_With_Conditionals(), SNL_Peel_Iteration(), SNL_Regtile_Loop(), SNL_SPL_Split_Tile_Sets(), PF_LOOPNODE::Split_Loops(), Unroll_Loop_By_Trip_Count(), Version_Loop(), Version_Region(), and Wind_Down().
Definition at line 4227 of file lnoutils.cxx.
References Add_Pragma_To_MP_Regions(), FALSE, LWN_Get_Parent, Malloc_Mem_Pool, OPC_REGION, Parent_Map, REGION_get_rid(), RID_TYPE_mp, tmp, WN_opcode(), and WN_PRAGMA_LOCAL.
Referenced by Gather_Scatter_Scalar_Expand(), and Scalar_Expand().
Definition at line 2218 of file lnoutils.cxx.
References BOOL, Do_Loop_Is_Unsigned(), FALSE, FmtAssert, LWN_Copy_Frequency_Tree(), LWN_CreateExp2(), LWN_Get_Parent, LWN_Make_Icon(), LWN_Set_Parent, MTYPE_is_integral, MTYPE_V, Name, NULL, ok(), opc, OPC_DO_LOOP, OPCODE_desc(), OPCODE_make_op(), OPCODE_name(), OPCODE_operator(), OPCODE_rtype(), OPR_LE, OPR_LT, OPR_SUB, Solve_For(), TYPE_ID, UBvar(), WN_index, WN_kid1(), WN_opcode(), WN_operator(), and WN_set_opcode().
Referenced by ARA_LOOP_INFO::Const_Work_Estimate(), ARA_LOOP_INFO::Create_New_IF_Clause(), Eliminate_Dead_Do(), fast_fuse_check_ok(), Finalize_Index_Variable(), Find_Do_Loop_With_Min(), Fuse(), Gather_Scatter_Scalar_Expand(), Generate_Bounds(), Handle_Sink_Promotion_Case(), Handle_Sink_Symbolic_Non_Promotion_Case(), HMB_Maximum_Point(), HoistIf(), Invariant_Loops(), ARA_LOOP_INFO::Is_OK_Parallel(), ARA_LOOP_INFO::Is_Parallel(), Iterations(), Lego_Loop_Want_Skew(), Loop_Bounds_Simple(), Maybe_Handle_Sink_Promotion_Case(), Minimal_Kernel(), Mp_Tile_Single_Loop(), Perfect_Nested_Outer_Loop(), Post_loop_peeling(), ARA_LOOP_INFO::Print_Loop_Property(), Print_Prompf_Msgs(), Print_Prompl_Msgs(), Scalar_Expandable(), SE_Tile_Inner_Loop(), Simd_Pre_Analysis(), SNL_Finalize_Loops(), SNL_INV_Cache_Block(), SNL_Is_Transformable(), SNL_Optimize_UB_With_Access_Vectors(), SNL_Peel_Iteration(), SNL_SPL_Loop_Is_Inner_Tile(), SNL_TRANS_INDEX_DATA::SNL_TRANS_INDEX_DATA(), SNL_UB_Worth_Optimizing(), SNL_Upper_Bound_Standardize(), Standardize_For_Tiling(), Statement_Sinkable_Out_Of_Loop(), Tile_Loop(), Trip_Count(), Twod_Setbound(), Upper_Bound_In_Affinity_Range(), and Vintrinsic_Fission().
| INT Which_Loop_Inside | ( | WN * | ref, | |
| const DOLOOP_STACK & | stack | |||
| ) |
| INT Which_Loop_Inside | ( | WN * | ref, | |
| const DOLOOP_STACK & | stack, | |||
| INT | first | |||
| ) |
Referenced by SX_INFO::Analyze_Reduction(), and Which_Loop_Inside().
Definition at line 3289 of file lnoutils.cxx.
References FALSE, LWN_Get_Parent, and TRUE.
Referenced by BS_Loop_Within_Equivalence_Class(), Can_Fix_Array_Deps_On_Index_Variable(), Check_Doacross_Sync_Coverage(), ARA_LOOP_INFO::Default_For_Bad_Loop(), ARA_LOOP_INFO::Determine_Last_Value(), Exp_Node_Varies_In_Loop(), Find_SCF_Inside(), FS_Array_Worthwhile(), FS_Load_Assigned_on_Loop_Iteration(), FS_Worthwhile(), Gather_Vectorizable_Ops(), Has_Live_Out_Index_Variable(), Has_Scalar_Use_Inside_Loop(), HMB_Invariant_In_Loop(), Hoist_Merge(), HoistIf_Update_Use_List(), Index_Variable_Outside_Loop(), Initialize_Doacross_Last_Local_Index(), Inv_Dep_Info(), Invariant_Base(), Is_Loop_Invariant_Exp(), Is_Loop_Invariant_Use(), Is_Non_Dependent_Load(), Is_Privatizable_With_Context(), ARA_LOOP_INFO::Is_Problem_Scalar(), MIR_Replace(), Mp_Collapse_Dependences(), New_Lowest_Statement(), Patch_Loop_Statement_Expression(), SD_INFO::Push_Memory_Nodes(), Red_Dep_Info(), Remove_Unity_Trip_Loop_Dep_Update(), RV_Scalar_Node_Legal(), Scalar_Equivalence_Class(), Scalar_Expand(), Scalar_Expandable(), SE_Prune_Stack_Elements(), separate_loop_and_scalar_expand(), Simd_Vectorize_Load_And_Equilvalent(), Sinkable_Out_Of_Loop(), SNL_Find_Traverse(), SNL_Is_Distributable_Tree(), Unique_Ldid_Symbol(), Unrolled_DU_Update_E(), SX_INFO::Update_Reduction_Loop_Stmts(), ARA_LOOP_INFO::Walk_Block(), WB_DAV_draw_deps_loop(), and Which_Loop_Inside().
Definition at line 2823 of file lnoutils.cxx.
References OPCODE_is_not_executable(), WN_next(), and WN_opcode().
Referenced by Do_Automatic_Transformation(), LWN_Create_Block_From_Stmts_Below(), Rewrite_Bounds(), SNL_Distribute(), SNL_GEN_U_Ctiling(), SNL_Has_Sandwiched_Code(), SNL_INV_Distribute(), SNL_INV_Distribute_Block_Of_Loops(), SNL_Is_Distributable(), and SNL_NEST_INFO::SNL_NEST_INFO().
Definition at line 2815 of file lnoutils.cxx.
References OPCODE_is_not_executable(), WN_opcode(), and WN_prev().
Referenced by Do_Automatic_Transformation(), LWN_Create_Block_From_Stmts_Above(), Rewrite_Bounds(), SNL_Distribute(), SNL_GEN_U_Ctiling(), SNL_Has_Sandwiched_Code(), SNL_INV_Distribute(), SNL_INV_Distribute_Block_Of_Loops(), SNL_Is_Distributable(), and SNL_NEST_INFO::SNL_NEST_INFO().
Definition at line 4810 of file lnoutils.cxx.
References LWN_Get_Linenum(), LWN_Get_Parent, and NULL.
Referenced by ARA_LOOP_INFO::Bad_Array_Dependence(), Copy_Array(), Copy_Array_Section(), ARA_LOOP_INFO::Determine_Peel(), Print_Prompf_Msgs(), Print_Prompl_Msgs(), and Walk_Loop_Dependence().
1.5.6