Statement Class Reference

#include <include/statement.h>

Inheritance diagram for Statement:

GotoStatement JunctionStatement ReturnStatement TypingStatement BranchStatement CallStatement CaseStatement Assignment ImpRefStatement Assign BoolAssign ImplicitAssign PhiAssign List of all members.

Detailed Description

Definition at line 136 of file statement.h.

Public Member Functions

virtual bool accept (StmtPartModifier *visitor)=0
virtual bool accept (StmtModifier *visitor)=0
virtual bool accept (StmtExpVisitor *visitor)=0
virtual bool accept (StmtVisitor *visitor)=0
bool addUsedLocals (LocationSet &used)
void addUsedLocs (LocationSet &used, bool cc=false, bool memOnly=false)
void bypass ()
bool calcMayAlias (Exp *e1, Exp *e2, int size)
bool castConst (int num, Type *ty)
void clearConscripts ()
void clearRanges ()
virtual Statementclone ()=0
virtual bool definesLoc (Exp *loc)
void dfaMapLocals ()
virtual void dfaTypeAnalysis (bool &ch)
bool doPropagateTo (Exp *e, Assign *def, bool &convert)
void dump ()
void findConstants (std::list< Const * > &lc)
virtual void fixSuccessor ()
virtual void genConstraints (LocationSet &cons)
virtual void generateCode (HLLCode *hll, BasicBlock *pbb, int indLevel)=0
PBB getBB ()
virtual void getDefinitions (LocationSet &def)
int getDomNumber ()
ExpgetExpAtLex (unsigned int begin, unsigned int end)
RangeMap getInputRanges ()
STMT_KIND getKind ()
unsigned int getLexBegin ()
unsigned int getLexEnd ()
StatementgetNextStatementInBB ()
int getNumber ()
StatementgetParent ()
StatementgetPreviousStatementInBB ()
UserProcgetProc ()
RangeMapgetRanges ()
RangeMapgetSavedInputRanges ()
virtual TypegetTypeFor (Exp *e)
void insertCasts ()
bool isAssign ()
bool isAssignment ()
bool isBool ()
virtual bool isBranch ()
bool isCall ()
bool isCase ()
virtual bool isDefinition ()=0
bool isFirstStatementInBB ()
bool isFlagAssgn ()
bool isFpop ()
bool isFpush ()
virtual bool isGoto ()
bool isHL_ICT ()
bool isImplicit ()
bool isImpRef ()
bool isJunction ()
bool isLastStatementInBB ()
bool isNullStatement ()
bool isPhi ()
bool isReturn ()
virtual bool isTyping ()
void mapRegistersToLocals ()
bool mayAlias (Exp *e1, Exp *e2, int size)
TypemeetWithFor (Type *ty, Exp *e, bool &ch)
virtual void print (std::ostream &os, bool html=false)=0
void printAsUse (std::ostream &os)
void printAsUseBy (std::ostream &os)
void printNum (std::ostream &os)
char * prints ()
bool propagateFlagsTo ()
bool propagateTo (bool &convert, std::map< Exp *, int, lessExpStar > *destCounts=NULL, LocationSet *usedByDomPhi=NULL, bool force=false)
virtual void rangeAnalysis (std::list< Statement * > &execution_paths)
bool replaceRef (Exp *e, Assign *def, bool &convert)
void replaceSubscriptsWithLocals ()
virtual bool search (Exp *search, Exp *&result)=0
virtual bool searchAll (Exp *search, std::list< Exp * > &result)=0
virtual bool searchAndReplace (Exp *search, Exp *replace, bool cc=false)=0
void setBB (PBB bb)
int setConscripts (int n)
void setDomNumber (int dn)
void setKind (STMT_KIND k)
virtual void setLeftFor (Exp *forExp, Exp *newExp)
void setLexBegin (unsigned int n)
void setLexEnd (unsigned int n)
virtual void setNumber (int num)
void setParent (Statement *par)
void setProc (UserProc *p)
virtual void setTypeFor (Exp *e, Type *ty)
virtual void simplify ()=0
virtual void simplifyAddr ()
 Statement ()
