BranchStatement Class Reference

#include <include/statement.h>

Inheritance diagram for BranchStatement:

GotoStatement Statement List of all members.

Detailed Description

Definition at line 901 of file statement.h.

Public Member Functions

virtual bool accept (StmtPartModifier *visitor)
virtual bool accept (StmtModifier *visitor)
virtual bool accept (StmtExpVisitor *visitor)
virtual bool accept (StmtVisitor *visitor)
 BranchStatement ()
virtual Statementclone ()
void dfaTypeAnalysis (bool &ch)
virtual void genConstraints (LocationSet &cons)
virtual void generateCode (HLLCode *hll, BasicBlock *pbb, int indLevel)
BRANCH_TYPE getCond ()
ExpgetCondExpr ()
PBB getFallBB ()
RangeMapgetRanges2Ref ()
RangeMapgetRangesForOutEdgeTo (PBB out)
PBB getTakenBB ()
bool isFloat ()
void limitOutputWithCondition (RangeMap &output, Exp *e)
void makeSigned ()
virtual void print (std::ostream &os=std::cout, bool html=false)
void rangeAnalysis (std::list< Statement * > &execution_paths)
virtual bool search (Exp *search, Exp *&result)
virtual bool searchAll (Exp *search, std::list< Exp * > &result)
virtual bool searchAndReplace (Exp *search, Exp *replace, bool cc=false)
void setCondExpr (Exp *pe)
void setCondExprND (Exp *e)
void setCondType (BRANCH_TYPE cond, bool usesFloat=false)
void setFallBB (PBB bb)
void setFloat (bool b)
void setRanges2 (RangeMap &r)
void setTakenBB (PBB bb)
virtual void simplify ()
virtual bool usesExp (Exp *e)
virtual ~BranchStatement ()

Private Attributes

bool bFloat
BRANCH_TYPE jtCond
ExppCond
RangeMap ranges2
int size

Friends

class XMLProgParser


Constructor & Destructor Documentation

BranchStatement::BranchStatement  ) 
 

Definition at line 1209 of file statement.cpp.

References Statement::kind, and STMT_BRANCH.

Referenced by clone().

BranchStatement::~BranchStatement  )  [virtual]
 

Definition at line 1219 of file statement.cpp.

References pCond.


Member Function Documentation

bool BranchStatement::accept StmtPartModifier visitor  )  [virtual]
 

Reimplemented from GotoStatement.

Definition at line 4035 of file statement.cpp.

References Exp::accept(), StmtPartModifier::mod, pCond, GotoStatement::pDest, and StmtPartModifier::visit().

bool BranchStatement::accept StmtModifier visitor  )  [virtual]
 

Reimplemented from GotoStatement.

Definition at line 3923 of file statement.cpp.

References Exp::accept(), StmtModifier::mod, pCond, GotoStatement::pDest, and StmtModifier::visit().

bool BranchStatement::accept StmtExpVisitor visitor  )  [virtual]
 

Reimplemented from GotoStatement.

Definition at line 3795 of file statement.cpp.

References Exp::accept(), StmtExpVisitor::ev, pCond, GotoStatement::pDest, and StmtExpVisitor::visit().

bool BranchStatement::accept StmtVisitor visitor  )  [virtual]
 

Reimplemented from GotoStatement.

Definition at line 1517 of file statement.cpp.

References StmtVisitor::visit().

Referenced by RtlTest::testVisitor().

Statement * BranchStatement::clone  )  [virtual]
 

Reimplemented from GotoStatement.

Definition at line 1501 of file statement.cpp.

References bFloat, BranchStatement(), Exp::clone(), jtCond, GotoStatement::m_isComputed, NULL, Statement::number, Statement::pbb, pCond, GotoStatement::pDest, and Statement::proc.

void BranchStatement::dfaTypeAnalysis bool &  ch  )  [virtual]
 

Reimplemented from Statement.

Definition at line 822 of file dfa.cpp.

References Exp::descendType(), and pCond.

void BranchStatement::genConstraints LocationSet cons  )  [virtual]
 

Reimplemented from Statement.

Definition at line 3679 of file statement.cpp.

