[PATCH] D84776: [CodeMoverUtils] Add more tests to check code motion safety using data dependence information.

Whitney Tsang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 28 12:31:18 PDT 2020


Whitney added a comment.

Some quick first round review comments.



================
Comment at: llvm/unittests/Transforms/Utils/CodeMoverUtilsTest.cpp:1006
+  std::unique_ptr<Module> M = parseIR(
+      C, R"(define dso_local i32 @dependence(i32* noalias %A, i32* noalias %B) {
+entry:
----------------
remove dso_local


================
Comment at: llvm/unittests/Transforms/Utils/CodeMoverUtilsTest.cpp:1014
+
+bb0:
+  %b = phi i32 [ 0, %entry ], [ %c, %bb4 ]
----------------
bb0 -> header


================
Comment at: llvm/unittests/Transforms/Utils/CodeMoverUtilsTest.cpp:1035
+bb3:
+call void @function(i32 %tmp1)
+  %tmp6 = load i32, i32* %B, align 4 ; LoadB2
----------------
indent


================
Comment at: llvm/unittests/Transforms/Utils/CodeMoverUtilsTest.cpp:1041
+
+bb4:
+  store i32 8, i32* %B, align 4 ; StoreB3
----------------
bb4 -> latch


================
Comment at: llvm/unittests/Transforms/Utils/CodeMoverUtilsTest.cpp:1070
+
+        EXPECT_TRUE(
+            isSafeToMoveBefore(*StoreB0, *StoreA2, DT, &PDT, &DI, nullptr));
----------------
Please put a comment on the intension for each pair of tests.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D84776/new/

https://reviews.llvm.org/D84776



More information about the llvm-commits mailing list