void stripSizes ()
void subscriptVar (Exp *e, Statement *def)
virtual bool usesExp (Exp *e)=0
virtual ~Statement ()

Static Public Member Functions

static bool canPropagateToExp (Exp *e)

Protected Member Functions

void updateRanges (RangeMap &output, std::list< Statement * > &execution_paths, bool notTaken=false)

Protected Attributes

int dominanceNum
STMT_KIND kind
unsigned int lexBegin
unsigned int lexEnd
int number
Statementparent
PBB pbb
UserProcproc
RangeMap ranges
RangeMap savedInputRanges

Friends

class XMLProgParser


Constructor & Destructor Documentation

Statement::Statement  )  [inline]
 

Definition at line 157 of file statement.h.

virtual Statement::~Statement  )  [inline, virtual]
 

Definition at line 158 of file statement.h.


Member Function Documentation

virtual bool Statement::accept StmtPartModifier visitor  )  [pure virtual]
 

Implemented in Assignment, Assign, PhiAssign, ImplicitAssign, BoolAssign, ImpRefStatement, GotoStatement, JunctionStatement, BranchStatement, CaseStatement, CallStatement, and ReturnStatement.

virtual bool Statement::accept StmtModifier visitor  )  [pure virtual]
 

Implemented in Assignment, Assign, PhiAssign, ImplicitAssign, BoolAssign, ImpRefStatement, GotoStatement, JunctionStatement, BranchStatement, CaseStatement, CallStatement, and ReturnStatement.

virtual bool Statement::accept StmtExpVisitor visitor  )  [pure virtual]
 

Implemented in Assignment, Assign, PhiAssign, ImplicitAssign, BoolAssign, ImpRefStatement, GotoStatement, JunctionStatement, BranchStatement, CaseStatement, CallStatement, and ReturnStatement.

virtual bool Statement::accept StmtVisitor visitor  )  [pure virtual]
 

Implemented in Assignment, Assign, PhiAssign, ImplicitAssign, BoolAssign, ImpRefStatement, GotoStatement, JunctionStatement, BranchStatement, CaseStatement, CallStatement, and ReturnStatement.

Referenced by addUsedLocals(), addUsedLocs(), bypass(), castConst(), clearConscripts(), dfaMapLocals(), findConstants(), insertCasts(), mapRegistersToLocals(), replaceSubscriptsWithLocals(), setConscripts(), stripSizes(), subscriptVar(), and RtlTest::testVisitor().

bool Statement::addUsedLocals LocationSet used  ) 
 

Definition at line 4123 of file statement.cpp.

References accept(), proc, and UsedLocalFinder::wasAllFound().

Referenced by UserProc::removeUnusedLocals().

void Statement::addUsedLocs LocationSet used,
bool  cc = false,
bool  memOnly = false
 

Definition at line 4117 of file statement.cpp.

References accept().

Referenced by propagateFlagsTo(), propagateTo(), setProc(), StatementTest::testAddUsedLocsAssign(), StatementTest::testAddUsedLocsBool(), StatementTest::testAddUsedLocsBranch(), StatementTest::testAddUsedLocsCall(), StatementTest::testAddUsedLocsCase(), and StatementTest::testAddUsedLocsReturn().

void Statement::bypass  ) 
 

Definition at line 4106 of file statement.cpp.

References accept(), SimpExpModifier::isTopChanged(), and simplify().

Referenced by StatementTest::testBypass().

bool Statement::calcMayAlias Exp e1,
Exp e2,
int  size
 

Definition at line 90 of file statement.cpp.

References Exp::isMemOf().

Referenced by mayAlias().

bool Statement::canPropagateToExp Exp e  )  [static]
 

Definition at line 691 of file statement.cpp.

References TypingStatement::getType(), Type::isArray(), isAssign(), isNullStatement(), and Exp::isSubscript().

Referenced by ExpPropagator::postVisit(), propagateTo(), and ExpDestCounter::visit().

bool Statement::castConst int  num,
Type ty
 

Definition at line 3735 of file statement.cpp.

References accept(), and ExpConstCaster::isChanged().

void Statement::clearConscripts  ) 
 

Definition at line 3729 of file statement.cpp.

References accept().

