|
OpenADFortTk (basic)
|
00001 #include <stdio.h> 00002 00003 #include "PUXlationContext.h" 00004 #include "Open64IRInterface/SymTab.h" 00005 #include "Diagnostics.h" 00006 #include "whirl2xaif.h" 00007 00008 namespace whirl2xaif { 00009 00010 PUXlationContext::PUXlationContext(const std::string& anOriginator, Open64IRInterface& anIrInterface) : 00011 myWNParentMapP(NULL), 00012 myStab2idMapP(NULL), 00013 myPU2idMapP(NULL), 00014 myWN2idMapP(NULL), 00015 myScalarizedRefTab_W2Xp(NULL), 00016 myOriginator(anOriginator), 00017 myF90Flag(false), 00018 myIrInterface(anIrInterface) { 00019 myXlationContextStack.push_front(XlationContext(0)); 00020 } 00021 00022 PUXlationContext::~PUXlationContext() { 00023 // clear the stack 00024 myXlationContextStack.clear(); 00025 } 00026 00027 void PUXlationContext::createXlationContext() { 00028 PushNewXlationContext(XlationContext::NOFLAG, NULL); 00029 } 00030 00031 void PUXlationContext::createXlationContext(XlationContext::Flags_E f) { 00032 PushNewXlationContext(f, NULL); 00033 } 00034 00035 void PUXlationContext::createXlationContext(XlationContext::Flags_E f, WN* aWNp) { 00036 PushNewXlationContext(f, aWNp); 00037 } 00038 00039 void PUXlationContext::PushNewXlationContext(XlationContext::Flags_E f, WN* aWNp) { 00040 if (myXlationContextStack.empty()) 00041 // this should never happen 00042 FORTTK_DIE("PUXlationContext::PushNewXlationContext: empty context stack"); 00043 const XlationContext& parentXlationContext = myXlationContextStack.front(); 00044 myXlationContextStack.push_front(XlationContext(myXlationContextStack.size())); 00045 currentXlationContext().inheritFlags(parentXlationContext); 00046 if (aWNp) 00047 currentXlationContext().setWN(aWNp); 00048 currentXlationContext().setFlag(f); 00049 } 00050 00051 void PUXlationContext::deleteXlationContext() { 00052 if (myXlationContextStack.size() > 1) { 00053 // maintain invariant that there is at least one context 00054 myXlationContextStack.pop_front(); 00055 } 00056 } 00057 00058 XlationContext& PUXlationContext::currentXlationContext() { 00059 return myXlationContextStack.front(); 00060 } 00061 00062 WN* PUXlationContext::getMostRecentWN() { 00063 WN* theWNp=0; 00064 for (XlationContextStack::iterator it=myXlationContextStack.begin(); 00065 it!=myXlationContextStack.end(); 00066 ++it) { 00067 if (it->hasWN()) { 00068 theWNp=it->getWN(); 00069 break; 00070 } 00071 } 00072 if (!theWNp) 00073 FORTTK_DIE("PUXlationContext::getMostRecentWN: none found"); 00074 return theWNp; 00075 } 00076 00077 WN* PUXlationContext::findParentWN(WN* wn) { 00078 if (!myWNParentMapP) 00079 FORTTK_DIE("PUXlationContext::findParentWN: myWNParentMapP not set"); 00080 if(!wn) 00081 FORTTK_DIE("PUXlationContext::findParentWN: null pointer passed"); 00082 return (myWNParentMapP->Find(wn)); 00083 } 00084 00085 WN* PUXlationContext::findParentBlockWN(WN* wn) { 00086 if (!myWNParentMapP) 00087 FORTTK_DIE("PUXlationContext::FindParentBlockWN: myWNParentMapP not set"); 00088 if(!wn) 00089 FORTTK_DIE("PUXlationContext::FindParentBlockWN: null pointer passed"); 00090 return (myWNParentMapP->FindBlock(wn)); 00091 } 00092 00093 fortTkSupport::WhirlParentMap* PUXlationContext::getWNParentMap() const { 00094 if (!myWNParentMapP) 00095 FORTTK_DIE("PUXlationContext::getWNParentMap: myWNParentMapP not set"); 00096 return myWNParentMapP; 00097 } 00098 00099 void PUXlationContext::setWNParentMap(fortTkSupport::WhirlParentMap* aWhirlParentMapP) { 00100 if (!aWhirlParentMapP) 00101 FORTTK_DIE("PUXlationContext::setWNParentMap: null pointer passed"); 00102 if (myWNParentMapP) { 00103 if (myWNParentMapP==aWhirlParentMapP) { 00104 FORTTK_MSG(2,"PUXlationContext::setWNParentMap: already set to the same"); 00105 } 00106 else { 00107 FORTTK_MSG(2,"PUXlationContext::setWNParentMap: was set to " 00108 << myWNParentMapP 00109 << " new settting is " 00110 << aWhirlParentMapP); 00111 } 00112 } 00113 myWNParentMapP = aWhirlParentMapP; 00114 } 00115 00116 fortTkSupport::SymTabId PUXlationContext::findSymTabId(ST_TAB* stab) { 00117 if (!myStab2idMapP) 00118 FORTTK_DIE("PUXlationContext::findSymTabId: myStab2idMapP not set"); 00119 if (!stab) 00120 FORTTK_DIE("PUXlationContext::findSymTabId: null pointer passed"); 00121 return (myStab2idMapP->Find(stab, true /*mustfind*/)); 00122 } 00123 00124 fortTkSupport::SymTabToSymTabIdMap* PUXlationContext::getSymTabToIdMap() const { 00125 if (!myStab2idMapP) 00126 FORTTK_DIE("PUXlationContext::getSymTabToIdMap: myStab2idMapP not set"); 00127 return myStab2idMapP; 00128 } 00129 00130 void PUXlationContext::setSymTabToIdMap(fortTkSupport::SymTabToSymTabIdMap* aSymTabToSymTabIdMapP) { 00131 if (!aSymTabToSymTabIdMapP) 00132 FORTTK_DIE("PUXlationContext::setSymTabToIdMap: null pointer passed"); 00133 if (myStab2idMapP) 00134 FORTTK_DIE("PUXlationContext::setSymTabToIdMap: already set"); 00135 myStab2idMapP = aSymTabToSymTabIdMapP; 00136 } 00137 00138 fortTkSupport::PUId PUXlationContext::findPUId(PU_Info* pu) { 00139 if (!myPU2idMapP) 00140 FORTTK_DIE("PUXlationContext::findPUId: myPU2idMapP not set"); 00141 if (!pu) 00142 FORTTK_DIE("PUXlationContext::findPUId: null pointer passed"); 00143 return (myPU2idMapP->Find(pu)); 00144 } 00145 00146 fortTkSupport::PUToPUIdMap* PUXlationContext::getPUToIdMap() const { 00147 if (!myPU2idMapP) 00148 FORTTK_DIE("PUXlationContext::getPUToIdMap: myPU2idMapP not set"); 00149 return myPU2idMapP; 00150 } 00151 00152 void PUXlationContext::setPUToIdMap(fortTkSupport::PUToPUIdMap* aPUToPUIdMapP) { 00153 if (!aPUToPUIdMapP) 00154 FORTTK_DIE("PUXlationContext::setPUToIdMap: null pointer passed"); 00155 if (myPU2idMapP) 00156 FORTTK_DIE("PUXlationContext::setPUToIdMap: already set"); 00157 myPU2idMapP = aPUToPUIdMapP; 00158 } 00159 00160 fortTkSupport::WNId PUXlationContext::findWNId(WN* wn) { 00161 if (!myWN2idMapP) 00162 FORTTK_DIE("PUXlationContext::findWNId: myWN2idMapP not set"); 00163 if (!wn) 00164 FORTTK_DIE("PUXlationContext::findWNId: null pointer passed"); 00165 return myWN2idMapP->Find(wn); 00166 } 00167 00168 fortTkSupport::WNToWNIdMap* PUXlationContext::getWNToIdMap() const { 00169 if (!myWN2idMapP) 00170 FORTTK_DIE("PUXlationContext::getWNToIdMap: myWN2idMapP not set"); 00171 return myWN2idMapP; 00172 } 00173 00174 void PUXlationContext::setWNToIdMap(fortTkSupport::WNToWNIdMap* aWNToWNIdMapP) { 00175 if (!aWNToWNIdMapP) 00176 FORTTK_DIE("PUXlationContext::setWNToIdMap: null pointer passed"); 00177 // JU: this is being reset hmm 00178 if (myWN2idMapP) { 00179 if (myWN2idMapP==aWNToWNIdMapP) { 00180 FORTTK_MSG(2,"PUXlationContext::setWNToIdMap: already set to the same"); 00181 } 00182 else { 00183 FORTTK_MSG(2,"PUXlationContext::setWNToIdMap: already set to " 00184 << myWN2idMapP 00185 << " new " 00186 << aWNToWNIdMapP); 00187 } 00188 } 00189 myWN2idMapP = aWNToWNIdMapP; 00190 } 00191 00192 int PUXlationContext::findUDDUChainId(WN* wnexpr) { 00193 if (myUdduchains.ptrEqual(NULL)) 00194 FORTTK_DIE("PUXlationContext::findUDDUChainId: myUdduchains not set"); 00195 if (!wnexpr) 00196 FORTTK_DIE("PUXlationContext::findUDDUChainId: null pointer passed"); 00197 OA::MemRefHandle h((OA::irhandle_t)wnexpr); 00198 int duudKey=myUdduchains->getUDDUChainId(h); 00199 WN* parentWN_p; 00200 if (duudKey==0) { 00201 USRCPOS srcpos; 00202 USRCPOS_srcpos(srcpos) = WN_Get_Linenum(wnexpr); 00203 int aLineNumber=USRCPOS_linenum(srcpos); 00204 std::ostringstream ostr; 00205 ostr << "findUDDUChainId: no key for >"; 00206 Open64IRInterface::DumpWN(wnexpr, ostr); 00207 ostr << "<"; 00208 parentWN_p=findParentWN(wnexpr); 00209 while (duudKey==0 && parentWN_p) { 00210 // for instance for character arrays there is considerable confusion 00211 // in the OA interface which node should have the proper information, 00212 // e.g. if we should refer to the 00213 // ARRAY node or the child LDA node. 00214 OA::MemRefHandle parenth((OA::irhandle_t)parentWN_p); 00215 duudKey=myUdduchains->getUDDUChainId(parenth); 00216 if (duudKey==0) { 00217 if (fortTkSupport::Diagnostics::getDiagnosticFilterLevel() > 1) { 00218 ostr << " or parent >"; 00219 Open64IRInterface::DumpWN(parentWN_p, ostr); 00220 ostr << "<"; 00221 } 00222 if (!aLineNumber) { 00223 USRCPOS_srcpos(srcpos) = WN_Get_Linenum(parentWN_p); 00224 aLineNumber=USRCPOS_linenum(srcpos); 00225 } 00226 parentWN_p=findParentWN(parentWN_p); 00227 } 00228 } 00229 if (duudKey==0) { 00230 if (aLineNumber) 00231 ostr << " line " << aLineNumber; 00232 FORTTK_MSG(1,ostr.str().c_str()); 00233 } 00234 else { 00235 ostr << " eventually found " << duudKey << " in >"; 00236 Open64IRInterface::DumpWN(parentWN_p, ostr); 00237 ostr << "<"; 00238 FORTTK_MSG(2,ostr.str().c_str()); 00239 } 00240 } 00241 else { 00242 std::ostringstream ostr; 00243 ostr << "findUDDUChainId: for: "; 00244 Open64IRInterface::DumpWN(wnexpr, ostr); 00245 ostr << " found " << duudKey; 00246 FORTTK_MSG(2,ostr.str().c_str()); 00247 } 00248 return duudKey; 00249 } 00250 00251 int PUXlationContext::getAliasMapKey(WN* wnexpr) { 00252 if (myAliasMapXAIF_p.ptrEqual(NULL)) 00253 FORTTK_DIE("PUXlationContext::getAliasMapKey: myAliasMapXAIF_p not set"); 00254 if (!wnexpr) 00255 FORTTK_DIE("PUXlationContext::getAliasMapKey: null pointer passed"); 00256 00257 OA::MemRefHandle theHandle ((OA::irhandle_t)wnexpr); 00258 int theAliasMapSetKey = myAliasMapXAIF_p->getMapSetId(theHandle); 00259 WN* parentWN_p; 00260 if (theAliasMapSetKey == 0) { 00261 std::ostringstream ostr; 00262 ostr << "PUXlationContext::getAliasMapKey: no key for >"; 00263 Open64IRInterface::DumpWN(wnexpr, ostr); 00264 ostr << "<"; 00265 parentWN_p = findParentWN(wnexpr); 00266 // Recursively check parents until a key is found, or there are no parents left 00267 while (theAliasMapSetKey == 0 && parentWN_p) { 00268 // for instance for character arrays there is considerable confusion in the OA interface 00269 // which node should have the proper information, 00270 // e.g. if we should refer to the ARRAY node or the child LDA node. 00271 OA::MemRefHandle theParentHandle ((OA::irhandle_t)parentWN_p); 00272 theAliasMapSetKey = myAliasMapXAIF_p->getMapSetId(theParentHandle); 00273 if (theAliasMapSetKey == 0) { 00274 if (fortTkSupport::Diagnostics::getDiagnosticFilterLevel() > 1) { 00275 ostr << " or parent >"; 00276 Open64IRInterface::DumpWN(parentWN_p, ostr); 00277 ostr << "<"; 00278 } 00279 parentWN_p=findParentWN(parentWN_p); 00280 } 00281 } // end while 00282 if (theAliasMapSetKey == 0) { 00283 FORTTK_MSG(1,ostr.str().c_str()); 00284 } 00285 else { 00286 ostr << " eventually found " << theAliasMapSetKey << " in >"; 00287 Open64IRInterface::DumpWN(parentWN_p, ostr); 00288 ostr << "<"; 00289 FORTTK_MSG(2,ostr.str().c_str()); 00290 } 00291 } // end if theAliasMapSetKey is zero 00292 else { // theAliasMapSetKey is nonzero 00293 std::ostringstream ostr; 00294 ostr << "PUXlationContext::getAliasMapKey: for: "; 00295 Open64IRInterface::DumpWN(wnexpr, ostr); 00296 ostr << " found " << theAliasMapSetKey; 00297 FORTTK_MSG(2,ostr.str().c_str()); 00298 } 00299 00300 std::ostringstream ostr; 00301 Open64IRInterface::DumpWN(wnexpr, ostr); 00302 FORTTK_MSG(2,"PUXlationContext::getAliasMapKey(): returns " << theAliasMapSetKey << " for " << ostr.str().c_str()); 00303 00304 return theAliasMapSetKey; 00305 } // end PUXlationContext::getAliasMapKey() 00306 00307 OA::OA_ptr<OA::XAIF::UDDUChainsXAIF> PUXlationContext::getUDDUChains() const { 00308 if (myUdduchains.ptrEqual(NULL)) 00309 FORTTK_DIE("PUXlationContext::getUDDUChains: myUdduchains not set"); 00310 return myUdduchains; 00311 } 00312 00313 void PUXlationContext::setUDDUChains(OA::OA_ptr<OA::XAIF::UDDUChainsXAIF> aUdduchainsMap) { 00314 if (aUdduchainsMap.ptrEqual(NULL)) 00315 FORTTK_DIE("PUXlationContext::setUDDUChains: uninitialized OA pointer passed"); 00316 // JU: this is being reset hmm 00317 if (!myUdduchains.ptrEqual(NULL)) { 00318 if (myUdduchains.ptrEqual(aUdduchainsMap)) { 00319 FORTTK_MSG(2,"PUXlationContext::setUDDUChains: already set to the same"); 00320 } 00321 else { 00322 FORTTK_MSG(2,"PUXlationContext::setUDDUChains: already set to " 00323 << myUdduchains 00324 << " new " 00325 << aUdduchainsMap); 00326 } 00327 } 00328 myUdduchains = aUdduchainsMap; 00329 } 00330 00331 int PUXlationContext::findDoChainId(WN* wn) { 00332 if (myDoChains.ptrEqual(NULL)) 00333 FORTTK_DIE("PUXlationContext::findDOChainId: myDoChains not set"); 00334 if (!wn) 00335 FORTTK_DIE("PUXlationContext::findDOChainId: null pointer passed"); 00336 OA::StmtHandle h((OA::irhandle_t)wn); 00337 int doKey=myDoChains->getChainId(h); 00338 if (doKey==0) { 00339 std::ostringstream ostr; 00340 ostr << "findDOChainId: no key for >"; 00341 Open64IRInterface::DumpWN(wn, ostr); 00342 ostr << "<"; 00343 FORTTK_MSG(1,ostr.str().c_str()); 00344 } 00345 else { 00346 std::ostringstream ostr; 00347 ostr << "findDOChainId: for: "; 00348 Open64IRInterface::DumpWN(wn, ostr); 00349 ostr << " found " << doKey; 00350 FORTTK_MSG(2,ostr.str().c_str()); 00351 } 00352 return doKey; 00353 } 00354 00355 OA::OA_ptr<OA::XAIF::ReachDefsOverwriteXAIF> PUXlationContext::getDoChains() const { 00356 if (myDoChains.ptrEqual(NULL)) 00357 FORTTK_DIE("PUXlationContext::getDoChains: myDoChains not set"); 00358 return myDoChains; 00359 } 00360 00361 void PUXlationContext::setDoChains(OA::OA_ptr<OA::XAIF::ReachDefsOverwriteXAIF> aDoChainsMap) { 00362 if (aDoChainsMap.ptrEqual(NULL)) 00363 FORTTK_DIE("PUXlationContext::setDoChains: uninitialized OA pointer passed"); 00364 // JU: this is being reset hmm 00365 if (!myDoChains.ptrEqual(NULL)) { 00366 if (myDoChains.ptrEqual(aDoChainsMap)) { 00367 FORTTK_MSG(2,"PUXlationContext::setDoChains: already set to the same"); 00368 } 00369 else { 00370 FORTTK_MSG(2,"PUXlationContext::setDoChains: already set to " 00371 << myDoChains 00372 << " new " 00373 << aDoChainsMap); 00374 } 00375 } 00376 myDoChains = aDoChainsMap; 00377 } 00378 00379 fortTkSupport::ScalarizedRef* PUXlationContext::findScalarizedRef(WN* wn) { 00380 if (!myScalarizedRefTab_W2Xp) 00381 FORTTK_DIE("PUXlationContext::findScalarizedRef: myScalarizedRefTab_W2Xp not set"); 00382 if (!wn) 00383 FORTTK_DIE("PUXlationContext::findScalarizedRef: null pointer passed"); 00384 return myScalarizedRefTab_W2Xp->Find(wn); 00385 } 00386 00387 void PUXlationContext::setScalarizedRefTab(fortTkSupport::ScalarizedRefTab_W2X* aScalarizedRefTab_W2Xp) { 00388 if (!aScalarizedRefTab_W2Xp) 00389 FORTTK_DIE("PUXlationContext::setScalarizedRefTab: null pointer passed"); 00390 // JU: this is being reset hmm 00391 if (myScalarizedRefTab_W2Xp) { 00392 if (myScalarizedRefTab_W2Xp==aScalarizedRefTab_W2Xp) { 00393 FORTTK_MSG(2,"PUXlationContext::setScalarizedRefTab: already set to the same"); 00394 } 00395 else { 00396 FORTTK_MSG(2,"PUXlationContext::setScalarizedRefTab: already set to " 00397 << myScalarizedRefTab_W2Xp 00398 << " new " 00399 << aScalarizedRefTab_W2Xp); 00400 } 00401 } 00402 myScalarizedRefTab_W2Xp = aScalarizedRefTab_W2Xp; 00403 } 00404 00405 fortTkSupport::ScalarizedRefTab_W2X* PUXlationContext::getScalarizedRefTab() const { 00406 if (!myScalarizedRefTab_W2Xp) 00407 FORTTK_DIE("PUXlationContext::getScalarizedRefTab: not set"); 00408 return myScalarizedRefTab_W2Xp; 00409 } 00410 00411 int PUXlationContext::isActiveSym(ST* st) { 00412 if(myActivity.ptrEqual(NULL)) 00413 FORTTK_DIE("PUXlationContext::IsActiveSym: myActivity not set"); 00414 if (!st) 00415 FORTTK_DIE("PUXlationContext::IsActiveSym: null pointer passed"); 00416 // this works with Jaewook's analysis: 00417 return myActivity->isActive(OA::SymHandle((OA::irhandle_t)st)); 00418 00419 #if 0 00420 // this is for context sensitive activity analysis 00421 // see if this is a module variable 00422 if (ST_is_in_module(st) && !ST_is_external(st)) { 00423 // try to find it in the global set 00424 if (fortTkSupport::IntraOAInfo::isGlobalSymbolActive(st)) 00425 return true; 00426 // else look in the local information 00427 } 00428 OA::SymHandle sym = OA::SymHandle((OA::irhandle_t)st) ; 00429 OA::OA_ptr<Open64IRInterface> theIR=Whirl2Xaif::getOAAnalMap().GetIRInterface(); 00430 OA::OA_ptr<OA::MemRefExpr> symMRE = theIR->convertSymToMemRefExpr(sym); 00431 OA::ProcHandle proc((OA::irhandle_t)Current_PU_Info); 00432 std::cout << "MemRefExpr" << std::endl; 00433 symMRE->output(*theIR); 00434 std::cout << "**********" << std::endl; 00435 OA::OA_ptr<OA::LocIterator> symMRElocs_I = myAlias->getAliasResults(proc)->getMayLocs(*symMRE,proc); 00436 // we now have the locations that may alias the symbol and need to compare these 00437 // against the locations determined to be active by the activity analysis. 00438 std::cout << "ActiveSym before for loop" << std::endl; 00439 for ( ; symMRElocs_I->isValid(); (*symMRElocs_I)++ ) { 00440 std::cout << "ActiveSym inside for loop" << std::endl; 00441 // std::cout << "Procedure Name" << theIR->toString(proc) << std::endl; 00442 OA::OA_ptr<OA::LocIterator> activeLoc_I = 00443 myActivity->getActiveLocsIterator(proc); 00444 for ( ; activeLoc_I->isValid(); (*activeLoc_I)++ ) { 00445 std::cout << "Found Active Location" << std::endl; 00446 if (activeLoc_I->current()->mayOverlap(*(symMRElocs_I->current()))) { 00447 std::cout << "Found Overlap, returning true" << std::endl; 00448 return true; 00449 } 00450 } 00451 } 00452 std::cout << "ActiveSym outside for loop" << std::endl; 00453 // didn't find it in all the active locations 00454 return false; 00455 #endif 00456 00457 } 00458 00459 int PUXlationContext::isActiveStmt(PU_Info* pu, WN* wn) { 00460 if(myActivity.ptrEqual(NULL)) 00461 FORTTK_DIE("PUXlationContext::IsActiveStmt: myActivity not set"); 00462 if (!pu || !wn) 00463 FORTTK_DIE("PUXlationContext::IsActiveStmt: null pointer passed"); 00464 return myActivity->isActive(OA::ProcHandle((OA::irhandle_t)pu), 00465 OA::StmtHandle((OA::irhandle_t)wn)); 00466 } 00467 00468 int PUXlationContext::isActiveVarRef(PU_Info* pu, WN* wn) { 00469 if(myActivity.ptrEqual(NULL)) 00470 FORTTK_DIE("PUXlationContext::IsActiveVarRef: myActivity not set"); 00471 if (!pu || !wn) 00472 FORTTK_DIE("PUXlationContext::IsActiveVarRef: null pointer passed"); 00473 return myActivity->isActive(OA::ProcHandle((OA::irhandle_t)pu), 00474 OA::MemRefHandle((OA::irhandle_t)wn)); 00475 } 00476 00477 void PUXlationContext::setActivity(OA::OA_ptr<OA::Activity::InterActiveFortran> anActivityMap) { 00478 if(anActivityMap.ptrEqual(NULL)) 00479 FORTTK_DIE("PUXlationContext::SetActivity: null OA_ptr passed"); 00480 if(!myActivity.ptrEqual(NULL)) 00481 FORTTK_DIE("PUXlationContext::SetActivity: already set"); 00482 myActivity = anActivityMap; 00483 } 00484 00485 void PUXlationContext::setAlias(OA::OA_ptr<OA::Alias::InterAliasMap> anAliasMap) { 00486 if(anAliasMap.ptrEqual(NULL)) 00487 FORTTK_DIE("PUXlationContext::SetAlias: null OA_ptr passed"); 00488 if(!myAlias.ptrEqual(NULL)) 00489 FORTTK_DIE("PUXlationContext::SetAlias: already set"); 00490 myAlias = anAliasMap; 00491 } 00492 00493 void PUXlationContext::setAliasMapXAIF(OA::OA_ptr<OA::XAIF::AliasMapXAIF> anAliasMapXAIF_p) { 00494 if (anAliasMapXAIF_p.ptrEqual(NULL)) 00495 FORTTK_DIE("PUXlationContext::setAliasMapXAIF: uninitialized OA pointer passed"); 00496 // JU: this is being reset hmm 00497 if (!myAliasMapXAIF_p.ptrEqual(NULL)) { 00498 if (myAliasMapXAIF_p.ptrEqual(anAliasMapXAIF_p)) { 00499 FORTTK_MSG(2,"PUXlationContext::setAliasMapXAIF: already set to the same"); 00500 } 00501 else { 00502 FORTTK_MSG(2,"PUXlationContext::setAliasMapXAIF: already set to " 00503 << myAliasMapXAIF_p 00504 << " new " 00505 << anAliasMapXAIF_p); 00506 } 00507 } 00508 myAliasMapXAIF_p = anAliasMapXAIF_p; 00509 } 00510 00511 void PUXlationContext::dump(std::ostream& o, const std::string& indent) const { 00512 o << "(myOriginator=" << myOriginator.c_str() << " "; 00513 o << ")\n"; 00514 for (XlationContextStack::const_iterator it=myXlationContextStack.begin(); 00515 it!=myXlationContextStack.end(); 00516 ++it) 00517 it->dump(o,indent+" "); 00518 } 00519 00520 void PUXlationContext::ddump() const { 00521 dump(std::cerr,""); 00522 } 00523 00524 bool PUXlationContext::isF90() const { 00525 return myF90Flag; 00526 } 00527 00528 void PUXlationContext::setF90(bool aFlag) { 00529 myF90Flag=aFlag; 00530 } 00531 00532 Open64IRInterface& PUXlationContext::getIrInterface() { 00533 return myIrInterface; 00534 } 00535 00536 } // end namespace whirl2xaif 00537