Chisel
Public Member Functions | Public Attributes | Friends | List of all members
DeadcodeElimination Class Reference

Represents a sound dead-code elimination phase. More...

#include <DeadcodeElimination.h>

Inheritance diagram for DeadcodeElimination:
Transformation

Public Member Functions

 DeadcodeElimination ()
 
 ~DeadcodeElimination ()
 
void removeUnusedElements ()
 
- Public Member Functions inherited from Transformation
 Transformation ()
 
 ~Transformation ()
 

Public Attributes

std::map< clang::Decl *, clang::SourceRangeLocationMapping
 
std::vector< clang::SourceLocationUnusedLocations
 

Friends

class LocalElementCollectionVisitor
 

Additional Inherited Members

- Protected Member Functions inherited from Transformation
std::vector< clang::Stmt * > getAllChildren (clang::Stmt *S)
 
clang::SourceLocation getEndOfCond (clang::Expr *E)
 
clang::SourceLocation getEndOfStmt (clang::Stmt *S)
 
clang::SourceLocation getEndLocation (clang::SourceLocation Loc)
 
clang::SourceLocation getEndLocationAfter (clang::SourceRange Range, char Symbol)
 
clang::SourceLocation getEndLocationUntil (clang::SourceRange Range, char Symbol)
 
clang::SourceLocation getEndLocationFromBegin (clang::SourceRange Range)
 
int getOffsetUntil (const char *Buf, char Symbol)
 
llvm::StringRef getSourceText (const clang::SourceLocation &B, const clang::SourceLocation &E)
 
void removeSourceText (const clang::SourceLocation &B, const clang::SourceLocation &E)
 
- Protected Attributes inherited from Transformation
clang::ASTContext * Context
 
clang::Rewriter TheRewriter
 

Detailed Description

Represents a sound dead-code elimination phase.

DeadcodeElimination removes unused statements without calling the oracle, and removes unused labels and unused variable declarations that are side-effect free.

Constructor & Destructor Documentation

DeadcodeElimination::DeadcodeElimination ( )
inline
DeadcodeElimination::~DeadcodeElimination ( )
inline

Member Function Documentation

void DeadcodeElimination::removeUnusedElements ( )

Friends And Related Function Documentation

friend class LocalElementCollectionVisitor
friend

Member Data Documentation

std::map<clang::Decl *, clang::SourceRange> DeadcodeElimination::LocationMapping
std::vector<clang::SourceLocation> DeadcodeElimination::UnusedLocations

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