void Statement::clearRanges  )  [inline]
 

Definition at line 179 of file statement.h.

References RangeMap::clear(), and ranges.

virtual Statement* Statement::clone  )  [pure virtual]
 

Implemented in Assignment, Assign, PhiAssign, ImplicitAssign, BoolAssign, ImpRefStatement, GotoStatement, JunctionStatement, BranchStatement, CaseStatement, CallStatement, and ReturnStatement.

virtual bool Statement::definesLoc Exp loc  )  [inline, virtual]
 

Reimplemented in Assignment, CallStatement, and ReturnStatement.

Definition at line 248 of file statement.h.

void Statement::dfaMapLocals  ) 
 

Definition at line 5107 of file statement.cpp.

References accept(), DfaLocalMapper::change, LOG, number, and proc.

Referenced by UserProc::mapLocalsAndParams().

virtual void Statement::dfaTypeAnalysis bool &  ch  )  [inline, virtual]
 

Reimplemented in Assignment, Assign, PhiAssign, ImplicitAssign, BoolAssign, BranchStatement, CallStatement, and ReturnStatement.

Definition at line 306 of file statement.h.

bool Statement::doPropagateTo Exp e,
Assign def,
bool &  convert
 

Definition at line 865 of file statement.cpp.

References Boomerang::get(), LOG, Boomerang::numToPropagate, and replaceRef().

Referenced by propagateFlagsTo().

void Statement::dump  ) 
 

Definition at line 652 of file statement.cpp.

References print().

void Statement::findConstants std::list< Const * > &  lc  ) 
 

Definition at line 4138 of file statement.cpp.

References accept().

Referenced by StatementTest::testFindConstants().

virtual void Statement::fixSuccessor  )  [inline, virtual]
 

Reimplemented in Assign.

Definition at line 300 of file statement.h.

virtual void Statement::genConstraints LocationSet cons  )  [inline, virtual]
 

Reimplemented in Assignment, Assign, PhiAssign, BranchStatement, and CallStatement.

Definition at line 303 of file statement.h.

virtual void Statement::generateCode HLLCode hll,
BasicBlock pbb,
int  indLevel
[pure virtual]
 

Implemented in Assignment, Assign, BoolAssign, ImpRefStatement, GotoStatement, JunctionStatement, BranchStatement, CaseStatement, CallStatement, and ReturnStatement.

PBB Statement::getBB  )  [inline]
 

Definition at line 161 of file statement.h.

References pbb.

Referenced by UserProc::insertAssignAfter(), and UserProc::setImplicitRef().

virtual void Statement::getDefinitions LocationSet def  )  [inline, virtual]
 

Reimplemented in Assignment, BoolAssign, CallStatement, and ReturnStatement.

Definition at line 244 of file statement.h.

Referenced by setProc().

int Statement::getDomNumber  )  [inline]
 

Definition at line 144 of file statement.h.

References dominanceNum.

Referenced by propagateTo().

Exp * Statement::getExpAtLex unsigned int  begin,
unsigned int  end
 

Definition at line 73 of file statement.cpp.

References NULL.

RangeMap Statement::getInputRanges  ) 
 

Definition at line 128 of file statement.cpp.

References BasicBlock::getNumInEdges(), getPreviousStatementInBB(), getRanges(), isFirstStatementInBB(), opInitValueOf, opPC, pbb, Location::regOf(), and savedInputRanges.

Referenced by CallStatement::rangeAnalysis(), BranchStatement::rangeAnalysis(), Assign::rangeAnalysis(), and rangeAnalysis().

STMT_KIND Statement::getKind  )  [inline]
 

Definition at line 172 of file statement.h.

References kind.

Referenced by SparcFrontEnd::case_DD(), BasicBlock::getCond(), BasicBlock::getDestProc(), RTL::isBranch(), RTL::isCall(), RTL::isCompare(), RTL::isGoto(), RefExp::isImplicitDef(), and SparcFrontEnd::processProc().

unsigned int Statement::getLexBegin  )  [inline]
 

Definition at line 191 of file statement.h.

References lexBegin.

Referenced by UserProc::getStmtAtLex().

unsigned int Statement::getLexEnd  )  [inline]
 

