#include <include/statement.h>
Inheritance diagram for Statement:
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 Statement * | clone ()=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 () |
Exp * | getExpAtLex (unsigned int begin, unsigned int end) |
RangeMap | getInputRanges () |
STMT_KIND | getKind () |
unsigned int | getLexBegin () |
unsigned int | getLexEnd () |
Statement * | getNextStatementInBB () |
int | getNumber () |
Statement * | getParent () |
Statement * | getPreviousStatementInBB () |
UserProc * | getProc () |
RangeMap & | getRanges () |
RangeMap & | getSavedInputRanges () |
virtual Type * | getTypeFor (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) |
Type * | meetWithFor (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 |
Statement * | parent |
PBB | pbb |
UserProc * | proc |
RangeMap | ranges |
RangeMap | savedInputRanges |
Friends | |
class | XMLProgParser |
|
Definition at line 157 of file statement.h. |
|
Definition at line 158 of file statement.h. |
|
Implemented in Assignment, Assign, PhiAssign, ImplicitAssign, BoolAssign, ImpRefStatement, GotoStatement, JunctionStatement, BranchStatement, CaseStatement, CallStatement, and ReturnStatement. |
|
Implemented in Assignment, Assign, PhiAssign, ImplicitAssign, BoolAssign, ImpRefStatement, GotoStatement, JunctionStatement, BranchStatement, CaseStatement, CallStatement, and ReturnStatement. |
|
Implemented in Assignment, Assign, PhiAssign, ImplicitAssign, BoolAssign, ImpRefStatement, GotoStatement, JunctionStatement, BranchStatement, CaseStatement, CallStatement, and ReturnStatement. |
|
|
Definition at line 4123 of file statement.cpp. References accept(), proc, and UsedLocalFinder::wasAllFound(). Referenced by UserProc::removeUnusedLocals(). |
|
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(). |
|
Definition at line 4106 of file statement.cpp. References accept(), SimpExpModifier::isTopChanged(), and simplify(). Referenced by StatementTest::testBypass(). |
|
Definition at line 90 of file statement.cpp. References Exp::isMemOf(). Referenced by mayAlias(). |
|
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(). |
|
Definition at line 3735 of file statement.cpp. References accept(), and ExpConstCaster::isChanged(). |
|
Definition at line 3729 of file statement.cpp. References accept(). |
|
Definition at line 179 of file statement.h. References RangeMap::clear(), and ranges. |
|
Implemented in Assignment, Assign, PhiAssign, ImplicitAssign, BoolAssign, ImpRefStatement, GotoStatement, JunctionStatement, BranchStatement, CaseStatement, CallStatement, and ReturnStatement. |
|
Reimplemented in Assignment, CallStatement, and ReturnStatement. Definition at line 248 of file statement.h. |
|
Definition at line 5107 of file statement.cpp. References accept(), DfaLocalMapper::change, LOG, number, and proc. Referenced by UserProc::mapLocalsAndParams(). |
|
Reimplemented in Assignment, Assign, PhiAssign, ImplicitAssign, BoolAssign, BranchStatement, CallStatement, and ReturnStatement. Definition at line 306 of file statement.h. |
|
Definition at line 865 of file statement.cpp. References Boomerang::get(), LOG, Boomerang::numToPropagate, and replaceRef(). Referenced by propagateFlagsTo(). |
|
Definition at line 652 of file statement.cpp. References print(). |
|
Definition at line 4138 of file statement.cpp. References accept(). Referenced by StatementTest::testFindConstants(). |
|
Reimplemented in Assign. Definition at line 300 of file statement.h. |
|
Reimplemented in Assignment, Assign, PhiAssign, BranchStatement, and CallStatement. Definition at line 303 of file statement.h. |
|
Implemented in Assignment, Assign, BoolAssign, ImpRefStatement, GotoStatement, JunctionStatement, BranchStatement, CaseStatement, CallStatement, and ReturnStatement. |
|
Definition at line 161 of file statement.h. References pbb. Referenced by UserProc::insertAssignAfter(), and UserProc::setImplicitRef(). |
|
Reimplemented in Assignment, BoolAssign, CallStatement, and ReturnStatement. Definition at line 244 of file statement.h. Referenced by setProc(). |
|
Definition at line 144 of file statement.h. References dominanceNum. Referenced by propagateTo(). |
|
Definition at line 73 of file statement.cpp. References NULL. |
|
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(). |
|
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(). |
|
Definition at line 191 of file statement.h. References lexBegin. Referenced by UserProc::getStmtAtLex(). |
|
Definition at line 192 of file statement.h. References lexEnd. |
|
Definition at line 604 of file statement.cpp. Referenced by updateRanges(). |
|
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(). |
|
Definition at line 176 of file statement.h. References parent. |
|
Definition at line 587 of file statement.cpp. References NULL. Referenced by getInputRanges(). |
|
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(). |
|
Definition at line 178 of file statement.h. References ranges. Referenced by getInputRanges(). |
|
Definition at line 313 of file statement.h. References savedInputRanges. |
|
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(). |
|
Definition at line 5091 of file statement.cpp. |
|
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(). |
|
Definition at line 206 of file statement.h. References kind, STMT_ASSIGN, STMT_BOOLASSIGN, STMT_IMPASSIGN, and STMT_PHIASSIGN. |
|
Definition at line 227 of file statement.h. References kind, and STMT_BOOLASSIGN. |
|
Definition at line 218 of file statement.h. References kind, and STMT_BRANCH. Referenced by JunctionStatement::rangeAnalysis(), and updateRanges(). |
|
Definition at line 224 of file statement.h. References kind, and STMT_CALL. Referenced by UserProc::checkForGainfulUse(), CallBypasser::postVisit(), UserProc::removeUnusedLocals(), and PrimitiveTester::visit(). |
|
Definition at line 236 of file statement.h. |
|
Implemented in Assignment, Assign, BoolAssign, ImpRefStatement, GotoStatement, JunctionStatement, CallStatement, and ReturnStatement. |
|
Definition at line 571 of file statement.cpp. Referenced by getInputRanges(). |
|
Definition at line 636 of file statement.cpp. References kind, opFlagCall, and STMT_ASSIGN. Referenced by RTL::areFlagsAffected(), RTL::isCompare(), and StatementTest::testIsFlagAssgn(). |
|
Definition at line 960 of file statement.cpp. References kind, opFpop, and STMT_ASSIGN. |
|
Definition at line 956 of file statement.cpp. References kind, opFpush, and STMT_ASSIGN. Referenced by PentiumFrontEnd::processFloatCode(). |
|
Definition at line 217 of file statement.h. |
|
Definition at line 234 of file statement.h. |
|
Definition at line 211 of file statement.h. References kind, and STMT_IMPASSIGN. Referenced by UserProc::countRefs(), RefExp::operator==(), and ConstGlobalConverter::preVisit(). |
|
Definition at line 215 of file statement.h. References kind, and STMT_IMPREF. |
|
Definition at line 221 of file statement.h. References kind, and STMT_JUNCTION. |
|
Definition at line 581 of file statement.cpp. Referenced by updateRanges(). |
|
Definition at line 944 of file statement.cpp. References Exp::isSubscript(), kind, and STMT_ASSIGN. Referenced by canPropagateToExp(), and UserProc::removeNullStatements(). |
|
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(). |
|
Definition at line 230 of file statement.h. References kind, and STMT_RET. Referenced by FrontEnd::createReturnBlock(), and UserProc::removeUnusedLocals(). |
|
Reimplemented in TypingStatement. Definition at line 202 of file statement.h. |
|
Definition at line 5085 of file statement.cpp. |
|
Definition at line 78 of file statement.cpp. References calcMayAlias(), LOG, and VERBOSE. |
|
Definition at line 676 of file dfa.cpp. References Type::clone(), getTypeFor(), Type::meetWith(), and setTypeFor(). Referenced by RefExp::descendType(), and Signature::dfaTypeAnalysis(). |
|
Implemented in Assignment, ImpRefStatement, GotoStatement, JunctionStatement, BranchStatement, CaseStatement, CallStatement, and ReturnStatement. Referenced by dump(), operator<<(), prints(), StatementTest::testClone(), and ParserTest::testExp(). |
|
Definition at line 255 of file statement.h. References number. Referenced by Signature::usesNewParam(). |
|
Definition at line 256 of file statement.h. References number. |
|
Definition at line 257 of file statement.h. References number. Referenced by RefExp::print(). |
|
Definition at line 643 of file statement.cpp. References debug_buffer, DEBUG_BUFSIZE, and print(). |
|
Definition at line 837 of file statement.cpp. References addUsedLocs(), LocationSet::begin(), doPropagateTo(), LocationSet::end(), isAssign(), Exp::isFlags(), Exp::isMainFlag(), and NULL. |
|
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. |
|
Reimplemented in Assign, JunctionStatement, BranchStatement, and CallStatement. Definition at line 198 of file statement.cpp. References getInputRanges(), and updateRanges(). |
|
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(). |
|
Definition at line 5101 of file statement.cpp. |
|
Implemented in Assignment, Assign, PhiAssign, ImplicitAssign, BoolAssign, ImpRefStatement, GotoStatement, JunctionStatement, BranchStatement, CallStatement, and ReturnStatement. |
|
Implemented in Assignment, Assign, PhiAssign, ImplicitAssign, BoolAssign, GotoStatement, JunctionStatement, BranchStatement, CaseStatement, CallStatement, and ReturnStatement. |
|
Implemented in Assignment, Assign, PhiAssign, ImplicitAssign, BoolAssign, ImpRefStatement, GotoStatement, JunctionStatement, BranchStatement, CaseStatement, CallStatement, and ReturnStatement. Referenced by replaceRef(). |
|
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(). |
|
Definition at line 3723 of file statement.cpp. References accept(), and StmtConscriptSetter::getLast(). |
|
Definition at line 145 of file statement.h. References dominanceNum. |
|
Definition at line 173 of file statement.h. References kind. |
|
Reimplemented in Assignment, and CallStatement. Definition at line 247 of file statement.h. |
|
Definition at line 189 of file statement.h. References lexBegin. |
|
Definition at line 190 of file statement.h. References lexEnd. |
|
|
Definition at line 175 of file statement.h. References parent. Referenced by CallStatement::setSigArguments(), and CallStatement::updateArguments(). |
|
|
Reimplemented in Assignment, CallStatement, and ReturnStatement. Definition at line 369 of file statement.h. Referenced by meetWithFor(), and CallStatement::setTypeFor(). |
|
Implemented in Assignment, Assign, PhiAssign, ImplicitAssign, BoolAssign, ImpRefStatement, GotoStatement, JunctionStatement, BranchStatement, CaseStatement, CallStatement, and ReturnStatement. Referenced by bypass(). |
|
Reimplemented in Assignment, and Assign. Definition at line 287 of file statement.h. |
|
Definition at line 3742 of file statement.cpp. References accept(). Referenced by StatementTest::testStripSizes(). |
|
Definition at line 4131 of file statement.cpp. References accept(). Referenced by ExpTest::testSubscriptVar(), and StatementTest::testSubscriptVars(). |
|
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(). |
|
Implemented in Assignment, Assign, BoolAssign, ImpRefStatement, GotoStatement, JunctionStatement, BranchStatement, CaseStatement, CallStatement, and ReturnStatement. Referenced by Signature::usesNewParam(). |
|
Reimplemented in Assignment, Assign, PhiAssign, BoolAssign, GotoStatement, BranchStatement, CaseStatement, CallStatement, and ReturnStatement. Definition at line 378 of file statement.h. |
|
Definition at line 142 of file statement.h. Referenced by getDomNumber(), propagateTo(), and setDomNumber(). |
|
|
Definition at line 153 of file statement.h. Referenced by getLexBegin(), and setLexBegin(). |
|
Definition at line 153 of file statement.h. Referenced by getLexEnd(), and setLexEnd(). |
|
|
Definition at line 149 of file statement.h. Referenced by getParent(), XMLProgParser::persistToXML(), and setParent(). |
|
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(). |
|
|
Definition at line 150 of file statement.h. Referenced by clearRanges(), getRanges(), BranchStatement::getRangesForOutEdgeTo(), Assignment::print(), and updateRanges(). |
|
Definition at line 151 of file statement.h. Referenced by getInputRanges(), and getSavedInputRanges(). |