This is an archive of the discontinued LLVM Phabricator instance.

[LV] NFC patch for moving VP*Recipe class definitions from LoopVectorize.cpp to VPlan.h
ClosedPublic

Authored by hsaito on Dec 8 2017, 6:25 PM.

Details

Summary

This is a small step forward to move VPlan stuff to where it should belong (i.e., VPlan.*) --- easy and obvious things at a time, in small increment.

  1. VP*Recipe classes in LoopVectorize.cpp are moved to VPlan.h.
  2. Many of VP*Recipe::print() and execute() definitions are still left in LoopVectorize.cpp since they refer to things declared in LoopVectorize.cpp. To be moved to VPlan.cpp at a later time.
  3. InterleaveGroup class is moved from anonymous namespace to llvm namespace. Referencing it in anonymous namespace from VPlan.h ended up in warning.

Diff Detail

Event Timeline

hsaito created this revision.Dec 8 2017, 6:25 PM
fhahn added a subscriber: fhahn.Dec 9 2017, 4:30 AM

All print functions except for VPInterleaveRecipe::print() can be moved to VPlan.cpp. Updating the patch

hsaito updated this revision to Diff 126465.EditedDec 11 2017, 3:53 PM

Most of print functions moved to VPlan.cpp. VPInterleaveRecipe::print() still has to stay in LoopVectorize.cpp since InterleaveGroup class is defined there, not in a header file VPlan.cpp can include.

These print functions depend on VPlanIngredients class defined near the bottom of VPlan.h. We can't easily move it and VPlanPrinter class above Recipe class definitions. That's why they belong to VPlan.cpp.

hfinkel accepted this revision.Dec 14 2017, 5:50 PM
hfinkel added a subscriber: hfinkel.

LGTM

This revision is now accepted and ready to land.Dec 14 2017, 5:50 PM

LGTM

Thanks, Hal.

I don't have write access to the trunk (this is my first patch submission) and thus cannot commit this myself. Would be great if someone with write access would commit this for me.

Thanks,
Hideki

This revision was automatically updated to reflect the committed changes.