This is an archive of the discontinued LLVM Phabricator instance.

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

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

Details

Summary

Context: Patch Series #1 for outer loop vectorization support in LV
using VPlan. (RFC: http://lists.llvm.org/pipermail/llvm-dev/2017-December/119523.html).

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
lib/Transforms/Vectorize/VPlan.cpp
609

nit: no braces here

lib/Transforms/Vectorize/VPlan.h
524

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

1472

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

lib/Transforms/Vectorize/VPlanHCFGBuilder.cpp
328

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.

353

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
lib/Transforms/Vectorize/VPlan.cpp
618

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
lib/Transforms/Vectorize/VPlanHCFGBuilder.h
57

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.

Thanks,
Diego

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

Not needed for now