Definition at line 192 of file statement.h.

References lexEnd.

Statement * Statement::getNextStatementInBB  ) 
 

Definition at line 604 of file statement.cpp.

Referenced by updateRanges().

int Statement::getNumber  )  [inline]
 

Definition at line 169 of file statement.h.

References number.

Referenced by BasicBlock::decodeIndirectJmp(), BasicBlock::getStmtNumber(), RefExp::match(), RefExp::print(), UserProc::printUseGraph(), RefExp::printx(), propagateTo(), UserProc::removeNullStatements(), Exp::removeSubscripts(), and PrimitiveTester::visit().

Statement* Statement::getParent  )  [inline]
 

Definition at line 176 of file statement.h.

References parent.

Statement * Statement::getPreviousStatementInBB  ) 
 

Definition at line 587 of file statement.cpp.

References NULL.

Referenced by getInputRanges().

UserProc* Statement::getProc  )  [inline]
 

Definition at line 167 of file statement.h.

References proc.

Referenced by CHLLCode::AddAssignmentStatement(), Assignment::Assignment(), Unary::descendType(), Binary::descendType(), StatementList::findOnLeft(), and StmtSsaXformer::visit().

RangeMap& Statement::getRanges  )  [inline]
 

Definition at line 178 of file statement.h.

References ranges.

Referenced by getInputRanges().

RangeMap& Statement::getSavedInputRanges  )  [inline]
 

Definition at line 313 of file statement.h.

References savedInputRanges.

virtual Type* Statement::getTypeFor Exp e  )  [inline, virtual]
 

Reimplemented in Assignment, CallStatement, and ReturnStatement.

Definition at line 367 of file statement.h.

References NULL.

Referenced by RefExp::ascendType(), UserProc::checkLocalFor(), UserProc::findLocalFromRef(), UserProc::lookupParam(), UserProc::lookupSymFromRef(), UserProc::lookupSymFromRefAny(), meetWithFor(), and ExpCastInserter::postVisit().

void Statement::insertCasts  ) 
 

Definition at line 5091 of file statement.cpp.

References accept(), and proc.

bool Statement::isAssign  )  [inline]
 

Definition at line 204 of file statement.h.

References kind, and STMT_ASSIGN.

Referenced by canPropagateToExp(), PentiumFrontEnd::isAssignFromTern(), PentiumFrontEnd::isDecAh(), PentiumFrontEnd::isSetX(), PentiumFrontEnd::isStoreFsw(), SparcFrontEnd::optimise_CallReturn(), ExpPropagator::postVisit(), CallStatement::print(), propagateFlagsTo(), propagateTo(), StatementTest::testIsAssign(), and toBranches().

bool Statement::isAssignment  )  [inline]
 

Definition at line 206 of file statement.h.

References kind, STMT_ASSIGN, STMT_BOOLASSIGN, STMT_IMPASSIGN, and STMT_PHIASSIGN.

bool Statement::isBool  )  [inline]
 

Definition at line 227 of file statement.h.

References kind, and STMT_BOOLASSIGN.

virtual bool Statement::isBranch  )  [inline, virtual]
 

Definition at line 218 of file statement.h.

References kind, and STMT_BRANCH.

Referenced by JunctionStatement::rangeAnalysis(), and updateRanges().

bool Statement::isCall  )  [inline]
 

Definition at line 224 of file statement.h.

References kind, and STMT_CALL.

Referenced by UserProc::checkForGainfulUse(), CallBypasser::postVisit(), UserProc::removeUnusedLocals(), and PrimitiveTester::visit().

bool Statement::isCase  )  [inline]
 

Definition at line 236 of file statement.h.

References kind, and STMT_CASE.

virtual bool Statement::isDefinition  )  [pure virtual]
 

Implemented in Assignment, Assign, BoolAssign, ImpRefStatement, GotoStatement, JunctionStatement, CallStatement, and ReturnStatement.

bool Statement::isFirstStatementInBB  ) 
 

Definition at line 571 of file statement.cpp.

Referenced by getInputRanges().

bool Statement::isFlagAssgn  ) 
 

Definition at line 636 of file statement.cpp.

