NotationGenerator Class Reference

#include <NotationGenerator.hpp>

Collaboration diagram for NotationGenerator:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 NotationGenerator (OA::OA_ptr< OA::Alias::AliasIRInterface > ir, std::ostream &codeStream)
 The notations generated will be outputted to the passed stream.
void generate (OA::ProcHandle proc)
 Output notation for a given procedure to the code stream.

Private Member Functions

void outputProcedure (OA::ProcHandle proc)
 output a PROCEDURE clause
void outputFormals (OA::ProcHandle proc)
 output a FORMALS clause
void outputStmt (OA::StmtHandle stmt)
void outputMemRefExprs (OA::StmtHandle stmt)
 output a MEMREFEXPRS clause
void outputPtrAssignPairs (OA::StmtHandle stmt)
 output a PTRASSIGNPAIRS clause
void outputCallSites (OA::StmtHandle stmt)
 output a CALLSITES clause
void outputParamBindPtrAssignPairs (OA::StmtHandle stmt)
void outputParamBindPtrAssignPairs (OA::StmtHandle stmt, OA::CallHandle call)
 output a PARAMBINDPTRASSIGNPAIRS clause
void outputMemRefExpr (OA::OA_ptr< OA::MemRefExpr > expr)
 output a memory reference expression
void outputMemRefExpr (OA::NamedRef &expr)
void outputMemRefExpr (OA::UnnamedRef &expr)
void outputMemRefExpr (OA::UnknownRef &expr)
void outputMemRefExpr (OA::AddressOf &expr)
void outputMemRefExpr (OA::Deref &expr)
void outputMemRefExpr (OA::FieldAccess &expr)
void outputMemRefExpr (OA::IdxAccess &expr)
void outputMemRefExpr (OA::IdxExprAccess &expr)
void outputMemRefExpr (OA::SubSetRef &ref)
void outputHandle (OA::StmtHandle h)
 ouput a handle
void outputHandle (OA::ExprHandle h)
void outputHandle (OA::MemRefHandle h)
void outputHandle (OA::ProcHandle h)
void outputHandle (OA::SymHandle h)
void outputHandle (OA::CallHandle h)
void outputMemRefType (OA::MemRefExpr &expr)
void outputTF (bool value)
 output T if the value is true, otherwise F
void outputAccuracy (bool hasFullAccuracy)
void outputLocations (OA::ProcHandle proc)
void outputLocation (OA::ProcHandle proc, OA::SymHandle sym)
 output a LOCATION clause

Private Attributes

OA::OA_ptr
< OA::Alias::AliasIRInterface
mIR
std::ostream & mCodeStream
std::set< OA::SymHandlemSymHandles

Friends

class NGOutputVisitor

Detailed Description

Generates notation files. Notation files consist of a series of clauses that describe the contents of an intermediate representation.

Definition at line 32 of file NotationGenerator.hpp.


Constructor & Destructor Documentation

NotationGenerator::NotationGenerator ( OA::OA_ptr< OA::Alias::AliasIRInterface ir,
std::ostream &  codeStream 
)

The notations generated will be outputted to the passed stream.

Definition at line 32 of file NotationGenerator.cpp.


Member Function Documentation

void NotationGenerator::generate ( OA::ProcHandle  proc  ) 

Output notation for a given procedure to the code stream.

Definition at line 40 of file NotationGenerator.cpp.

References mCodeStream, mIR, outputFormals(), outputLocations(), outputProcedure(), outputStmt(), and popIndt().

Here is the call graph for this function:

void NotationGenerator::outputAccuracy ( bool  hasFullAccuracy  )  [private]

output 'full' or 'part' based on the passed value. used to output whether an expression has full or partial accuracy

Definition at line 425 of file NotationGenerator.cpp.

References mCodeStream.

void NotationGenerator::outputCallSites ( OA::StmtHandle  stmt  )  [private]

output a CALLSITES clause

Definition at line 184 of file NotationGenerator.cpp.

References indt(), mCodeStream, mIR, outputHandle(), outputMemRefExpr(), popIndt(), and pushIndt().

Referenced by outputStmt().

Here is the call graph for this function:

