OpenADFortTk (including Open64 and OpenAnalysis references)
|
#include <Open64IRInterface.hpp>
Classes | |
class | FindUseMREVisitor |
Static Public Member Functions | |
static void | DumpWN (WN *wn, ostream &os) |
static void | setIgnoreBlackBoxRoutines () |
static bool | ignoreBlackBoxRoutines () |
static bool | haveDefinition (WN *wn) |
static void | initContextState (PU_Info *pu_forest) |
User is responsible for doing this. It should not be part of. More... | |
static void | setContext (OA::IRHandle h, OA::ProcHandle proc) |
Private Member Functions | |
void | findAllMemRefsAndMapToMemRefExprs (OA::StmtHandle stmt, WN *wn, unsigned lvl) |
void | createAndMapNamedRef (OA::StmtHandle stmt, WN *wn, ST *st, OA::MemRefExpr::MemRefType hty) |
void | createAndMapDerefs (OA::StmtHandle stmt, WN *wn, WN *subMemRef) |
bool | isPassByReference (WN *) |
ST * | findBaseSymbol (WN *) |
void | currentProc (OA::ProcHandle p) |
OA::MemRefHandle | findTopMemRefHandle (WN *wn) |
bool | ExprTree_hack_for_MPI (OA::MemRefHandle h, OA::OA_ptr< OA::ExprTree > tree) |
OA::OA_ptr< OA::ExprTree > | createExprTree (WN *wn) |
OA::OA_ptr< OA::ExprTree::Node > | createExprTree (OA::OA_ptr< OA::ExprTree > tree, WN *wn) |
OA::OA_ptr < OA::ConstValBasicInterface > | getConstValBasicFromST (ST *st) |
Static Private Member Functions | |
static const char * | createCharStarForST (ST *) |
use this to appropriately get a string for a symbol More... | |
static void | DumpWNMemRef (WN *wn, ostream &os) |
static void | DumpWNLeaf (WN *wn, ostream &os) |
static void | DumpWNMemRefLeaf (WN *wn, ostream &os) |
static void | initProcContext (PU_Info *pu_forest, Open64IRProcIterator &procIter) |
static void | setCurrentProcToProcContext (OA::IRHandle h) |
static OA::ProcHandle | getCurrentProcContext () |
static void | setCurrentProcContext (OA::ProcHandle) |
static fully_qualified_name | create_fqn (OA::SymHandle sym) |
static void | initCallSymToProcMap (Open64IRProcIterator &procIter) |
static void | initProcToSymRefSetMap (Open64IRProcIterator &procIter) |
Friends | |
class | Open64IRProcIterator |
class | Open64IRMemRefIterator |
class | Open64IRExprHandleIterator |
class | InitContextVisitor |
Definition at line 585 of file Open64IRInterface.hpp.
Open64IRInterface::Open64IRInterface | ( | ) |
Definition at line 563 of file Open64IRInterface.cpp.
|
virtual |
Definition at line 568 of file Open64IRInterface.cpp.
|
virtual |
Implements OA::DUG::DUGIRInterface.
Definition at line 2991 of file Open64IRInterface.cpp.
References isRefParam(), and OA::MemRefExpr::USE.
Referenced by getDepMemRefExprIter(), getIndepMemRefExprIter(), and whirl2xaif::PUXlationContext::isActiveSym().
|
staticprivate |
only call if the symbol is in a module or a common block
Definition at line 5162 of file Open64IRInterface.cpp.
References CLASS_VAR, createCharStarForST(), OA::IRHandle::hval(), ST_base(), ST_is_in_module(), ST_sym_class(), Stab_Is_Based_At_Common_Block(), and Stab_Is_Common_Block().
Referenced by initProcContext().
|
private |
Definition at line 2959 of file Open64IRInterface.cpp.
References OA::Deref::composeWith(), sMemref2mreSetMap, sStmt2allMemRefsMap, and OA::MemRefExpr::USE.
|
private |
Definition at line 3015 of file Open64IRInterface.cpp.
References CLASS_VAR, getCurrentProcContext(), sFQNToProcToLocalSymMap, sGlobalVarMap, sMemref2mreSetMap, sStmt2allMemRefsMap, sSymToFQNMap, ST_is_constant(), ST_is_in_module(), ST_sym_class(), and Stab_Is_Based_At_Common_Block().
Referenced by findAllMemRefsAndMapToMemRefExprs().
|
staticprivate |
use this to appropriately get a string for a symbol
constant symbols get their strings from the TCON table?
Definition at line 4580 of file Open64IRInterface.cpp.
References CLASS_CONST, idx, MTYPE_STR, NULL, ST_class(), ST_name(), STC_val(), Targ_Print(), and TCON_ty.
Referenced by create_fqn(), DumpWN(), DumpWNMemRefLeaf(), initProcContext(), and toString().
|
private |
Definition at line 4245 of file Open64IRInterface.cpp.
Referenced by createExprTree(), and getExprTree().
|
private |
Initialize root node of ExprTree
If empty node, return root, end of recursion
identify type of node.
Intrinsic Op ======== Opode ========
Iterate over Operands of OpNode
get ExprTree for children
connect ExprTree of children with OpNode
If Callsite, =========== CallNode ===========
If Integer Constant ============ ConstValNode ============
If Constant Symbol, =========== ConstSymNode ============
Very Very Important Please do this check at the end because we dont want to treat Operators as MemRefNodes even if MemRefExprs are associated with the Operator nodes e.g. StatementHandle: foo( A+B ) MemRefHandles: &A+B is associated with OPR_PARM node A+B is associated with OPR_ADD node ExprTrees Expected:
If MemRefHandle associated with the node ========= MemRefNode =======
ARRAEXP may have multiple chlildren but we want to recurse on kid0
special case indicating section of an array for which index expression is created. ============ ConstValNode ============
We want to add special logic for every node that has more than one child.
For any other type of node, Recurse over children
Definition at line 4283 of file Open64IRInterface.cpp.
References OA::Tree::addNode(), CLASS_CONST, OA::ExprTree::connect(), createExprTree(), ExprTree_hack_for_MPI(), IntrinsicInfo::isIntrinsic(), NULL, OPERATOR_has_sym(), OPERATOR_is_call(), OPR_ARRAYEXP, OPR_CONST, OPR_INTCONST, OPR_SRCTRIPLET, OA::OA_ptr< T >::ptrEqual(), sMemref2mreSetMap, ST_class(), WN_kid(), WN_kid0(), WN_kid_count(), WN_operator(), and WN_st().
|
inlineprivate |
Definition at line 1014 of file Open64IRInterface.hpp.
References OA::IRHandle::hval(), and PU_SetGlobalState().
Referenced by getDepMemRefExprIter(), getIndepMemRefExprIter(), getSideEffect(), and procBody().
|
virtual |
Given a statement, pretty-print it to the output stream os. The default implementation does nothing.
Reimplemented from OA::Alias::AliasIRInterfaceDefault.
Definition at line 964 of file Open64IRInterface.cpp.
References DumpWN(), OA::IRHandle::hval(), and setCurrentProcToProcContext().
|
virtual |
Given a memory reference, pretty-print it to the output stream os. The default implementation does nothing.
Reimplemented from OA::Alias::AliasIRInterfaceDefault.
Definition at line 977 of file Open64IRInterface.cpp.
References DumpWN(), OA::IRHandle::hval(), OA::n, OPERATOR_is_store(), setCurrentProcToProcContext(), toString(), WN_kid1(), WN_kid_count(), WN_operator(), and WN_st().
|
virtual |
Given a statement, pretty-print it to the output stream os.
Implements OA::IRHandlesIRInterface.
Definition at line 1000 of file Open64IRInterface.cpp.
References OA::n, and toString().
|
static |
Definition at line 4608 of file Open64IRInterface.cpp.
References CLASS_CONST, createCharStarForST(), DumpWNLeaf(), DumpWNMemRefLeaf(), fdump_wn(), FLD_last_field(), FLD_name(), FLD_next(), INTRINSIC_name, NULL, OPCODE_name(), OPR_ABS, OPR_ADD, OPR_ARRAY, OPR_ARRAYEXP, OPR_ARRSECTION, OPR_ASHR, OPR_BAND, OPR_BIOR, OPR_BLOCK, OPR_BNOT, OPR_BXOR, OPR_CALL, OPR_CEIL, OPR_CONST, OPR_CVT, OPR_CVTL, OPR_DIV, OPR_DO_LOOP, OPR_DO_WHILE, OPR_EQ, OPR_FALSEBR, OPR_FLOOR, OPR_FUNC_ENTRY, OPR_GE, OPR_GT, OPR_IDNAME, OPR_IF, OPR_ILOAD, OPR_ILOADX, OPR_IMPLICIT_BND, OPR_INTCONST, OPR_INTRINSIC_CALL, OPR_INTRINSIC_OP, OPR_ISTORE, OPR_ISTOREX, OPR_LAND, OPR_LDA, OPR_LDID, OPR_LDMA, OPR_LE, OPR_LIOR, OPR_LNOT, OPR_LSHR, OPR_LT, OPR_MADD, OPR_MAX, OPR_MIN, OPR_MOD, OPR_MPY, OPR_MSUB, OPR_NE, OPR_NEG, OPR_NMADD, OPR_NMSUB, OPR_PAIR, OPR_PAREN, OPR_PARM, OPR_RECIP, OPR_REM, OPR_RETURN, OPR_RETURN_VAL, OPR_RND, OPR_RSQRT, OPR_SELECT, OPR_SHL, OPR_SQRT, OPR_SRCTRIPLET, OPR_STID, OPR_STRCTFLD, OPR_SUB, OPR_TAS, OPR_TRIPLET, OPR_TRUEBR, OPR_TRUNC, OPR_WHILE_DO, ST_sym_class(), Targ_Print(), TY_fld(), WN_const_val(), WN_end, WN_field_id(), WN_flag(), WN_if_test, WN_intrinsic(), WN_kid(), WN_kid0(), WN_kid1(), WN_kid2(), WN_kid_count(), WN_label_number(), WN_load_addr_ty(), WN_opcode(), WN_operator(), WN_PARM_BY_REFERENCE, WN_st(), WN_val(), and WN_while_test.
Referenced by fortTkSupport::CreateWhirlIdMaps(), dump(), DumpWNMemRef(), whirl2xaif::PUXlationContext::findDoChainId(), whirl2xaif::PUXlationContext::findUDDUChainId(), whirl2xaif::PUXlationContext::getAliasMapKey(), fortTkSupport::AddToScalarizedRefTabOp::operator()(), and toString().
|
staticprivate |
Definition at line 5027 of file Open64IRInterface.cpp.
References DumpWNMemRefLeaf().
Referenced by DumpWN().
|
staticprivate |
Definition at line 5040 of file Open64IRInterface.cpp.
References DumpWN(), DumpWNMemRefLeaf(), OPERATOR_is_store(), WN_kid1(), WN_kid_count(), and WN_operator().
Referenced by ExprTree_hack_for_MPI(), and toString().
|
staticprivate |
Definition at line 5060 of file Open64IRInterface.cpp.
References createCharStarForST(), OPERATOR_has_1ty(), OPERATOR_has_offset(), OPERATOR_has_sym(), TY_name(), WN_offset(), WN_operator(), WN_st(), and WN_ty().
Referenced by DumpWN(), DumpWNLeaf(), and DumpWNMemRef().
|
virtual |
Given a structured two-way conditional statement, return an IRRegionStmtIterator for the "else" part (i.e., the statements under the "else" clause).
Implements OA::CFG::CFGIRInterface.
Definition at line 1541 of file Open64IRInterface.cpp.
References OA::IRHandle::hval(), OPR_IF, WN_else, and WN_operator().
|
virtual |
Given an OpHandle and two operands (unary ops will just use the first operand and the second operand should be NULL) return a ConstValBasicInterface
Implements OA::ReachConsts::ReachConstsIRInterface.
Definition at line 3537 of file Open64IRInterface.cpp.
References OA::OA_ptr< T >::convert(), Open64ConstVal::eval(), OA::IRHandle::hval(), NULL, OA::OA_ptr< T >::ptrEqual(), and WN_operator().
|
private |
Definition at line 4255 of file Open64IRInterface.cpp.
References OA::Tree::addNode(), DumpWNMemRef(), OA::IRHandle::hval(), NULL, OPC_I4INTCONST, and WN_CreateIntconst().
Referenced by createExprTree().
|
private |
create NamedRef
If Formal Reference Parameter
get mre for the current MemRefHandle
composedWith Deref
remove current association
associate new mre with the current node
If Pointer
get mre for the current MemRefHandle
composedWith deref mre
remove current association
associate new mre with the current node
iterate over kid0, RHS
iterate over kid1, LHS
=================== Processing LHS ====================
create NamedRef
get mre for the current MemRefHandle
If Formal Reference Parameter
change MRE to USE
composedWith deref mre
remove current association
associate new mre with the current node
=================== Processing RHS ====================
get the mre for topMemRefHandle
composedWith AddressOf
remove current association
associate new mre with the current node
iterate over kid0, RHS
iterate over kid1, LHS
create NamedRef
If Formal Reference Parameter
get the mre for current MemRefHandle
change MRE to USE
composedWith create deref mre
remove current association
associate new mre with the current node
If Formal Reference Parameter
get the mre for current MemRefHandle
change MRE to USE
composedWith deref mre
remove current association
associate new mre with the current node
iterate over kid
get the top MemRefHandle
get the current MemRefHandle
steals mre mapped to topMemRefHandle
disassociate mre from topMemRefHandle
get the mre for current MemRefHandle
change MRE to USE
composedWith deref mre
associate new mre with the current node
iterate over kid
get the top MemRefHandle
ILOAD LDA const_sym assert(mtop != OA::MemRefHandle(0));
get the current MemRefHandle
steals mre mapped to topMemRefHandle
disassociate mre from topMemRefHandle
associate mre with the current node
iterate over kid0, RHS
iterate over kid1, LHS
get the top MemRefHandle
ILOAD LDA const_sym assert(mtop != OA::MemRefHandle(0));
get the current MemRefHandle
steals mre mapped to topMemRefHandle
disassociate mre from topMemRefHandle
Change type of mre
associate mre with the current MemRegfHandle
iterate over kid0, RHS
iterate over kid1, LHS
get the top MemRefHandle
get the current MemRefHandle
steals mre mapped to topMemRefHandle
disassociate mre from topMemRefHandle
Remove SubSetRef
remove Deref
associate mre with the current MemRegfHandle
=========== Processing RHS ==============
steals mre mapped to topMemRefHandle
disassociate mre from topMemRefHandle
RHS composedWith AddressOf
iterate over kid0
get the top MemRefHandle
get the current MemRefHandle
steals mre mapped to topMemRefHandle
disassociate mre from topMemRefHandle
associate mre with the current MemRefHandle
Array Indexes are expressions
Array Index Expressions are ExprHandles for which ExprTree exists.
iterate over kid0
Create MemRefExpr for each PARM
If Formal Reference Parameter, then apply AddressOf
composedWith AddressOf
remove current association
associate new mre with the current node
Iterate over the param nodes
get the MemRefHandle
Do not store ExprHandle mStmt2allExprsMap[stmt].erase((OA::irhandle_t)param);
steals mre mapped to topMemRefHandle
Remove AddressOf
remove Param MemRefHandle
remove UnnamedMRE associated with PARM kid
disassociate mre from topMemRefHandle
Remove ExprHandle
Remove AssignPairs
get the Symbol Table Entry
get the MemRefHandle
get associated MemRefExpr
disassociate Old MemRefExpr
Remove AddressOf
Remove SubSetRef
Remove Deref
Change MemRefType = DEF
associate new MRE
Create AddressOf(UnnamedRef) and associate with the kid of the param node.
create AddressOf(UnnamedRef(CALL))
composedWith AddressOf
associate new MemRefExpr
Create Pointer AssignPairs
UnnamedRef is PARM_kid, not PARM
Remove MemRefExpr associated with the last PARM and its kid.
get the MemRefHandle
remove MemRefHandle and mre
For the second PARM child
Remove MemRefHandle and mre again
this is an exprHandle
Iterate over the param nodes
create MemRefExpr
Remove ExprHandle
get the MemRefHandle
steals mre mapped to topMemRefHandle
Remove AddressOf
remove Param MemRefHandle
remove UnnamedMRE associated with PARM kid
Remove ExprHandle
Remove AssignPairs
disassociate mre from topMemRefHandle
Do not store this ExprHandle
get the MemRefHandle
steals mre mapped to topMemRefHandle
Remove ExprHandle for LHS of string assignment
iterate over kid0
get the top MemRefHandle
store ExprHandle
Create DEF UnnamedRef
associate UnnamedRef with the kid
steals mre mapped to topMemRefHandle
Disassociate mre
set UnnamedRef to USE MRE
composedWith AddressOf
associate mre with the current MemRefHandle
Definition at line 1857 of file Open64IRInterface.cpp.
References OA::MemRefExpr::clone(), OA::AddressOf::composeWith(), OA::Deref::composeWith(), OA::SubSetRef::composeWith(), OA::OA_ptr< T >::convert(), createAndMapNamedRef(), OA::MemRefExpr::DEF, findBaseSymbol(), findTopMemRefHandle(), FLD_get_to_field(), FLD_is_pointer(), FLD_name(), getCurrentProcContext(), OA::RefOp::getMemRefExpr(), IntrinsicInfo::intrinsicBaseName(), OA::MemRefExpr::isaRefOp(), OA::MemRefExpr::isaSubSetRef(), OA::MemRefExpr::isaUnnamed(), IntrinsicInfo::isIntrinsic(), isRefParam(), KIND_POINTER, LANG_F77, LANG_F90, Language, mStmt2allExprsMap, NULL, OPERATOR_has_field_id(), OPERATOR_is_load(), OPERATOR_is_non_scf(), OPERATOR_is_scf(), OPERATOR_is_store(), OPR_ADD, OPR_ARRAY, OPR_ARRAYEXP, OPR_ARRSECTION, OPR_BLOCK, OPR_CALL, OPR_CASEGOTO, OPR_COMPLEX, OPR_CONST, OPR_CVT, OPR_DIV, OPR_DO_LOOP, OPR_EQ, OPR_GE, OPR_GOTO, OPR_GT, OPR_IF, OPR_ILOAD, OPR_INTCONST, OPR_INTRINSIC_CALL, OPR_INTRINSIC_OP, OPR_ISTORE, OPR_LABEL, OPR_LAND, OPR_LDA, OPR_LDID, OPR_LDMA, OPR_LE, OPR_LIOR, OPR_LNOT, OPR_LT, OPR_MAX, OPR_MIN, OPR_MLOAD, OPR_MPY, OPR_MSTORE, OPR_NE, OPR_NEG, OPR_PAREN, OPR_PARM, OPR_PSTID, OPR_PSTORE, OPR_RECIP, OPR_SRCTRIPLET, OPR_STID, OPR_STRCTFLD, OPR_SUB, OPR_SWITCH, OPR_TRUNC, OA::MemRefExpr::setMemRefType(), sMemref2mreSetMap, sStmt2allMemRefsMap, ST_is_constant(), ST_is_my_pointer(), ST_name(), ST_type(), TY_kind(), OA::MemRefExpr::USE, WN2F_Can_Assign_Types(), WN_field_id(), WN_GetBaseObjType(), WN_GetRefObjType(), WN_intrinsic(), WN_kid(), WN_kid0(), WN_kid1(), WN_kid_count(), WN_load_offset(), WN_operator(), and WN_st().
Referenced by getAssignPairIterator(), and getMemRefIterator().
Definition at line 2888 of file Open64IRInterface.cpp.
References DBGMSG_PUB, NULL, OPR_ADD, OPR_ARRAY, OPR_ARRAY_CONSTRUCT, OPR_ARRAYEXP, OPR_ARRSECTION, OPR_BLOCK, OPR_CALL, OPR_COMPLEX, OPR_CONST, OPR_CVT, OPR_DIV, OPR_EQ, OPR_GE, OPR_GT, OPR_IF, OPR_ILOAD, OPR_INTCONST, OPR_INTRINSIC_CALL, OPR_INTRINSIC_OP, OPR_LAND, OPR_LDA, OPR_LDBITS, OPR_LDID, OPR_LDMA, OPR_LE, OPR_LIOR, OPR_LNOT, OPR_LT, OPR_MAX, OPR_MIN, OPR_MLOAD, OPR_MPY, OPR_NE, OPR_NEG, OPR_PAREN, OPR_PARM, OPR_PSTID, OPR_RECIP, OPR_STID, OPR_STRCTFLD, OPR_SUB, OPR_TRUNC, WN_intrinsic(), WN_intrinsic_name(), WN_kid0(), WN_kid_count(), WN_operator(), and WN_st().
Referenced by findAllMemRefsAndMapToMemRefExprs().
|
private |
Definition at line 4190 of file Open64IRInterface.cpp.
References IntrinsicInfo::intrinsicBaseName(), OPR_ARRAY, OPR_ARRAYEXP, OPR_ARRSECTION, OPR_CALL, OPR_ILOAD, OPR_INTRINSIC_CALL, OPR_ISTORE, OPR_LDA, OPR_LDID, OPR_MLOAD, OPR_MSTORE, OPR_PARM, OPR_PSTID, OPR_PSTORE, OPR_STID, OPR_STRCTFLD, sMemref2mreSetMap, WN_intrinsic(), WN_kid0(), WN_kid1(), and WN_operator().
Referenced by findAllMemRefsAndMapToMemRefExprs().
|
virtual |
Return a list of all the memory reference handles that appear in the given statement.
Return a list of all the memory reference handles that appear in the given statement. User is responsible for deleting the list
Implements OA::DUG::DUGIRInterface.
Definition at line 3299 of file Open64IRInterface.cpp.
References OA::MemRefHandleIterator::current(), getMemRefIterator(), OA::MemRefHandleIterator::isValid(), and setCurrentProcToProcContext().
Referenced by getDiffUseMREs(), and getUseMemRefs().
|
virtual |
Given a statement return a list to the pairs of target MemRefHandle, ExprHandle where target = expr
Implements OA::Activity::ActivityIRInterface.
Definition at line 3464 of file Open64IRInterface.cpp.
References findAllMemRefsAndMapToMemRefExprs(), OA::IRHandle::hval(), and sStmt2allMemRefsMap.
|
virtual |
Given a procedure call create a memory reference expression to describe that call. For example, a normal call is a NamedRef. A call involving a function ptr is a Deref.
Implements OA::CallGraph::CallGraphIRInterface.
Definition at line 3142 of file Open64IRInterface.cpp.
References getSymHandle(), and OA::MemRefExpr::USE.
|
virtual |
Get IRCallsiteParamIterator for a callsite. Iterator visits actual parameters in called order.
Implements OA::Activity::ActivityIRInterface.
Definition at line 1055 of file Open64IRInterface.cpp.
References OA::IRHandle::hval(), and setCurrentProcToProcContext().
Referenced by getMemRefIterator(), and getParamBindPtrAssignIterator().
|
virtual |
Return an iterator over all of the callsites in a given stmt.
Implements OA::Activity::ActivityIRInterface.
Definition at line 1041 of file Open64IRInterface.cpp.
References OA::IRHandle::hval(), and setCurrentProcToProcContext().
Referenced by getMemRefIterator().
|
virtual |
Given a statement, return its CFG::IRStmtType.
Implements OA::CFG::CFGIRInterface.
Definition at line 1270 of file Open64IRInterface.cpp.
References OA::CFG::ALTERNATE_PROC_ENTRY, OA::CFG::COMPOUND, dump_wn(), OA::CFG::END_TESTED_LOOP, OA::IRHandle::hval(), OA::CFG::LOOP, OPERATOR_name(), OPR_AFFIRM, OPR_AGOTO, OPR_ALTENTRY, OPR_ASM_STMT, OPR_BACKWARD_BARRIER, OPR_BLOCK, OPR_CALL, OPR_COMMENT, OPR_COMPGOTO, OPR_DO_LOOP, OPR_DO_WHILE, OPR_EVAL, OPR_FALSEBR, OPR_FORWARD_BARRIER, OPR_GOTO, OPR_ICALL, OPR_IF, OPR_ILDBITS, OPR_ILOAD, OPR_ILOADX, OPR_INTERFACE, OPR_INTRINSIC_CALL, OPR_IO, OPR_ISTBITS, OPR_ISTORE, OPR_ISTOREX, OPR_LABEL, OPR_LDBITS, OPR_LDID, OPR_MLOAD, OPR_MSTORE, OPR_NULLIFY, OPR_PICCALL, OPR_PRAGMA, OPR_PREFETCH, OPR_PREFETCHX, OPR_PSTID, OPR_PSTORE, OPR_RETURN, OPR_RETURN_VAL, OPR_STBITS, OPR_STID, OPR_SWITCH, OPR_TRUEBR, OPR_USE, OPR_VFCALL, OPR_WHERE, OPR_WHILE_DO, OPR_XPRAGMA, OA::CFG::RETURN, OA::CFG::SIMPLE, OA::CFG::STRUCT_TWOWAY_CONDITIONAL, OA::CFG::UNCONDITIONAL_JUMP, OA::CFG::UNCONDITIONAL_JUMP_I, OA::CFG::USTRUCT_MULTIWAY_CONDITIONAL, OA::CFG::USTRUCT_TWOWAY_CONDITIONAL_F, OA::CFG::USTRUCT_TWOWAY_CONDITIONAL_T, and WN_operator().
Referenced by fortTkSupport::MassageOACFGIntoXAIFCFG().
OA::ExprHandle Open64IRInterface::getCondition | ( | OA::StmtHandle | h) |
Definition at line 1557 of file Open64IRInterface.cpp.
References OA::IRHandle::hval(), OPR_FALSEBR, OPR_IF, OPR_TRUEBR, WN_if_test, WN_kid0(), and WN_operator().
|
virtual |
Given a ConstSymHandle return an abstraction representing the constant value
Implements OA::ReachConsts::ReachConstsIRInterface.
Definition at line 3549 of file Open64IRInterface.cpp.
References getConstValBasicFromST(), OA::IRHandle::hval(), and setCurrentProcToProcContext().
|
virtual |
Given a ConstValHandle return an abstraction representing the constant value User must free the ConstValBasicInterface
Implements OA::ReachConsts::ReachConstsIRInterface.
Definition at line 3557 of file Open64IRInterface.cpp.
References getConstValBasicFromST(), OA::IRHandle::hval(), NULL, OPR_CONST, OPR_INTCONST, setCurrentProcToProcContext(), val, WN_const_val(), WN_operator(), and WN_st().
|
virtual |
Temporary routine for testing ReachConsts.
Implements OA::ReachConsts::ReachConstsIRInterface.
Definition at line 3633 of file Open64IRInterface.cpp.
|
private |
Definition at line 4510 of file Open64IRInterface.cpp.
References MTYPE_is_integral, NULL, ST_tcon_val(), Targ_To_Host(), TCON_ty, and val.
Referenced by getConstValBasic().
|
staticprivate |
Definition at line 5145 of file Open64IRInterface.cpp.
References Current_PU_Info.
Referenced by createAndMapNamedRef(), findAllMemRefsAndMapToMemRefExprs(), getLocation(), and isRefParam().
|
virtual |
Return a list of all the target memory reference handles that appear in the given statement.
Return a list of all def memory reference handles that appear in the given statement. User is responsible for deleting the list
================================================ only map those MREs that do not involve an addressOf operation
Implements OA::Activity::ActivityIRInterface.
Definition at line 3252 of file Open64IRInterface.cpp.
References OA::OA_ptr< T >::convert(), OA::MemRefHandleIterator::current(), getMemRefIterator(), OA::MemRefExpr::isaAddressOf(), OA::MemRefExpr::isaRefOp(), OA::MemRefExpr::isDef(), OA::MemRefHandleIterator::isValid(), setCurrentProcToProcContext(), and sMemref2mreSetMap.
|
virtual |
Get an Iterator over Def MREs.
Get an Iterator over Use MREs.
================================================ only map those MREs that do not involve an addressOf operation
Implements OA::DUG::DUGIRInterface.
Definition at line 4028 of file Open64IRInterface.cpp.
References OA::OA_ptr< T >::convert(), OA::MemRefHandleIterator::current(), getMemRefIterator(), OA::MemRefExpr::isaAddressOf(), OA::MemRefExpr::isaRefOp(), OA::MemRefExpr::isDef(), OA::MemRefHandleIterator::isValid(), and sMemref2mreSetMap.
|
virtual |
Return an iterator over all dependent MemRefExpr for given proc.
Return an iterator over all dependent MemRefExpr's for given proc.
Get MRE for the Independent Variable
Implements OA::Activity::ActivityIRInterface.
Definition at line 3195 of file Open64IRInterface.cpp.
References convertSymToMemRefExpr(), currentProc(), OA::IRHandle::hval(), NULL, OPR_PRAGMA, PU_Info_tree_ptr, WN_first(), WN_func_pragmas, WN_next(), WN_operator(), WN_pragma(), WN_PRAGMA_OPENAD_DEPENDENT, and WN_st().
OA::OA_ptr< OA::MemRefExprIterator > Open64IRInterface::getDiffUseMREs | ( | OA::StmtHandle | stmt) |
Get an Iterator over DiffUse MREs.
Get an Iterator over Use MREs.
getDiffUses
Do not process Index Expressions.
dont need pointer expressions
Definition at line 4070 of file Open64IRInterface.cpp.
References OA::OA_ptr< T >::convert(), OA::MREIteratorClass< T >::current(), OA::MemRefHandleIterator::current(), end, getAllMemRefs(), getMemRefExprIterator(), OA::MemRefExpr::isaAddressOf(), OA::MemRefExpr::isaRefOp(), OA::MemRefExpr::isUse(), OA::MREIteratorClass< T >::isValid(), and OA::MemRefHandleIterator::isValid().
OA::OA_ptr< OA::ExprHandleIterator > Open64IRInterface::getExprHandleIterator | ( | OA::StmtHandle | stmt) |
Definition at line 3453 of file Open64IRInterface.cpp.
References Open64IRExprHandleIterator.
|
virtual |
Given an ExprHandle, return an ExprTree*.
Given an ExprHandle, return an ExprTree* The user must free the expr tree
Implements OA::Activity::ActivityIRInterface.
Definition at line 3771 of file Open64IRInterface.cpp.
References createExprTree(), OA::IRHandle::hval(), and setCurrentProcToProcContext().
Referenced by DumpExprTree(), and getParamBindPtrAssignIterator().
|
virtual |
Given a compound statement, return an IRRegionStmtIterator for the statements. A compound is a list of statements.
Implements OA::CFG::CFGIRInterface.
Definition at line 1410 of file Open64IRInterface.cpp.
References OA::IRHandle::hval(), and WN_first().
|
virtual |
return the formal parameter that an actual parameter is associated with.
return the formal parameter that an actual parameter is associated with. 'call' is a handle to the call node; 'param' is the actual parameter within the call node that we want info about.
PLM Important node regarding Optional Parameters:
Reference :http://www.sesp.cse.clrc.ac.uk/Publications/felib90_design/design/node6.html
Occasionally, not all arguments are required every time a procedure is used. Therefore some arguments may be specified as optional, using the OPTIONAL attribute:
SUBROUTINE sub1(a, b, c, d) INTEGER, INTENT(INOUT):: a, b REAL, INTENT(IN), OPTIONAL :: c, d ... END SUBROUTINE sub1
Here a and b are always required when calling sub1. The arguments c and d are optional and so sub1 may be referenced by:
CALL sub1( a, b ) CALL sub1( a, b, c, d ) CALL sub1( a, b, c )
Note that the order in which arguments appear is important (unless keyword arguments are used) so that it is not possible to call sub1 with argument d but no argument c.
CALL sub1( a, b, d ) ! illegal
Optional arguments must come after all arguments associated by position in a referencing statement and require an explicit interface.
PLM : Places where explicit formal to actual matching needed.
For functions excluding following cases:
Return type is one of the member of formal Parameter list. It appears as the first argument in the formal Parameter list. We need to match actual to formal starting from ParmIdx=1.
In case of Subroutine, we do not have Return-Type and therefore, We need to match actual to formal starting from ParmIdx=0.
The algorithm is as Follows:
In the list of formal argument of callee proc,
PLM more details: in case of Indirect Function Calls (e.g. using function pointers), function pointer is also one of the member of parameter list.
Implements OA::DataFlow::ParamBindingsIRInterface.
Definition at line 1108 of file Open64IRInterface.cpp.
References OA::IRHandle::hval(), NULL, PU_Info_tree_ptr, PU_SetGlobalState(), setCurrentProcToProcContext(), ST_is_return_var(), WN_formal, WN_kid(), WN_kid_count(), WN_num_formals, and WN_st().
Referenced by isPassByReference().
|
virtual |
Return the symbol handle for the nth formal parameter to proc Number starts at 0 and implicit parameters should be given a number in the order as well. This number should correspond to the number provided in getParamBindPtrAssign pairs Should return SymHandle(0) if there is no formal parameter for given num
Implements OA::DUG::DUGIRInterface.
Definition at line 3114 of file Open64IRInterface.cpp.
References OA::IRHandle::hval(), PU_Info_tree_ptr, PU_SetGlobalState(), WN_formal, WN_num_formals, and WN_st().
|
virtual |
Return an iterator over all independent MemRefExpr for given proc.
Return an iterator over all independent locations for given proc.
Get MRE for the Independent Variable
Implements OA::Activity::ActivityIRInterface.
Definition at line 3158 of file Open64IRInterface.cpp.
References convertSymToMemRefExpr(), currentProc(), OA::IRHandle::hval(), NULL, OPR_PRAGMA, PU_Info_tree_ptr, WN_first(), WN_func_pragmas, WN_next(), WN_operator(), WN_pragma(), WN_PRAGMA_OPENAD_INDEPENDENT, and WN_st().
|
virtual |
Given a statement, return a label (or StmtHandle(0) if there is no label associated with the statement).
Implements OA::CFG::CFGIRInterface.
Definition at line 1397 of file Open64IRInterface.cpp.
References OA::IRHandle::hval(), OPR_LABEL, WN_label_number(), and WN_operator().
|
virtual |
get the operation type and returns a LinOpType
gets the operation type and returns a LinOpType
Implements OA::Linearity::LinearityIRInterface.
Definition at line 3645 of file Open64IRInterface.cpp.
References OA::IRHandle::hval(), OPR_ADD, OA::Linearity::OPR_ADDSUB, OPR_CALL, OPR_DIV, OPR_INTRINSIC_CALL, OPR_INTRINSIC_OP, OA::Linearity::OPR_LINEAR, OPR_MPY, OA::Linearity::OPR_MPYDIV, OPR_NEG, OA::Linearity::OPR_NONLINEAR, OPR_SUB, setCurrentProcToProcContext(), and WN_operator().
|
virtual |
For the given symbol create a Location that indicates statically overlapping locations and information about whether the location is local or not, local means visible in only this procedure
For the given symbol create a Location that indicates statically overlapping locations and information about whether the location is local or not, local means visible in only this procedure If the symbol is not visible within the current procedure then a null location is returned. FIXME: does Fortran90 allow nested procedures? if so then variables visible to a nested procedure should not be labeled local
Implements OA::DUG::DUGIRInterface.
Definition at line 3804 of file Open64IRInterface.cpp.
References OA::NamedLoc::addFullOverlap(), CLASS_VAR, Current_PU_Info, CURRENT_SYMTAB, debug, getCurrentProcContext(), OA::IRHandle::hval(), NULL, PU_Info_child, setCurrentProcContext(), setCurrentProcToProcContext(), sFQNToProcToLocalSymMap, sGlobalVarMap, sProcToSymRefSetMap, sSymToFQNMap, ST_is_in_module(), ST_level(), ST_sym_class(), Stab_Is_Based_At_Common_Block(), and toString().
OA::ExprHandle Open64IRInterface::getLoopCondition | ( | OA::StmtHandle | h) |
Definition at line 1498 of file Open64IRInterface.cpp.
References OA::IRHandle::hval(), OPR_DO_LOOP, OPR_DO_WHILE, OPR_WHILE_DO, WN_end, WN_operator(), and WN_while_test.
|
virtual |
Given a loop statement, return the increment statement.
Implements OA::CFG::CFGIRInterface.
Definition at line 1468 of file Open64IRInterface.cpp.
References OA::IRHandle::hval(), OPR_DO_LOOP, OPR_WHILE_DO, WN_operator(), and WN_step.
|
virtual |
Given a MemRefHandle return an iterator over MemRefExprs that describe this memory reference
Given a MemRefHandle return an iterator over all MemRefExprs that describe this memory reference
Implements OA::DUG::DUGIRInterface.
Definition at line 4118 of file Open64IRInterface.cpp.
References setCurrentProcToProcContext(), and sMemref2mreSetMap.
Referenced by getDiffUseMREs(), and getParamBindPtrAssignIterator().
OA::OA_ptr< OA::MemRefHandleIterator > Open64IRInterface::getMemRefIterator | ( | OA::StmtHandle | h) |
Given a statement return an iterator over all memory references During its creation it also sets up sStmt2allMemRefs and memRefs2mreSetMap.
Definition at line 1812 of file Open64IRInterface.cpp.
References OA::ExprHandleIterator::current(), OA::CallHandleIterator::current(), findAllMemRefsAndMapToMemRefExprs(), getCallsiteParams(), getCallsites(), OA::IRHandle::hval(), OA::ExprHandleIterator::isValid(), OA::CallHandleIterator::isValid(), Open64IRMemRefIterator, setCurrentProcToProcContext(), sParamToCallMap, and sStmt2allMemRefsMap.
Referenced by getAllMemRefs(), getDefMemRefs(), getDefMREs(), and getUseMREs().
|
virtual |
Given a structured multi-way branch, return an IRRegionStmtIterator for the body corresponding to default/catchall case.
Implements OA::CFG::CFGIRInterface.
Definition at line 1613 of file Open64IRInterface.cpp.
References NULL.
|
virtual |
Return an iterator over <int, MemRefExpr> pairs where the integer represents which formal parameter and the MemRefExpr describes the corresponding actual argument.
skip over Optional Parameters
Implements OA::Alias::AliasIRInterface.
Definition at line 3050 of file Open64IRInterface.cpp.
References OA::ExprTree::acceptVisitor(), OA::OA_ptr< T >::convert(), OA::MREIteratorClass< T >::current(), OA::ExprHandleIterator::current(), getCallsiteParams(), getExprTree(), OA::EvalToMemRefVisitor::getMemRef(), getMemRefExprIterator(), OA::NamedRef::getSymHandle(), Open64ParamBindPtrAssignIterator::insertParamBindPair(), OA::MemRefExpr::isaAddressOf(), OA::MemRefExpr::isaNamed(), OA::MemRefExpr::isaRefOp(), OA::EvalToMemRefVisitor::isMemRef(), isRefParam(), OA::MREIteratorClass< T >::isValid(), OA::ExprHandleIterator::isValid(), and setCurrentProcToProcContext().
|
virtual |
Given the callee symbol returns the callee proc handle.
Implements OA::DUG::DUGIRInterface.
Definition at line 4147 of file Open64IRInterface.cpp.
Referenced by isPassByReference().
|
virtual |
Given a ProcHandle, return its SymHandle.
Implements OA::CallGraph::CallGraphIRInterface.
Definition at line 1021 of file Open64IRInterface.cpp.
References Current_PU_Info, OA::IRHandle::hval(), NULL, PU_Info_proc_sym, PU_SetGlobalState(), and ST_ptr().
Referenced by getSymHandle().
|
virtual |
Implements OA::DUG::DUGIRInterface.
Definition at line 3517 of file Open64IRInterface.cpp.
|
virtual |
If this is a PTR_ASSIGN_STMT then return an iterator over MemRefHandle pairs where there is a source and target such that target
Implements OA::Alias::AliasIRInterface.
Definition at line 3527 of file Open64IRInterface.cpp.
OA::OA_ptr< OA::IRSymIterator > Open64IRInterface::getRefSymIterator | ( | OA::ProcHandle | h) |
Given a subprogram return an IRSymIterator for all symbols that are visible in the subprogram Given a subprogram return an IRSymIterator for all symbols that are referenced in the subprogram
Definition at line 3240 of file Open64IRInterface.cpp.
References OA::IRHandle::hval().
Referenced by initProcToSymRefSetMap().
|
virtual |
Note: This routine uses sSymToVarStringMap, which is initialized in initProcContext
Reimplemented from OA::SideEffect::InterSideEffectIRInterfaceDefault.
Definition at line 3698 of file Open64IRInterface.cpp.
References currentProc(), OA::SideEffect::SideEffectStandard::emptyDEF(), OA::SideEffect::SideEffectStandard::emptyLDEF(), OA::SideEffect::SideEffectStandard::emptyLMOD(), OA::SideEffect::SideEffectStandard::emptyLREF(), OA::SideEffect::SideEffectStandard::emptyLUSE(), OA::SideEffect::SideEffectStandard::emptyMOD(), OA::SideEffect::SideEffectStandard::emptyREF(), OA::SideEffect::SideEffectStandard::emptyUSE(), setCurrentProcToProcContext(), and sSymToVarStringMap.
|
virtual |
given a symbol return the size in bytes of that symbol
Implements OA::Activity::ActivityIRInterface.
Definition at line 3229 of file Open64IRInterface.cpp.
References OA::IRHandle::hval(), setCurrentProcToProcContext(), ST_type(), and TY_size().
|
virtual |
Given a structured multi-way branch, return the condition expression corresponding to target 'bodyIndex'. The n targets are indexed [0..n-1].
Implements OA::CFG::CFGIRInterface.
Definition at line 1622 of file Open64IRInterface.cpp.
OA::ExprHandle Open64IRInterface::getSMultiTest | ( | OA::StmtHandle | h) |
Definition at line 1630 of file Open64IRInterface.cpp.
OA::StmtHandle Open64IRInterface::getStmtFromMemRef | ( | OA::MemRefHandle | h) |
Return a stmt handle for the given memory reference handle.
Definition at line 3602 of file Open64IRInterface.cpp.
References setCurrentProcToProcContext(), and sMemRef2StmtMap.
|
virtual |
Given a subprogram return an IRStmtIterator for the entire subprogram
Implements OA::Activity::ActivityIRInterface.
Definition at line 1013 of file Open64IRInterface.cpp.
|
inlinevirtual |
Given a procedure return associated SymHandle.
Implements OA::Alias::AliasIRInterface.
Definition at line 765 of file Open64IRInterface.hpp.
References getProcSymHandle().
Referenced by getCallMemRefExpr(), initCallSymToProcMap(), isPassByReference(), and toString().
|
virtual |
get callee SymHandle from CallHandle (outermost or first, if multiple calls)
Implements OA::DUG::DUGIRInterface.
Definition at line 1234 of file Open64IRInterface.cpp.
References OA::IRHandle::hval(), NULL, OPERATOR_has_sym(), WN_operator(), and WN_st().
|
virtual |
Given an unstructured two-way branch, return the label of the target statement. The second parameter is currently unused.
Implements OA::CFG::CFGIRInterface.
Definition at line 1652 of file Open64IRInterface.cpp.
References OA::IRHandle::hval(), OPR_FALSEBR, OPR_GOTO, OPR_TRUEBR, WN_label_number(), and WN_operator().
|
virtual |
Given an unstructured multi-way branch, return label of the target corresponding to the optional default/catchall case. Return 0 if there is no default target.
Implements OA::CFG::CFGIRInterface.
Definition at line 1735 of file Open64IRInterface.cpp.
References OA::IRHandle::hval(), OPR_COMPGOTO, OPR_GOTO, OPR_SWITCH, WN_kid2(), WN_label_number(), WN_operator(), and WN_switch_default.
|
virtual |
Implements OA::CFG::CFGIRInterface.
Definition at line 1762 of file Open64IRInterface.cpp.
References OA::IRHandle::hval(), NULL, OPR_COMPGOTO, WN_first(), WN_kid1(), WN_next(), WN_operator(), and WN_switch_table.
|
virtual |
Given an unstructured multi-way branch, return the label of the target statement at 'targetIndex'. The n targets are indexed [0..n-1].
Implements OA::CFG::CFGIRInterface.
Definition at line 1690 of file Open64IRInterface.cpp.
References OA::IRHandle::hval(), NULL, OPR_BLOCK, OPR_CASEGOTO, OPR_COMPGOTO, OPR_GOTO, OPR_SWITCH, WN_first(), WN_kid1(), WN_label_number(), WN_next(), WN_operator(), and WN_switch_table.
OA::ExprHandle Open64IRInterface::getUMultiTest | ( | OA::StmtHandle | h) |
Definition at line 1788 of file Open64IRInterface.cpp.
References OA::IRHandle::hval(), OPR_SWITCH, WN_operator(), and WN_switch_test.
|
virtual |
Return a list of all the source and sub memory reference handles that appear in the given statement.
Return a list of all use memory reference handles that appear in the given statement. User is responsible for deleting the list
================================================ only map those MREs that do not involve an addressOf operation
Implements OA::Activity::ActivityIRInterface.
Definition at line 3326 of file Open64IRInterface.cpp.
References OA::OA_ptr< T >::convert(), OA::MemRefHandleIterator::current(), getAllMemRefs(), OA::MemRefExpr::isaAddressOf(), OA::MemRefExpr::isaRefOp(), OA::MemRefExpr::isUse(), OA::MemRefHandleIterator::isValid(), setCurrentProcToProcContext(), and sMemref2mreSetMap.
|
virtual |
Get an Iterator over Use MREs.
Implements OA::DUG::DUGIRInterface.
Definition at line 3988 of file Open64IRInterface.cpp.
References OA::MemRefExpr::acceptVisitor(), OA::MemRefHandleIterator::current(), Open64IRInterface::FindUseMREVisitor::getAllUseMREs(), getMemRefIterator(), OA::MemRefHandleIterator::isValid(), and sMemref2mreSetMap.
|
static |
Definition at line 5291 of file Open64IRInterface.cpp.
References DBGMSG_PUB, name, OPR_ICALL, sCallSymToProc, ST_name(), WN_has_sym, WN_operator(), and WN_st().
Referenced by Open64IRCallsiteIterator::build_func_call_list().
|
static |
Definition at line 5287 of file Open64IRInterface.cpp.
References ourIgnoreBlackBoxRoutines.
Referenced by Open64IRCallsiteIterator::build_func_call_list().
|
staticprivate |
creates a mapping of call symbol handles to the associated proc handle
Definition at line 5079 of file Open64IRInterface.cpp.
References Open64IRProcIterator::current(), getSymHandle(), Open64IRProcIterator::isValid(), and Open64IRProcIterator::reset().
Referenced by initContextState().
|
static |
User is responsible for doing this. It should not be part of.
Definition at line 4161 of file Open64IRInterface.cpp.
References initCallSymToProcMap(), initProcContext(), initProcToSymRefSetMap(), and sContextInit.
Referenced by whirl2xaif::Whirl2Xaif::translateIR().
|
staticprivate |
maps all handles to a procedure handle that indicates their context assumes that all handles except for SymHandle's and ProcHandle's are only valid in one procedure context.
Definition at line 5188 of file Open64IRInterface.cpp.
References WN_TREE_CONTAINER< order >::begin(), CLASS_VAR, create_fqn(), createCharStarForST(), Open64IRProcIterator::current(), CURRENT_SYMTAB, debug, WN_TREE_CONTAINER< order >::end(), For_all(), GLOBAL_SYMTAB, OA::IRHandle::hval(), Open64IRProcIterator::isValid(), fully_qualified_name::mContext, fully_qualified_name::mVar, NULL, OPCODE_name(), PU_Info_proc_sym, PU_Info_tree_ptr, Open64IRProcIterator::reset(), sContextInit, sGlobalVarMap, sProcContext, sProgContext, sSymToFQNMap, sSymToVarStringMap, ST_is_in_module(), ST_name(), ST_ptr(), ST_sym_class(), St_Table, Stab_Is_Based_At_Common_Block(), toString(), WN_TREE_ITER_base< WHIRL >::Wn(), and WN_opcode().
Referenced by initContextState().
|
staticprivate |
creates a mapping of procedure handles to the set of symbols referenced in that procedure
get a set of all referenced symbols in this procedure Using this to approximate what is visible in F90 because Open64 module scoping is messed up and all module variables are put in the global scope
Definition at line 5101 of file Open64IRInterface.cpp.
References Open64IRProcIterator::current(), OA::SymHandleIterator::current(), getRefSymIterator(), Open64IRProcIterator::isValid(), OA::SymHandleIterator::isValid(), Open64IRProcIterator::reset(), and sProcToSymRefSetMap.
Referenced by initContextState().
|
virtual |
Given a structured multi-way branch, return true if the cases have implied break semantics. For example, this method would return false for C since one case will fall-through to the next if there is no explicit break statement. Matlab, on the other hand, implicitly exits the switch statement once a particular case has executed, so this method would return true.
Implements OA::CFG::CFGIRInterface.
Definition at line 1597 of file Open64IRInterface.cpp.
|
virtual |
Given a structured multi-way branch, return true if the body corresponding to target 'bodyIndex' is the default/catchall/ case.
Implements OA::CFG::CFGIRInterface.
Definition at line 1605 of file Open64IRInterface.cpp.
|
virtual |
returns true if given symbol is a parameter
Implements OA::DataFlow::ParamBindingsIRInterface.
Definition at line 3780 of file Open64IRInterface.cpp.
References CURRENT_SYMTAB, OA::IRHandle::hval(), SCLASS_FORMAL, SCLASS_FORMAL_REF, ST_level(), and ST_sclass().
|
private |
Definition at line 4535 of file Open64IRInterface.cpp.
References getFormalForActual(), getProcHandle(), getSymHandle(), isRefParam(), setCurrentProcToProcContext(), sParamToCallMap, and sProcContext.
bool Open64IRInterface::isRefParam | ( | OA::SymHandle | sym) |
returns true if given symbol is a pass by reference parameter
Definition at line 1063 of file Open64IRInterface.cpp.
References getCurrentProcContext(), OA::IRHandle::hval(), SCLASS_FORMAL, SCLASS_FORMAL_REF, setCurrentProcContext(), setCurrentProcToProcContext(), ST_is_intent_in_argument(), ST_is_intent_out_argument(), and ST_sclass().
Referenced by convertSymToMemRefExpr(), findAllMemRefsAndMapToMemRefExprs(), getParamBindPtrAssignIterator(), and isPassByReference().
|
virtual |
Given a loop statement, return an IRRegionStmtIterator for the loop body.
Implements OA::CFG::CFGIRInterface.
Definition at line 1425 of file Open64IRInterface.cpp.
References OA::IRHandle::hval(), OPR_DO_LOOP, OPR_DO_WHILE, OPR_WHILE_DO, WN_do_body, WN_operator(), and WN_while_body.
|
virtual |
Given a loop statement, return the loop header statement. This would be the initialization statement in a C 'for' loop, for example.
Implements OA::CFG::CFGIRInterface.
Definition at line 1451 of file Open64IRInterface.cpp.
References OA::IRHandle::hval(), OPR_DO_LOOP, OPR_WHILE_DO, WN_operator(), and WN_start.
|
virtual |
Given a loop statement, return:
True: If the number of loop iterations is defined at loop entry (i.e. Fortran semantics). This causes the CFG builder to add the loop statement representative to the header node so that definitions from inside the loop don't reach the condition and increment specifications in the loop statement.
False: If the number of iterations is not defined at entry (i.e. C semantics), we add the loop statement to a node that is inside the loop in the CFG so definitions inside the loop will reach uses in the conditional test. For C style semantics, the increment itself may be a separate statement. if so, it will appear explicitly at the bottom of the loop.
Implements OA::CFG::CFGIRInterface.
Definition at line 1485 of file Open64IRInterface.cpp.
|
virtual |
Given a structured multi-way branch, return an IRRegionStmtIterator for the body corresponding to target 'bodyIndex'. The n targets are indexed [0..n-1].
Implements OA::CFG::CFGIRInterface.
Definition at line 1588 of file Open64IRInterface.cpp.
References NULL.
|
virtual |
Given a structured multi-way branch, return the number of cases. The count does not include the default/catchall case.
Implements OA::CFG::CFGIRInterface.
Definition at line 1580 of file Open64IRInterface.cpp.
|
virtual |
Given an unstructured multi-way branch, return the number of targets. The count does not include the optional default/catchall case.
Implements OA::CFG::CFGIRInterface.
Definition at line 1673 of file Open64IRInterface.cpp.
References OA::IRHandle::hval(), OPR_COMPGOTO, OPR_SWITCH, WN_num_entries(), and WN_operator().
|
virtual |
Given a ProcHandle, return an IRRegionStmtIterator* for the procedure. The user must free the iterator's memory via delete.
Implements OA::CFG::CFGIRInterface.
Definition at line 1250 of file Open64IRInterface.cpp.
References currentProc(), OA::IRHandle::hval(), OPR_FUNC_ENTRY, PU_Info_tree_ptr, WN_func_body, and WN_operator().
|
virtual |
temporary routine to find things out
FIXME: temporary routine to find things out should be removed after testing
Implements OA::ReachConsts::ReachConstsIRInterface.
Definition at line 3591 of file Open64IRInterface.cpp.
References OA::IRHandle::hval(), setCurrentProcToProcContext(), and WN_operator().
|
inlinevirtual |
Are return statements allowed.
Implements OA::CFG::CFGIRInterface.
Definition at line 681 of file Open64IRInterface.hpp.
|
inlinestatic |
add a new IRHandle to the given procedure after context has already been initialized with initProcContext
Definition at line 1108 of file Open64IRInterface.hpp.
References sProcContext.
Referenced by fortTkSupport::AddControlFlowEndTags().
|
staticprivate |
Definition at line 5150 of file Open64IRInterface.cpp.
References Current_PU_Info, OA::IRHandle::hval(), NULL, and PU_SetGlobalState().
Referenced by getLocation(), and isRefParam().
|
staticprivate |
Determines the current context for given handle and makes sure that Open64 is properly set up to answer the query on the handle
Definition at line 5126 of file Open64IRInterface.cpp.
References Current_PU_Info, OA::IRHandle::hval(), NULL, OPCODE_name(), PU_SetGlobalState(), sProcContext, and WN_opcode().
Referenced by dump(), getAllMemRefs(), getCallsiteParams(), getCallsites(), getConstValBasic(), getDefMemRefs(), getExprTree(), getFormalForActual(), getLinearityOpType(), getLocation(), getMemRefExprIterator(), getMemRefIterator(), getParamBindPtrAssignIterator(), getSideEffect(), getSizeInBytes(), getStmtFromMemRef(), getUseMemRefs(), isPassByReference(), isRefParam(), returnOpEnumValInt(), and toString().
|
static |
Definition at line 5283 of file Open64IRInterface.cpp.
References ourIgnoreBlackBoxRoutines.
Referenced by whirl2xaif::Whirl2Xaif::translateIR().
|
virtual |
Implements OA::IRHandlesIRInterface.
Definition at line 577 of file Open64IRInterface.cpp.
References getSymHandle(), and OA::IRHandle::hval().
Referenced by dump(), getLocation(), initProcContext(), and whirl2xaif::xlate_SideEffectEntry().
|
virtual |
Implements OA::IRHandlesIRInterface.
Definition at line 592 of file Open64IRInterface.cpp.
References DumpWN(), OA::IRHandle::hval(), and setCurrentProcToProcContext().
|
virtual |
Implements OA::IRHandlesIRInterface.
Definition at line 607 of file Open64IRInterface.cpp.
References DumpWN(), OA::IRHandle::hval(), and setCurrentProcToProcContext().
|
virtual |
Implements OA::IRHandlesIRInterface.
Definition at line 622 of file Open64IRInterface.cpp.
References DumpWN(), OA::IRHandle::hval(), OPCODE_name(), OPR_ABS, OPR_ADD, OPR_ASHR, OPR_BAND, OPR_BIOR, OPR_BNOT, OPR_BXOR, OPR_CEIL, OPR_CVT, OPR_CVTL, OPR_DIV, OPR_EQ, OPR_FLOOR, OPR_GE, OPR_GT, OPR_LAND, OPR_LE, OPR_LIOR, OPR_LNOT, OPR_LSHR, OPR_LT, OPR_MADD, OPR_MAX, OPR_MIN, OPR_MOD, OPR_MPY, OPR_MSUB, OPR_NE, OPR_NEG, OPR_NMADD, OPR_NMSUB, OPR_PAREN, OPR_PARM, OPR_RECIP, OPR_REM, OPR_RND, OPR_RSQRT, OPR_SELECT, OPR_SHL, OPR_SQRT, OPR_SUB, OPR_TAS, OPR_TRUNC, setCurrentProcToProcContext(), WN_flag(), WN_opcode(), WN_operator(), and WN_PARM_BY_REFERENCE.
|
virtual |
Implements OA::IRHandlesIRInterface.
Definition at line 882 of file Open64IRInterface.cpp.
References DumpWNMemRef(), OA::IRHandle::hval(), and setCurrentProcToProcContext().
|
virtual |
Implements OA::IRHandlesIRInterface.
Definition at line 892 of file Open64IRInterface.cpp.
References createCharStarForST(), Current_PU_Info, OA::IRHandle::hval(), idx, NULL, PU_Info_proc_sym, setCurrentProcToProcContext(), and ST_name().
|
virtual |
Implements OA::IRHandlesIRInterface.
Definition at line 913 of file Open64IRInterface.cpp.
References DumpWN(), OA::IRHandle::hval(), and setCurrentProcToProcContext().
|
virtual |
Implements OA::IRHandlesIRInterface.
Definition at line 930 of file Open64IRInterface.cpp.
References DumpWN(), OA::IRHandle::hval(), and setCurrentProcToProcContext().
|
virtual |
Implements OA::IRHandlesIRInterface.
Definition at line 948 of file Open64IRInterface.cpp.
References DumpWN(), OA::IRHandle::hval(), and setCurrentProcToProcContext().
|
virtual |
Temporary routine for testing MPICFG // given a ConstValBasicInterface, print out value if any.
Temporary routine for testing MPICFG.
Implements OA::ReachConsts::ReachConstsIRInterface.
Definition at line 3613 of file Open64IRInterface.cpp.
References OA::OA_ptr< T >::convert(), Open64ConstVal::getIntegerVal(), Open64ConstVal::isaInteger(), NULL, and OA::OA_ptr< T >::ptrEqual().
|
virtual |
Given a structured two-way conditional statement, return an IRRegionStmtIterator for the "true" part (i.e., the statements under the "if" clause).
Implements OA::CFG::CFGIRInterface.
Definition at line 1525 of file Open64IRInterface.cpp.
References OA::IRHandle::hval(), OPR_IF, WN_operator(), and WN_then.
|
friend |
Definition at line 1067 of file Open64IRInterface.hpp.
|
friend |
Definition at line 1066 of file Open64IRInterface.hpp.
Referenced by getExprHandleIterator().
|
friend |
Definition at line 1065 of file Open64IRInterface.hpp.
Referenced by getMemRefIterator().
|
friend |
Definition at line 1064 of file Open64IRInterface.hpp.
|
staticprivate |
Definition at line 956 of file Open64IRInterface.hpp.
Referenced by findAllMemRefsAndMapToMemRefExprs().
|
staticprivate |
Definition at line 1074 of file Open64IRInterface.hpp.
Referenced by ignoreBlackBoxRoutines(), and setIgnoreBlackBoxRoutines().
|
staticprivate |
Definition at line 964 of file Open64IRInterface.hpp.
Referenced by haveDefinition().
|
staticprivate |
Definition at line 1047 of file Open64IRInterface.hpp.
Referenced by initContextState(), and initProcContext().
|
staticprivate |
Definition at line 973 of file Open64IRInterface.hpp.
Referenced by createAndMapNamedRef(), and getLocation().
|
staticprivate |
Definition at line 969 of file Open64IRInterface.hpp.
Referenced by createAndMapNamedRef(), getLocation(), and initProcContext().
|
staticprivate |
Definition at line 961 of file Open64IRInterface.hpp.
Referenced by createAndMapDerefs(), createAndMapNamedRef(), createExprTree(), findAllMemRefsAndMapToMemRefExprs(), findTopMemRefHandle(), getDefMemRefs(), getDefMREs(), getMemRefExprIterator(), getUseMemRefs(), and getUseMREs().
|
staticprivate |
Definition at line 958 of file Open64IRInterface.hpp.
Referenced by getStmtFromMemRef().
|
staticprivate |
Definition at line 981 of file Open64IRInterface.hpp.
Referenced by getMemRefIterator(), and isPassByReference().
|
staticprivate |
Definition at line 1044 of file Open64IRInterface.hpp.
Referenced by initProcContext(), isPassByReference(), setContext(), and setCurrentProcToProcContext().
|
staticprivate |
Definition at line 985 of file Open64IRInterface.hpp.
Referenced by getLocation(), and initProcToSymRefSetMap().
Definition at line 1045 of file Open64IRInterface.hpp.
Referenced by initProcContext().
|
staticprivate |
Definition at line 953 of file Open64IRInterface.hpp.
Referenced by createAndMapDerefs(), createAndMapNamedRef(), findAllMemRefsAndMapToMemRefExprs(), getAssignPairIterator(), and getMemRefIterator().
|
staticprivate |
Definition at line 975 of file Open64IRInterface.hpp.
Referenced by createAndMapNamedRef(), getLocation(), and initProcContext().
|
staticprivate |
Definition at line 978 of file Open64IRInterface.hpp.
Referenced by getSideEffect(), and initProcContext().