References kind, opFlagCall, and STMT_ASSIGN.

Referenced by RTL::areFlagsAffected(), RTL::isCompare(), and StatementTest::testIsFlagAssgn().

bool Statement::isFpop  ) 
 

Definition at line 960 of file statement.cpp.

References kind, opFpop, and STMT_ASSIGN.

bool Statement::isFpush  ) 
 

Definition at line 956 of file statement.cpp.

References kind, opFpush, and STMT_ASSIGN.

Referenced by PentiumFrontEnd::processFloatCode().

virtual bool Statement::isGoto  )  [inline, virtual]
 

Definition at line 217 of file statement.h.

References kind, and STMT_GOTO.

bool Statement::isHL_ICT  )  [inline]
 

Definition at line 234 of file statement.h.

References kind, and STMT_CASE.

bool Statement::isImplicit  )  [inline]
 

Definition at line 211 of file statement.h.

References kind, and STMT_IMPASSIGN.

Referenced by UserProc::countRefs(), RefExp::operator==(), and ConstGlobalConverter::preVisit().

bool Statement::isImpRef  )  [inline]
 

Definition at line 215 of file statement.h.

References kind, and STMT_IMPREF.

bool Statement::isJunction  )  [inline]
 

Definition at line 221 of file statement.h.

References kind, and STMT_JUNCTION.

bool Statement::isLastStatementInBB  ) 
 

Definition at line 581 of file statement.cpp.

Referenced by updateRanges().

bool Statement::isNullStatement  ) 
 

Definition at line 944 of file statement.cpp.

References Exp::isSubscript(), kind, and STMT_ASSIGN.

Referenced by canPropagateToExp(), and UserProc::removeNullStatements().

bool Statement::isPhi  )  [inline]
 

Definition at line 209 of file statement.h.

References kind, and STMT_PHIASSIGN.

Referenced by BasicBlock::decodeIndirectJmp(), findConstantValues(), DataFlow::findLiveAtDomPhi(), UserProc::findPhiUnites(), UserProc::nameParameterPhis(), DataFlow::renameBlockVars(), and UserProc::reverseStrengthReduction().

bool Statement::isReturn  )  [inline]
 

Definition at line 230 of file statement.h.

References kind, and STMT_RET.

Referenced by FrontEnd::createReturnBlock(), and UserProc::removeUnusedLocals().

virtual bool Statement::isTyping  )  [inline, virtual]
 

Reimplemented in TypingStatement.

Definition at line 202 of file statement.h.

void Statement::mapRegistersToLocals  ) 
 

Definition at line 5085 of file statement.cpp.

References accept(), and proc.

bool Statement::mayAlias Exp e1,
Exp e2,
int  size
 

Definition at line 78 of file statement.cpp.

References calcMayAlias(), LOG, and VERBOSE.

Type * Statement::meetWithFor Type ty,
Exp e,
bool &  ch
 

Definition at line 676 of file dfa.cpp.

References Type::clone(), getTypeFor(), Type::meetWith(), and setTypeFor().

Referenced by RefExp::descendType(), and Signature::dfaTypeAnalysis().

virtual void Statement::print std::ostream &  os,
bool  html = false
[pure virtual]
 

Implemented in Assignment, ImpRefStatement, GotoStatement, JunctionStatement, BranchStatement, CaseStatement, CallStatement, and ReturnStatement.

Referenced by dump(), operator<<(), prints(), StatementTest::testClone(), and ParserTest::testExp().

void Statement::printAsUse std::ostream &  os  )  [inline]
 

Definition at line 255 of file statement.h.

References number.

Referenced by Signature::usesNewParam().

void Statement::printAsUseBy std::ostream &  os  )  [inline]
 

Definition at line 256 of file statement.h.

References number.

void Statement::printNum std::ostream &  os  )  [inline]
 

Definition at line 257 of file statement.h.

References number.

Referenced by RefExp::print().

char * Statement::prints  ) 
 

Definition at line 643 of file statement.cpp.

References debug_buffer, DEBUG_BUFSIZE, and print().

bool Statement::propagateFlagsTo  ) 
 

Definition at line 837 of file statement.cpp.