void NotationGenerator::outputFormals ( OA::ProcHandle  proc  )  [private]

output a FORMALS clause

Definition at line 70 of file NotationGenerator.cpp.

References indt(), mCodeStream, mIR, outputHandle(), popIndt(), and pushIndt().

Referenced by generate().

Here is the call graph for this function:

void NotationGenerator::outputHandle ( OA::CallHandle  h  )  [private]

Definition at line 412 of file NotationGenerator.cpp.

References mCodeStream, and mIR.

void NotationGenerator::outputHandle ( OA::SymHandle  h  )  [private]

Definition at line 404 of file NotationGenerator.cpp.

References mCodeStream, mIR, and mSymHandles.

void NotationGenerator::outputHandle ( OA::ProcHandle  h  )  [private]

Definition at line 389 of file NotationGenerator.cpp.

References mCodeStream, and mIR.

void NotationGenerator::outputHandle ( OA::MemRefHandle  h  )  [private]

Definition at line 382 of file NotationGenerator.cpp.

References mCodeStream, and mIR.

void NotationGenerator::outputHandle ( OA::ExprHandle  h  )  [private]

Definition at line 374 of file NotationGenerator.cpp.

References mCodeStream, and mIR.

void NotationGenerator::outputHandle ( OA::StmtHandle  h  )  [private]
void NotationGenerator::outputLocation ( OA::ProcHandle  proc,
OA::SymHandle  sym 
) [private]

output a LOCATION clause

Definition at line 442 of file NotationGenerator.cpp.

References indt(), mCodeStream, mIR, outputHandle(), and OA::OA_ptr< T >::ptrEqual().

Referenced by outputLocations().

Here is the call graph for this function:

void NotationGenerator::outputLocations ( OA::ProcHandle  proc  )  [private]

after having outputted all statements, output all LOCATION clauses for a procedure.

Definition at line 431 of file NotationGenerator.cpp.

References mSymHandles, and outputLocation().

Referenced by generate().

Here is the call graph for this function:

void NotationGenerator::outputMemRefExpr ( OA::SubSetRef ref  )  [private]

Definition at line 356 of file NotationGenerator.cpp.

References OA::RefOp::getMemRefExpr(), mCodeStream, outputMemRefExpr(), and outputMemRefType().

Here is the call graph for this function:

void NotationGenerator::outputMemRefExpr ( OA::IdxExprAccess expr  )  [private]

Definition at line 333 of file NotationGenerator.cpp.

References OA::IdxExprAccess::getExpr(), OA::RefOp::getMemRefExpr(), mCodeStream, outputHandle(), outputMemRefExpr(), and outputMemRefType().

Here is the call graph for this function:

void NotationGenerator::outputMemRefExpr ( OA::IdxAccess expr  )  [private]

Definition at line 344 of file NotationGenerator.cpp.

References OA::IdxAccess::getIdx(), OA::RefOp::getMemRefExpr(), mCodeStream, outputMemRefExpr(), and outputMemRefType().

Here is the call graph for this function:

void NotationGenerator::outputMemRefExpr ( OA::FieldAccess expr  )  [private]

Definition at line 320 of file NotationGenerator.cpp.

References OA::FieldAccess::getFieldName(), OA::RefOp::getMemRefExpr(), mCodeStream, outputMemRefExpr(), and outputMemRefType().

Here is the call graph for this function:

void NotationGenerator::outputMemRefExpr ( OA::Deref expr  )  [private]

Definition at line 307 of file NotationGenerator.cpp.

References OA::RefOp::getMemRefExpr(), OA::Deref::getNumDerefs(), mCodeStream, outputMemRefExpr(), and outputMemRefType().

Here is the call graph for this function:

void NotationGenerator::outputMemRefExpr ( OA::AddressOf expr  )  [private]

Definition at line 298 of file NotationGenerator.cpp.

References OA::RefOp::getMemRefExpr(), mCodeStream, outputMemRefExpr(), and outputMemRefType().

Here is the call graph for this function:

void NotationGenerator::outputMemRefExpr ( OA::UnknownRef expr  )  [private]

Definition at line 291 of file NotationGenerator.cpp.