References bFloat, BRANCH_JSG, BRANCH_JSGE, BRANCH_JSL, BRANCH_JSLE, BRANCH_JUG, BRANCH_JUGE, BRANCH_JUL, BRANCH_JULE, Exp::getArity(), jtCond, LOG, NULL, Statement::number, pCond, and Type::setSize().

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

Reimplemented from GotoStatement.

Definition at line 1521 of file statement.cpp.

BRANCH_TYPE BranchStatement::getCond  )  [inline]
 

Definition at line 926 of file statement.h.

References jtCond.

Exp * BranchStatement::getCondExpr  ) 
 

Definition at line 1324 of file statement.cpp.

References pCond.

Referenced by BasicBlock::getCond(), and StmtConscriptSetter::visit().

PBB BranchStatement::getFallBB  ) 
 

Definition at line 1339 of file statement.cpp.

References GotoStatement::getFixedDest(), NO_ADDRESS, and NULL.

RangeMap& BranchStatement::getRanges2Ref  )  [inline]
 

Definition at line 966 of file statement.h.

References ranges2.

RangeMap & BranchStatement::getRangesForOutEdgeTo PBB  out  ) 
 

Definition at line 563 of file statement.cpp.

References GotoStatement::getFixedDest(), BasicBlock::getLowAddr(), NO_ADDRESS, Statement::ranges, and ranges2.

PBB BranchStatement::getTakenBB  ) 
 

Definition at line 1374 of file statement.cpp.

References GotoStatement::getFixedDest(), NO_ADDRESS, and NULL.

bool BranchStatement::isFloat  )  [inline]
 

Definition at line 927 of file statement.h.

References bFloat.

void BranchStatement::limitOutputWithCondition RangeMap output,
Exp e
 

Definition at line 300 of file statement.cpp.

References RangeMap::addRange(), Range::getBase(), Range::getLowerBound(), Exp::getOper(), RangeMap::getRange(), Range::getStride(), Exp::getSubExp1(), Exp::getSubExp2(), Range::getUpperBound(), RangeMap::hasRange(), Exp::isIntConst(), opEquals, opGtr, opGtrEq, opGtrEqUns, opGtrUns, opLess, opLessEq, opLessEqUns, opLessUns, and opNotEqual.

void BranchStatement::makeSigned  ) 
 

Definition at line 1304 of file statement.cpp.

References BRANCH_JSG, BRANCH_JSGE, BRANCH_JSL, BRANCH_JSLE, BRANCH_JUG, BRANCH_JUGE, BRANCH_JUL, BRANCH_JULE, and jtCond.

void BranchStatement::print std::ostream &  os = std::cout,
bool  html = false
[virtual]
 

Reimplemented from GotoStatement.

Definition at line 1450 of file statement.cpp.

References bFloat, BRANCH_JE, BRANCH_JMI, BRANCH_JNE, BRANCH_JNOF, BRANCH_JOF, BRANCH_JPAR, BRANCH_JPOS, BRANCH_JSG, BRANCH_JSGE, BRANCH_JSL, BRANCH_JSLE, BRANCH_JUG, BRANCH_JUGE, BRANCH_JUL, BRANCH_JULE, GotoStatement::getFixedDest(), Exp::isIntConst(), jtCond, NULL, Statement::number, pCond, GotoStatement::pDest, and Exp::print().

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

Reimplemented from Statement.

Definition at line 354 of file statement.cpp.

References Exp::clone(), DEBUG_RANGE_ANALYSIS, Range::getBase(), Statement::getInputRanges(), Exp::getOper(), RangeMap::getRange(), Exp::getSubExp1(), Exp::getSubExp2(), RangeMap::hasRange(), Exp::isFlagCall(), Exp::isFlags(), LOG, NULL, opEquals, opGtr, opGtrEq, opGtrEqUns, opGtrUns, opLess, opLessEq, opLessEqUns, opLessUns, opList, opNotEqual, pCond, and VERBOSE.

bool BranchStatement::search Exp search,
Exp *&  result
[virtual]
 

Reimplemented from GotoStatement.

Definition at line 1408 of file statement.cpp.

