[VPlan] Dead instructions are invariant to VFs when build vplan

Hi,

I noticed that the dead instructions collected when build vplan are invariant to different ranges of VFs since the original loop is not changed. Maybe DeadInstructions should be treated as a data member of LoopVectorizationPlanner and initialized by collectTriviallyDeadInstructions() in plan()?

Cheers,

Shixiong (Jason) Xu

Hi

Thanks. I didn't notice the patch. :blush:

Shixiong

Hi,

I noticed that the dead instructions collected when build vplan are
invariant to different ranges of VFs since the original loop is not
changed. Maybe DeadInstructions should be treated as a data member of
LoopVectorizationPlanner and initialized by
collectTriviallyDeadInstructions() in plan()?

Yep you are right. There's a patch under review, which also addresses
that:
Proofpoint Targeted Attack Protection
47477&d=DwIC->g&c=aUq983L2pue2FqKFoP6PGHMJQyoJ7kl3s3GZ->_haXqY&r=FZEW1c
DCyCU3ZbRFatG9st_R0bbu9fLOaIEKyKAe7wg&m=1H53Xvb7phmsnD0jJKQxe1->wa0mbde
wKcT8B8DbRzYk&s=GtJno4-QfCaG0-yzw_SCrQ65uTZXwWVuWUL72Y_ySGc&e=

Thanks for bringing this up! Yes, it should be better after the patch and I think we should be able to remove the DeadInstructions set once we have a full VPInstruction-based vectorization pipeline (including CG) properly modeling the evolution of the incoming IR.

Thanks,
Diego