This is an archive of the discontinued LLVM Phabricator instance.

[CodeMoverUtils] Add more tests to check code motion safety using data dependence information.
Needs ReviewPublic

Authored by RithikSharma on Jul 28 2020, 10:49 AM.

Details

Summary

This patch adds more test to verify code motion safety through dependence info which is generated by Dependence Info analysis and Alias analysis.

Diff Detail

Event Timeline

RithikSharma created this revision.Jul 28 2020, 10:49 AM
RithikSharma requested review of this revision.Jul 28 2020, 10:49 AM
RithikSharma retitled this revision from [CodeMoverUtils] Add more tests to check code motion safety using dependence to [CodeMoverUtils] Add more tests to check code motion safety using data dependence information..Jul 28 2020, 10:56 AM

Some quick first round review comments.

llvm/unittests/Transforms/Utils/CodeMoverUtilsTest.cpp
1006

remove dso_local

1014

bb0 -> header

1035

indent

1041

bb4 -> latch

1070

Please put a comment on the intension for each pair of tests.

RithikSharma marked 4 inline comments as done.
RithikSharma added inline comments.
llvm/unittests/Transforms/Utils/CodeMoverUtilsTest.cpp
1035

Just to include a function call which would fail some existing sink and hoist test cases.

Whitney added inline comments.Jul 29 2020, 7:40 AM
llvm/unittests/Transforms/Utils/CodeMoverUtilsTest.cpp
1006

did you forget to update your patch? cause dso_local is still there.

1035

right, can you indent it? two spaces before the line.

1070

for test pairs with the same comment, please expend the comment with the difference, like the first four are all sink instruction from entry to header.

RithikSharma marked 3 inline comments as done.Jul 29 2020, 7:58 AM
RithikSharma added inline comments.
llvm/unittests/Transforms/Utils/CodeMoverUtilsTest.cpp
1006

Updated, thanks.