diff options
author | Bruce He <44327446+zm2he@users.noreply.github.com> | 2023-07-13 19:06:24 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-13 15:06:24 -0400 |
commit | 417792e90feb81b8b27863814cb0b38f5fe10b1f (patch) | |
tree | a3e57d57b46a43266740a69bbe11280bf9bcd4ab /src/analysis | |
parent | 93769d51f3408e98598ceaa221a62ccefb744a94 (diff) | |
download | binaryen-417792e90feb81b8b27863814cb0b38f5fe10b1f.tar.gz binaryen-417792e90feb81b8b27863814cb0b38f5fe10b1f.tar.bz2 binaryen-417792e90feb81b8b27863814cb0b38f5fe10b1f.zip |
Small fixes to lattice and analyzer (#5815)
Updates comments. Moves wasm-traversal.h to transfer function classes.
Diffstat (limited to 'src/analysis')
-rw-r--r-- | src/analysis/liveness-transfer-function.h | 17 | ||||
-rw-r--r-- | src/analysis/monotone-analyzer.h | 1 |
2 files changed, 9 insertions, 9 deletions
diff --git a/src/analysis/liveness-transfer-function.h b/src/analysis/liveness-transfer-function.h index c24e67eab..b8dfb13b5 100644 --- a/src/analysis/liveness-transfer-function.h +++ b/src/analysis/liveness-transfer-function.h @@ -3,6 +3,7 @@ #include "lattice.h" #include "monotone-analyzer.h" +#include "wasm-traversal.h" namespace wasm::analysis { @@ -58,11 +59,11 @@ public: return currBlock->preds(); } - // Prints the intermediate states of each BlockState currBlock by applying + // Prints the intermediate states of each basic block cfgBlock by applying // the transfer function on each expression of the CFG block. This data is - // not stored in the BlockState itself. Requires the cfgBlock, and a temp - // copy of the input state to be passed in, where the temp copy is modified - // in place to produce the intermediate states. + // not stored. Requires the cfgBlock, and a temp copy of the input state + // to be passed in, where the temp copy is modified in place to produce the + // intermediate states. void print(std::ostream& os, const BasicBlock* cfgBlock, FiniteIntPowersetLattice::Element& inputState) { @@ -72,12 +73,12 @@ public: os << std::endl; auto cfgIter = cfgBlock->rbegin(); - // Since we don't store the intermediate states in the BlockState, we need - // to re-run the transfer function on all the CFG node expressions to - // reconstruct the intermediate states here. + // Since we don't store the intermediate states, we need to re-run the + // transfer function on all the CFG node expressions to reconstruct + // the intermediate states here. while (cfgIter != cfgBlock->rend()) { os << ShallowExpression{*cfgIter} << std::endl; - LivenessTransferFunction::visit(*cfgIter); + visit(*cfgIter); currState->print(os); os << std::endl; ++cfgIter; diff --git a/src/analysis/monotone-analyzer.h b/src/analysis/monotone-analyzer.h index afdf4aebf..aa49aaef9 100644 --- a/src/analysis/monotone-analyzer.h +++ b/src/analysis/monotone-analyzer.h @@ -7,7 +7,6 @@ #include "cfg.h" #include "lattice.h" -#include "wasm-traversal.h" namespace wasm::analysis { |