Page MenuHomePhabricator

[VPlan] Remove unique_ptr from VPBranchOnRecipeMask (NFC).
ClosedPublic

Authored by fhahn on May 18 2020, 1:35 AM.

Details

Summary

We can remove a dynamic memory allocation, by checking the number of
operands: no operands = all true, 1 operand = mask.

Diff Detail

Event Timeline

fhahn created this revision.May 18 2020, 1:35 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 18 2020, 1:35 AM
Ayal accepted this revision.May 18 2020, 3:41 AM

Perhaps clearer to introduce getMask() as in other recipes, and check if it returns null?

This revision is now accepted and ready to land.May 18 2020, 3:41 AM
This revision was automatically updated to reflect the committed changes.
fhahn added a comment.May 19 2020, 7:03 AM

Perhaps clearer to introduce getMask() as in other recipes, and check if it returns null?

Thanks Ayal, I've added & used a getMask() method in the committed version!

Ayal added a comment.May 19 2020, 9:48 AM

Perhaps clearer to introduce getMask() as in other recipes, and check if it returns null?

Thanks Ayal, I've added & used a getMask() method in the committed version!

LGTM :-)
Could have inlined { VPValue *BlockInMask = getMask(); if (BlockInMask) }