[PATCH] D49032: [VPlan] Add VPlanTestBase.h with helper class to build VPlan for tests.

Diego Caballero via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 6 12:11:19 PDT 2018


dcaballe accepted this revision.
dcaballe added a comment.
This revision is now accepted and ready to land.

Good idea! Thanks! LGTM. Just some minor comments.



================
Comment at: unittests/Transforms/Vectorize/VPlanHCFGTest.cpp:93
 
-TEST_F(VPlanHCFGTest, testVPInstructionToVPRecipesInner) {
-  LLVMContext Ctx;
+TEST_F(VPlanTestBase, testVPInstructionToVPRecipesInner) {
   const char *ModuleString =
----------------
Shouldn't we keep VPlanHCFGTest name? Or, is this renaming needed?


================
Comment at: unittests/Transforms/Vectorize/VPlanTestBase.h:9
+//===----------------------------------------------------------------------===//
+
+#ifndef LLVM_UNITTESTS_TRANSFORMS_VECTORIZE_VPLANTESTBASE_H
----------------
Add small comment about the purpose of the file?


================
Comment at: unittests/Transforms/Vectorize/VPlanTestBase.h:46
+
+  VPlanPtr doBuildPlan(BasicBlock *LoopHeader) {
+    DT.reset(new DominatorTree(*LoopHeader->getParent()));
----------------
I had to differentiate between building 'plain' CFG and building H-CFG for testing in D48818. It would be great I you could align this code a bit with those needs. I'll introduce the necessary changes once we have this code in.


https://reviews.llvm.org/D49032





More information about the llvm-commits mailing list