Page MenuHomePhabricator

[VPlan] Introduce simplifyPlainCFG step in H-CFG builder.

Authored by dcaballe on Jul 1 2018, 10:34 PM.



Context: Patch Series #1 for outer loop vectorization support in LV
using VPlan. (RFC:

This patch introduces a plain CFG simplification step during H-CFG
construction. This simplification is aimed at preparing the CFG to
introduce VPLoopRegions in the H-CFG (subsequent patch, working on it).
It consists of splitting some VPBasicBlocks that otherwise would belong to
more than one region.

Diff Detail

Event Timeline

dcaballe created this revision.Jul 1 2018, 10:34 PM
dcaballe updated this revision to Diff 155242.Jul 12 2018, 11:49 AM

Rebasing this patch on top of D49032

fhahn added inline comments.Jul 13 2018, 7:01 AM

nit: no braces here


You should be able to use *PredIt = New; here


nit: maybe make it clear that the block is split at the bottom (no instructions are moved in the split block)


nit: Split the pre-header VPBasicBlocks of \p VPLp and all it nested VPLoops, if it meets one of the following conditions: would be slightly more compact.


nit: Split the exit VPBasicBlocks of \p VPLp and all it nested VPLoops, if it meets one of the following conditions: is slightly more compact.

fhahn added inline comments.Jul 13 2018, 7:09 AM

We should probably make sure we can use incremental DT updates via DeferredDominance and/or the DomTreeUpdater currently being developed.

fhahn added inline comments.Jul 13 2018, 7:19 AM

It might be worth to mentioning that this is mostly canonicalization to make future transformations easier. And briefly describe the canonical form (not sure where the best place for that would be)

fhahn added a comment.Jan 11 2019, 8:52 AM

Diego, are you still planning to land this patch?

dcaballe planned changes to this revision.Jan 11 2019, 10:04 AM
dcaballe marked 5 inline comments as done.

Hi Florian,

We are currently defining the next set of patches to be open sourced. Let me mark this one as 'plan changes' for now since I don't know yet if it's going to be needed immediately or we would have to add significant changes to it.


dcaballe abandoned this revision.Aug 21 2019, 1:07 PM

Not needed for now