References NULL, pCond, result, and Exp::search().

Referenced by searchAll(), and searchAndReplace().

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

Reimplemented from GotoStatement.

Definition at line 1438 of file statement.cpp.

References pCond, search(), and Exp::searchAll().

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

Reimplemented from GotoStatement.

Definition at line 1422 of file statement.cpp.

References pCond, search(), GotoStatement::searchAndReplace(), and Exp::searchReplaceAll().

void BranchStatement::setCondExpr Exp pe  ) 
 

Definition at line 1334 of file statement.cpp.

References pCond.

Referenced by ST20Decoder::decodeInstruction(), genBSFR(), setCondType(), StatementTest::testAddUsedLocsBranch(), StatementTest::testSubscriptVars(), and toBranches().

void BranchStatement::setCondExprND Exp e  )  [inline]
 

Definition at line 934 of file statement.h.

References pCond.

void BranchStatement::setCondType BRANCH_TYPE  cond,
bool  usesFloat = false
 

Definition at line 1234 of file statement.cpp.

References bFloat, BRANCH_JE, BRANCH_JMI, BRANCH_JNE, BRANCH_JNOF, BRANCH_JOF, BRANCH_JPAR, BRANCH_JPOS, BRANCH_JSG, BRANCH_JSGE, BRANCH_JSL, BRANCH_JSLE, BRANCH_JUG, BRANCH_JUGE, BRANCH_JUL, BRANCH_JULE, Boomerang::get(), jtCond, NULL, opEquals, opFflags, opFlags, opGtr, opGtrEq, opGtrEqUns, opGtrUns, opLess, opLessEq, opLessEqUns, opLessUns, opNotEqual, and setCondExpr().

Referenced by SparcDecoder::createBranchRtl(), and genBSFR().

void BranchStatement::setFallBB PBB  bb  ) 
 

Definition at line 1354 of file statement.cpp.

References BasicBlock::addInEdge(), GotoStatement::getFixedDest(), NO_ADDRESS, and NULL.

void BranchStatement::setFloat bool  b  )  [inline]
 

Definition at line 928 of file statement.h.

References bFloat.

void BranchStatement::setRanges2 RangeMap r  )  [inline]
 

Definition at line 967 of file statement.h.

References ranges2.

void BranchStatement::setTakenBB PBB  bb  ) 
 

Definition at line 1388 of file statement.cpp.

References BasicBlock::addInEdge(), GotoStatement::getFixedDest(), NO_ADDRESS, and NULL.

void BranchStatement::simplify  )  [virtual]
 

Reimplemented from GotoStatement.

Definition at line 1783 of file statement.cpp.

References bFloat, condToRelational(), jtCond, and pCond.

bool BranchStatement::usesExp Exp e  )  [virtual]
 

Reimplemented from GotoStatement.

Definition at line 1525 of file statement.cpp.

References pCond, Exp::search(), and tmp.


Friends And Related Function Documentation

friend class XMLProgParser [friend]
 

Reimplemented from GotoStatement.

Definition at line 979 of file statement.h.


Member Data Documentation

bool BranchStatement::bFloat [private]
 

Definition at line 904 of file statement.h.

Referenced by clone(), genConstraints(), isFloat(), print(), setCondType(), setFloat(), and simplify().

BRANCH_TYPE BranchStatement::jtCond [private]
 

Definition at line 902 of file statement.h.

Referenced by clone(), genConstraints(), getCond(), makeSigned(), print(), setCondType(), and simplify().

Exp* BranchStatement::pCond [private]
 

Definition at line 903 of file statement.h.

Referenced by accept(), clone(), dfaTypeAnalysis(), genConstraints(), getCondExpr(), print(), rangeAnalysis(), search(), searchAll(), searchAndReplace(), setCondExpr(), setCondExprND(), simplify(), usesExp(), and ~BranchStatement().

RangeMap BranchStatement::ranges2 [private]
 

Definition at line 908 of file statement.h.

Referenced by getRanges2Ref(), getRangesForOutEdgeTo(), and setRanges2().

int BranchStatement::size [private]
 

Definition at line 907 of file statement.h.


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