Skip to content

Commit

Permalink
Merge branch 'mogball/ws3' into mogball/ws4
Browse files Browse the repository at this point in the history
  • Loading branch information
Mogball committed Feb 25, 2025
2 parents 6b78ebd + 3155489 commit a6c0ac7
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion lib/Analysis/Membar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,22 @@ void MembarAnalysis::run(FuncBlockInfoMapT &funcBlockInfoMap) {
void MembarAnalysis::resolve(FunctionOpInterface funcOp,
FuncBlockInfoMapT *funcBlockInfoMap,
OpBuilder *builder) {
// Initialize the blockList
// Initialize the blockList. Operations are organized into "virtual blocks",
// which represent segments of straight-line code analyzed by each iteration
// of the dataflow analysis. Virtual blocks abstract over both control flow
// represented by basic blocks and block successors (i.e. `BranchOpInterface`)
// and control flow represented by regions (i.e. `RegionBranchOpInterface`).
//
// A virtual block consists of a parent block and a starting iterator, where
// the virtual block starts on the operation *after* the starting iterator. A
// null iterator is used to represent the beginning of the block. The virtual
// block ends at any region branch operation or the basic block terminator.
// Thus, basic blocks are broken up into multiple virtual blocks at each
// region operation.
//
// Entry virtual blocks are represented by a null iterator. Populate the
// blockList with the entry virtual blocks in the function. Then, each
// iteration scans until a terminator or region branch operation is found.
DenseMap<VirtualBlock, BlockInfo> inputBlockInfoMap;
DenseMap<VirtualBlock, BlockInfo> outputBlockInfoMap;
std::deque<VirtualBlock> blockList;
Expand Down

0 comments on commit a6c0ac7

Please sign in to comment.