Reputation: 2347
How can I identify if a loop is countable or not in LLVM? Is there some library function that can be directly used?
Upvotes: 1
Views: 445
Reputation: 3069
Try hasLoopInvariantBackedgeTakenCount
on ScalarEvolution
. See http://llvm.org/doxygen/classllvm_1_1ScalarEvolution.html#aecd7aba4460358813feef37d71d5024e .
(If that isn't what you are looking for, please clarify.)
Upvotes: 3