Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions src/analysis/monotone-analyzer-impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,15 @@ inline void
MonotoneCFGAnalyzer<L, TxFn>::evaluateFunctionEntry(Function* func) {
txfn.evaluateFunctionEntry(func, states[0]);
}
template<Lattice L, TransferFunction TxFn>
inline void MonotoneCFGAnalyzer<L, TxFn>::evaluateFunctionExit(Function* func) {
for (size_t i = 0; i < cfg.size(); i++) {
if (cfg[i].isExit()) {
txfn.evaluateFunctionExit(func, states[i]);
break;
}
}
}

template<Lattice L, TransferFunction TxFn>
inline void MonotoneCFGAnalyzer<L, TxFn>::evaluate() {
Expand Down
5 changes: 5 additions & 0 deletions src/analysis/monotone-analyzer.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,11 @@ template<Lattice L, TransferFunction TxFn> class MonotoneCFGAnalyzer {
// entry block depends on no other blocks, and hence cannot be changed by
// them.
void evaluateFunctionEntry(Function* func);
// This modifies the state of the CFG's exit block, with function
// information. This cannot be done otherwise in a backward analysis, as the
// exit block depends on no other blocks, and hence cannot be changed by
// them.
void evaluateFunctionExit(Function* func);

// Iterates over all of the BlockStates after evaluate() is completed for the
// transfer function to collect the finalized intermediate states from each
Expand Down
Loading