[clang] [clang][dataflow] In the CFG visualization, mark converged blocks. (PR #79999)
via cfe-commits
cfe-commits at lists.llvm.org
Tue Jan 30 23:30:54 PST 2024
================
@@ -158,13 +158,17 @@ class HTMLLogger : public Logger {
StreamFactory Streams;
std::unique_ptr<llvm::raw_ostream> OS;
- std::optional<llvm::json::OStream> JOS;
+ std::string JSON;
+ llvm::raw_string_ostream JStringStream{JSON};
+ llvm::json::OStream JOS{JStringStream, /*Indent=*/2};
const ControlFlowContext *CFG;
// Timeline of iterations of CFG block visitation.
std::vector<Iteration> Iters;
// Indexes in `Iters` of the iterations for each block.
llvm::DenseMap<const CFGBlock *, llvm::SmallVector<size_t>> BlockIters;
+ // IDs of blocks that converged (on the last iteration).
+ llvm::DenseSet<unsigned> ConvergedBlocks;
----------------
martinboehme wrote:
Good point -- done!
https://github.com/llvm/llvm-project/pull/79999
More information about the cfe-commits
mailing list