[UnJ] Improve explicit loop count checks
authorDavid Green <david.green@arm.com>
Sat, 11 Aug 2018 07:37:31 +0000 (07:37 +0000)
committerDavid Green <david.green@arm.com>
Sat, 11 Aug 2018 07:37:31 +0000 (07:37 +0000)
commitf7111d1ecef12d766e08bd36740c10ebba02c6ec
treee1ec4894d2ee205247abacf2fa1798226b922e65
parent395b80cd3cf41da895d0bf217dfc2a0918593a13
[UnJ] Improve explicit loop count checks

Try to improve the computed counts when it has been explicitly set by a pragma
or command line option. This moves the code around, so that first call to
computeUnrollCount to get a sensible count and override that if explicit unroll
and jam counts are specified.

Also added some extra debug messages for when unroll and jamming is disabled.

Differential Revision: https://reviews.llvm.org/D50075

llvm-svn: 339501
llvm/lib/Transforms/Scalar/LoopUnrollAndJamPass.cpp
llvm/test/Transforms/LoopUnrollAndJam/pragma-explicit.ll [new file with mode: 0644]