References addUsedLocs(), LocationSet::begin(), doPropagateTo(), LocationSet::end(), isAssign(), Exp::isFlags(), Exp::isMainFlag(), and NULL.

bool Statement::propagateTo bool &  convert,
std::map< Exp *, int, lessExpStar > *  destCounts = NULL,
LocationSet usedByDomPhi = NULL,
bool  force = false
 

Definition at line 717 of file statement.cpp.

References Exp::addUsedLocs(), addUsedLocs(), LocationSet::begin(), canPropagateToExp(), Exp::containsBadMemof(), dominanceNum, LocationSet::end(), LocationSet::exists(), EXPERIMENTAL, LocationSet::findNS(), Boomerang::get(), getDomNumber(), Assignment::getLeft(), getNumber(), Assign::getRight(), Unary::getSubExp1(), isAssign(), Exp::isMemOf(), LOG, number, proc, and Boomerang::propMaxDepth.

void Statement::rangeAnalysis std::list< Statement * > &  execution_paths  )  [virtual]
 

Reimplemented in Assign, JunctionStatement, BranchStatement, and CallStatement.

Definition at line 198 of file statement.cpp.

References getInputRanges(), and updateRanges().

bool Statement::replaceRef Exp e,
Assign def,
bool &  convert
 

Definition at line 885 of file statement.cpp.

References Assignment::getLeft(), Exp::getOper(), Assign::getRight(), Exp::isFlagCall(), Exp::isFlags(), opCF, opLessUns, and searchAndReplace().

Referenced by doPropagateTo().

void Statement::replaceSubscriptsWithLocals  ) 
 

Definition at line 5101 of file statement.cpp.

References accept(), and proc.

virtual bool Statement::search Exp search,
Exp *&  result
[pure virtual]
 

Implemented in Assignment, Assign, PhiAssign, ImplicitAssign, BoolAssign, ImpRefStatement, GotoStatement, JunctionStatement, BranchStatement, CallStatement, and ReturnStatement.

virtual bool Statement::searchAll Exp search,
std::list< Exp * > &  result
[pure virtual]
 

Implemented in Assignment, Assign, PhiAssign, ImplicitAssign, BoolAssign, GotoStatement, JunctionStatement, BranchStatement, CaseStatement, CallStatement, and ReturnStatement.

virtual bool Statement::searchAndReplace Exp search,
Exp replace,
bool  cc = false
[pure virtual]
 

Implemented in Assignment, Assign, PhiAssign, ImplicitAssign, BoolAssign, ImpRefStatement, GotoStatement, JunctionStatement, BranchStatement, CaseStatement, CallStatement, and ReturnStatement.

Referenced by replaceRef().

void Statement::setBB PBB  bb  )  [inline]
 

Definition at line 162 of file statement.h.

References pbb.

Referenced by PhiAssign::convertToAssign(), CallStatement::generateCode(), BasicBlock::prependStmt(), CallStatement::rangeAnalysis(), CallStatement::setNumArguments(), CallStatement::setSigArguments(), and CallStatement::updateArguments().

int Statement::setConscripts int  n  ) 
 

Definition at line 3723 of file statement.cpp.

References accept(), and StmtConscriptSetter::getLast().

void Statement::setDomNumber int  dn  )  [inline]
 

Definition at line 145 of file statement.h.

References dominanceNum.

void Statement::setKind STMT_KIND  k  )  [inline]
 

Definition at line 173 of file statement.h.

References kind.

virtual void Statement::setLeftFor Exp forExp,
Exp newExp
[inline, virtual]
 

Reimplemented in Assignment, and CallStatement.

Definition at line 247 of file statement.h.

void Statement::setLexBegin unsigned int  n  )  [inline]
 

Definition at line 189 of file statement.h.

References lexBegin.

void Statement::setLexEnd unsigned int  n  )  [inline]
 

Definition at line 190 of file statement.h.

References lexEnd.

virtual void Statement::setNumber int  num  )  [inline, virtual]
 

Reimplemented in CallStatement.

Definition at line 170 of file statement.h.

References number.