References mCodeStream, and outputMemRefType().

Here is the call graph for this function:

void NotationGenerator::outputMemRefExpr ( OA::UnnamedRef expr  )  [private]
void NotationGenerator::outputMemRefExpr ( OA::NamedRef expr  )  [private]

Definition at line 265 of file NotationGenerator.cpp.

References OA::NamedRef::getSymHandle(), mCodeStream, outputHandle(), and outputMemRefType().

Here is the call graph for this function:

void NotationGenerator::outputMemRefExpr ( OA::OA_ptr< OA::MemRefExpr expr  )  [private]
void NotationGenerator::outputMemRefExprs ( OA::StmtHandle  stmt  )  [private]

output a MEMREFEXPRS clause

Definition at line 111 of file NotationGenerator.cpp.

References indt(), mCodeStream, mIR, outputHandle(), outputMemRefExpr(), popIndt(), and pushIndt().

Referenced by outputStmt().

Here is the call graph for this function:

void NotationGenerator::outputMemRefType ( OA::MemRefExpr expr  )  [private]

output a memory reference expression's type. Ex: DEF, USE, DEFUSE, etc.

Definition at line 396 of file NotationGenerator.cpp.

References OA::MemRefExpr::isDef(), OA::MemRefExpr::isDefUse(), OA::MemRefExpr::isUse(), OA::MemRefExpr::isUseDef(), and mCodeStream.

Referenced by outputMemRefExpr().

Here is the call graph for this function:

void NotationGenerator::outputParamBindPtrAssignPairs ( OA::StmtHandle  stmt,
OA::CallHandle  call 
) [private]

output a PARAMBINDPTRASSIGNPAIRS clause

Definition at line 225 of file NotationGenerator.cpp.

References indt(), mCodeStream, mIR, outputHandle(), outputMemRefExpr(), popIndt(), and pushIndt().

Here is the call graph for this function:

void NotationGenerator::outputParamBindPtrAssignPairs ( OA::StmtHandle  stmt  )  [private]

iterate over all calls in a statement and output a PARAMBINDPTRASSIGNPAIRS for them if needed

Definition at line 214 of file NotationGenerator.cpp.

References mIR.

Referenced by outputStmt().

void NotationGenerator::outputProcedure ( OA::ProcHandle  proc  )  [private]

output a PROCEDURE clause

Definition at line 57 of file NotationGenerator.cpp.

References indt(), mCodeStream, mIR, outputHandle(), and pushIndt().

Referenced by generate().

Here is the call graph for this function:

void NotationGenerator::outputPtrAssignPairs ( OA::StmtHandle  stmt  )  [private]

output a PTRASSIGNPAIRS clause

Definition at line 144 of file NotationGenerator.cpp.

References indt(), mCodeStream, mIR, outputHandle(), outputMemRefExpr(), popIndt(), and pushIndt().

Referenced by outputStmt().

Here is the call graph for this function:

void NotationGenerator::outputStmt ( OA::StmtHandle  stmt  )  [private]

output a statement. Statements may contain MEMREFEXPRS, PTRASSIGNPAIRS, CALLSITES, and PARAMBINDPTRASSIGNPAIRS clauses.

Definition at line 100 of file NotationGenerator.cpp.

References outputCallSites(), outputMemRefExprs(), outputParamBindPtrAssignPairs(), and outputPtrAssignPairs().

Referenced by generate().

Here is the call graph for this function:

void NotationGenerator::outputTF ( bool  value  )  [private]

output T if the value is true, otherwise F

Definition at line 419 of file NotationGenerator.cpp.

References mCodeStream.


Friends And Related Function Documentation

friend class NGOutputVisitor [friend]

Definition at line 34 of file NotationGenerator.hpp.


Member Data Documentation

std::ostream& NotationGenerator::mCodeStream [private]

In order to determine what locations to output the notation generator must construct a set of all sym handles encountered while generating notations for a procedure.

Definition at line 118 of file NotationGenerator.hpp.

Referenced by outputHandle(), and outputLocations().


The documentation for this class was generated from the following files:

Generated on Sat Oct 31 05:24:44 2009 for OpenAnalysis by  doxygen 1.6.1