diff options
author | Bruce He <44327446+zm2he@users.noreply.github.com> | 2023-07-19 21:52:55 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-19 17:52:55 -0400 |
commit | f61bf9f46addc0b6885b60b3e0f1c4ccc7e64473 (patch) | |
tree | 92dd1216ad6d3982e0f51f797b3030f8dea2ee25 /src/analysis/cfg.h | |
parent | a15d71f5fb4f3488e8a25071cb8813fe6045290e (diff) | |
download | binaryen-f61bf9f46addc0b6885b60b3e0f1c4ccc7e64473.tar.gz binaryen-f61bf9f46addc0b6885b60b3e0f1c4ccc7e64473.tar.bz2 binaryen-f61bf9f46addc0b6885b60b3e0f1c4ccc7e64473.zip |
Reaching Definitions Analysis for LocalGraph (#5817)
This change implements a reaching definitions analysis which is intended
to be equivalent to the information provided by LocalGraph, specifically
the Flower class of LocalGraph.
It also introduces a CRTP utility in visitor-transfer-function.h which
implements most commonly found visitor-type transfer function
functionalities. The MonotoneCFGAnalyzer is also modified to add a phase
to collect results after the analysis is solved from the final CFG
states.
Diffstat (limited to 'src/analysis/cfg.h')
-rw-r--r-- | src/analysis/cfg.h | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/analysis/cfg.h b/src/analysis/cfg.h index 650a8c6fe..a7f67c041 100644 --- a/src/analysis/cfg.h +++ b/src/analysis/cfg.h @@ -45,10 +45,9 @@ struct BasicBlock { reverse_iterator rend() const { return insts.rend(); } // Iterables for predecessor and successor blocks. - struct Predecessors; - struct Successors; - Predecessors preds() const; - Successors succs() const; + struct BasicBlockIterable; + BasicBlockIterable preds() const; + BasicBlockIterable succs() const; void print(std::ostream& os, Module* wasm = nullptr, size_t start = 0) const; |