// IPE: Provide the name of the symbol/variable being defined const char* DefExpr::name() const { const char* retval = 0; if (isLcnSymbol(sym) == true || isTypeSymbol(sym) == true || isFnSymbol(sym) == true || isModuleSymbol(sym) == true) { retval = sym->name; } return retval; }
static void findOuterVars(FnSymbol* fn, SymbolMap& uses) { std::vector<BaseAST*> asts; collect_asts(fn, asts); for_vector(BaseAST, ast, asts) { if (SymExpr* symExpr = toSymExpr(ast)) { Symbol* sym = symExpr->symbol(); if (isLcnSymbol(sym)) { if (!isCorrespCoforallIndex(fn, sym) && isOuterVar(sym, fn)) uses.put(sym, markUnspecified); } } } }
// // finds outer vars directly used in a function // static void findOuterVars(FnSymbol* fn, SymbolMap* uses) { std::vector<BaseAST*> asts; collect_asts(fn, asts); for_vector(BaseAST, ast, asts) { if (SymExpr* symExpr = toSymExpr(ast)) { Symbol* sym = symExpr->var; if (isLcnSymbol(sym)) { if (isOuterVar(sym, fn)) uses->put(sym,gNil); } } } }