As we now have unit-tests for UnrollAnalyzer, we can convert some existing tests to this format. It should make the tests more robust.
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
Comment Actions
Hi Michael,
I'm not familiar with the details of UnrolledInstAnalyzer, but this LGTM overall with the nits fixed.
test/Transforms/LoopUnroll/full-unroll-heuristics-cmp.ll | ||
---|---|---|
7 ↗ | (On Diff #49868) | Should these comments be preserved in some form in the new tests? Or do you think that now that we're doing whitebox testing, these comments are obvious? |
unittests/Analysis/UnrollAnalyzer.cpp | ||
256 ↗ | (On Diff #49868) | I think here you need a cast<> not a dyn_cast<>, since you're not actually checking if dyn_cast<> returned a null. Same comment on other dyn_cast<> s in the patch. |
Comment Actions
Thanks, Sanjoy!
As for the comments - I do think they are no longer need in the new version of the tests. Previously we had to observe side effect of the functions that we can now test directly, and the comments just tried to shed some light on this side effect.
Michael