Referenced by PhiAssign::convertToAssign(), CallStatement::generateCode(), CallStatement::setSigArguments(), ExpTest::testAddUsedLocs(), StatementTest::testAddUsedLocsAssign(), StatementTest::testAddUsedLocsBool(), StatementTest::testAddUsedLocsBranch(), StatementTest::testAddUsedLocsCall(), StatementTest::testAddUsedLocsReturn(), StatementTest::testFlow(), StatementTest::testKill(), StatementTest::testLocationSet(), ExpTest::testSubscriptVar(), StatementTest::testSubscriptVars(), ExpTest::testSubscriptVars(), ExpTest::testTypeOf(), StatementTest::testUse(), StatementTest::testUseKill(), StatementTest::testUseOverBB(), StatementTest::testUseOverKill(), ExpTest::testVisitors(), StatementTest::testWildLocationSet(), and CallStatement::updateArguments().

void Statement::setParent Statement par  )  [inline]
 

Definition at line 175 of file statement.h.

References parent.

Referenced by CallStatement::setSigArguments(), and CallStatement::updateArguments().

void Statement::setProc UserProc p  ) 
 

Definition at line 56 of file statement.cpp.

References addUsedLocs(), LocationSet::begin(), LocationSet::end(), getDefinitions(), LocationSet::makeUnion(), and proc.

Referenced by PhiAssign::convertToAssign(), CallStatement::generateCode(), UserProc::insertAssignAfter(), BasicBlock::prependStmt(), CallStatement::rangeAnalysis(), CallStatement::setNumArguments(), CallStatement::setSigArguments(), StatementTest::testEndlessLoop(), StatementTest::testFlow(), StatementTest::testKill(), StatementTest::testUse(), StatementTest::testUseKill(), StatementTest::testUseOverBB(), StatementTest::testUseOverKill(), CallStatement::updateArguments(), and DefCollector::updateDefs().

virtual void Statement::setTypeFor Exp e,
Type ty
[inline, virtual]
 

Reimplemented in Assignment, CallStatement, and ReturnStatement.

Definition at line 369 of file statement.h.

Referenced by meetWithFor(), and CallStatement::setTypeFor().

virtual void Statement::simplify  )  [pure virtual]
 

Implemented in Assignment, Assign, PhiAssign, ImplicitAssign, BoolAssign, ImpRefStatement, GotoStatement, JunctionStatement, BranchStatement, CaseStatement, CallStatement, and ReturnStatement.

Referenced by bypass().

virtual void Statement::simplifyAddr  )  [inline, virtual]
 

Reimplemented in Assignment, and Assign.

Definition at line 287 of file statement.h.

void Statement::stripSizes  ) 
 

Definition at line 3742 of file statement.cpp.

References accept().

Referenced by StatementTest::testStripSizes().

void Statement::subscriptVar Exp e,
Statement def
 

Definition at line 4131 of file statement.cpp.

References accept().

Referenced by ExpTest::testSubscriptVar(), and StatementTest::testSubscriptVars().

void Statement::updateRanges RangeMap output,
std::list< Statement * > &  execution_paths,
bool  notTaken = false
[protected]
 

Definition at line 175 of file statement.cpp.

References BasicBlock::getFirstStmt(), BasicBlock::getLowAddr(), getNextStatementInBB(), BasicBlock::getNumOutEdges(), BasicBlock::getOutEdge(), isBranch(), isLastStatementInBB(), RangeMap::isSubset(), pbb, and ranges.

Referenced by rangeAnalysis().

virtual bool Statement::usesExp Exp e  )  [pure virtual]
 

Implemented in Assignment, Assign, BoolAssign, ImpRefStatement, GotoStatement, JunctionStatement, BranchStatement, CaseStatement, CallStatement, and ReturnStatement.

Referenced by Signature::usesNewParam().


Friends And Related Function Documentation

friend class XMLProgParser [friend]
 

Reimplemented in Assignment, Assign, PhiAssign, BoolAssign, GotoStatement, BranchStatement, CaseStatement, CallStatement, and ReturnStatement.

Definition at line 378 of file statement.h.


Member Data Documentation

int Statement::dominanceNum [protected]
 

Definition at line 142 of file statement.h.

