dalibocai
dalibocai

Reputation: 2347

identify non-countable loops in LLVM

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

Answers (1)

servn
servn

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

Related Questions