[LoopRotate] Don't perform loop rotation if the loop header calls a convergent function.
authorJustin Lebar <jlebar@google.com>
Fri, 12 Feb 2016 21:01:33 +0000 (21:01 +0000)
committerJustin Lebar <jlebar@google.com>
Fri, 12 Feb 2016 21:01:33 +0000 (21:01 +0000)
commitdf04d2a1f1b9621fc75a28a45c4193b03da59bf8
tree6ab2798b7358e1a0705792c34d5e7890ccbe74c4
parent144c5a6c154b3d639709c59892a41139aadc5032
[LoopRotate] Don't perform loop rotation if the loop header calls a convergent function.

Summary:
Calls to convergent functions can be duplicated, but only if the
duplicates are not control-flow dependent on any additional values.
Loop rotation doesn't meet the bar.

Reviewers: jingyue

Subscribers: mzolotukhin, llvm-commits, arsenm, joker.eph, resistor, tra, hfinkel, broune

Differential Revision: http://reviews.llvm.org/D17127

llvm-svn: 260729
llvm/lib/Transforms/Scalar/LoopRotation.cpp
llvm/test/Transforms/LoopRotate/convergent.ll [new file with mode: 0644]