Program Listing for File pre.h

Program Listing for File pre.h#

Return to documentation for file (src/midend/programTransformation/partialRedundancyElimination/pre.h)

#ifndef PRE_H
#define PRE_H

#include <stdint.h>
#include <queue>
#include <fstream>
#include "replaceExpressionWithStatement.h"
#include "inlinerSupport.h"
#include "expressionTreeEqual.h"
#include "preControlFlowGraph.h"

namespace legacy
{

// DQ (3/21/2006): Moved this outside of PRE namespace since it is also used in
// the finiteDifferencing transformation.
bool anyOfListPotentiallyModifiedIn(const std::vector<SgVariableSymbol*>& syms, SgNode* n);

bool expressionComputedIn(SgExpression* expr, SgNode* root);

int countComputationsOfExpressionIn(SgExpression* expr, SgNode* root);

// DQ (3/21/2006): Added namespace to separate the
// PRE specific work (and it's use of the type named
// ControlFlowGraph which conflicts with the OTHER
// ControlFlowGraph in:
//    src/midend/programAnalysis/dominatorTreesAndDominanceFrontiers
namespace PRE {

SgFunctionDefinition* getFunctionDefinition(SgNode* n);

void partialRedundancyEliminationOne(
    SgExpression* expr,
    SgBasicBlock* root,
    const myControlFlowGraph& cfg);

void partialRedundancyEliminationFunction(SgFunctionDefinition* n);

void ROSE_DLL_API partialRedundancyElimination(SgNode* n);

// closing scope of namespace: PRE
}

} // namespace legacy

#endif // PRE_H