Update the logic to update the successors and predecessors of region
blocks directly. This adds special handling for header and latch blocks
in place, and removes the separate loop to fix up the region blocks.
Helps to simplify D158333.
Differential D159136
[VPlan] Simplify HCFG construction of region blocks (NFC). fhahn on Aug 29 2023, 1:39 PM. Authored by
Details Update the logic to update the successors and predecessors of region Helps to simplify D158333.
Diff Detail
Event TimelineComment Actions Title should indicate this is an HCFG simplification patch. Worth indicating that this refactoring assists D158333.
Comment Actions Address latest comments, thanks!
Comment Actions This looks good to me, thanks for accommodating! Adding a couple of last minor comments.
|
Mapping BB's to their VPBB's except for header BB's that are mapped to the enclosing VPRegion may be confusing (exacerbated by reusing VPBB or using VPB for VPBlockBase), and should be documented.
Would it be better to keep BB2VPBB as is, mapping BB's to their VPBasicBlocks, and augment it with a getRegionOfHeader() function that checks if a VPBB is the entry of its enclosing region and if so returns the region, otherwise returns the given VPBasicBlock?