[llvm] [LV] Limits the splat operations be hoisted must not be defined by a recipe. (PR #117138)
Florian Hahn via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 23 04:09:22 PST 2025
fhahn wrote:
> > How about adding a VPDominatorTree to VPTransformState, using that to check for dominance? VPlan's CFG shouldn't change during execution, so no need to worry about updates
>
> @fhahn [40c2dee](https://github.com/llvm/llvm-project/commit/40c2deeccbead6ad64559a0bcb7d5d5997550210) I have to update the VPDominatorTree before VPlan::execute since the plan will be changed after State was constructed:
>
> ```
> // 2. Copy and widen instructions from the old loop into the new loop.
> BestVPlan.prepareToExecute(
> ILV.getTripCount(),
> ILV.getOrCreateVectorTripCount(ILV.LoopVectorPreHeader), State);
> replaceVPBBWithIRVPBB(VectorPH, State.CFG.PrevBB); <--- This function will change CFG of plan
>
> BestVPlan.execute(&State);
> ```
>
> And also, could you please take a look the issue about circular dependency between VPlan.h and VPlanDominatorTree.h? Or could we proceed with using the pointer?
I think it should be possible to organize the declarations in a better way to enable this (with the main other benefit being that it also reduces the size of VPlan.h): https://github.com/llvm/llvm-project/pull/124104
https://github.com/llvm/llvm-project/pull/117138
More information about the llvm-commits
mailing list