Referenced by getDomNumber(), propagateTo(), and setDomNumber().

STMT_KIND Statement::kind [protected]
 

Definition at line 148 of file statement.h.

Referenced by Assign::Assign(), BoolAssign::BoolAssign(), BranchStatement::BranchStatement(), CallStatement::CallStatement(), CaseStatement::CaseStatement(), getKind(), GotoStatement::GotoStatement(), ImplicitAssign::ImplicitAssign(), ImpRefStatement::ImpRefStatement(), isAssign(), isAssignment(), isBool(), isBranch(), isCall(), isCase(), isFlagAssgn(), isFpop(), isFpush(), isGoto(), isHL_ICT(), isImplicit(), isImpRef(), isJunction(), isNullStatement(), isPhi(), isReturn(), JunctionStatement::JunctionStatement(), PhiAssign::PhiAssign(), ReturnStatement::ReturnStatement(), and setKind().

unsigned int Statement::lexBegin [protected]
 

Definition at line 153 of file statement.h.

Referenced by getLexBegin(), and setLexBegin().

unsigned int Statement::lexEnd [protected]
 

Definition at line 153 of file statement.h.

Referenced by getLexEnd(), and setLexEnd().

int Statement::number [protected]
 

Definition at line 140 of file statement.h.

Referenced by Assign::clone(), BoolAssign::clone(), ReturnStatement::clone(), CallStatement::clone(), CaseStatement::clone(), BranchStatement::clone(), GotoStatement::clone(), PhiAssign::convertToAssign(), dfaMapLocals(), BranchStatement::genConstraints(), CallStatement::generateCode(), getNumber(), XMLProgParser::persistToXML(), JunctionStatement::print(), ImpRefStatement::print(), ReturnStatement::print(), Assignment::print(), CallStatement::print(), CaseStatement::print(), BranchStatement::print(), GotoStatement::print(), printAsUse(), printAsUseBy(), printNum(), propagateTo(), setNumber(), CallStatement::setNumber(), CallStatement::setSigArguments(), and CallStatement::updateArguments().

Statement* Statement::parent [protected]
 

Definition at line 149 of file statement.h.

Referenced by getParent(), XMLProgParser::persistToXML(), and setParent().

PBB Statement::pbb [protected]
 

Definition at line 138 of file statement.h.

Referenced by Assign::clone(), BoolAssign::clone(), ReturnStatement::clone(), CallStatement::clone(), CaseStatement::clone(), BranchStatement::clone(), GotoStatement::clone(), CallStatement::generateCode(), getBB(), getInputRanges(), JunctionStatement::rangeAnalysis(), setBB(), and updateRanges().

UserProc* Statement::proc [protected]
 

Definition at line 139 of file statement.h.

Referenced by addUsedLocals(), CallStatement::calcResults(), Assign::clone(), BoolAssign::clone(), ReturnStatement::clone(), CallStatement::clone(), CaseStatement::clone(), BranchStatement::clone(), GotoStatement::clone(), PhiAssign::convertToAssign(), dfaMapLocals(), Assignment::dfaTypeAnalysis(), CallStatement::generateCode(), getProc(), insertCasts(), CallStatement::makeArgAssign(), mapRegistersToLocals(), XMLProgParser::persistToXML(), propagateTo(), CallStatement::rangeAnalysis(), replaceSubscriptsWithLocals(), CallStatement::setArguments(), CallStatement::setNumArguments(), setProc(), CallStatement::setSigArguments(), CallStatement::updateArguments(), CallStatement::updateDefines(), ReturnStatement::updateModifieds(), ReturnStatement::updateReturns(), and CallStatement::useColFromSsaForm().

RangeMap Statement::ranges [protected]
 

Definition at line 150 of file statement.h.

Referenced by clearRanges(), getRanges(), BranchStatement::getRangesForOutEdgeTo(), Assignment::print(), and updateRanges().

RangeMap Statement::savedInputRanges [protected]
 

Definition at line 151 of file statement.h.

Referenced by getInputRanges(), and getSavedInputRanges().


The documentation for this class was generated from the following files:
Generated on Tue Sep 19 21:18:46 2006 for Boomerang by  doxygen 1.4.6