Induction variable of a parallel loop

Hi all,

I am trying to get the induction variable of a parallel loop using LLVM. To this end, I call “getCanonicalInductionVariable” onto a loop for which the isAnnotatedParallel method returns true. These two methods belong into LoopInfo. However, clang seems only maintain the isAnnotatedParallel metadata at the -O3 optimization level. Yet, at that level many loops become too complicated, and
“getCanonicalInductionVariable” stops being able to return an induction variable for many loops. So, is there a way to implement the isAnnotatedParallel metadata at the -O0 optimization level of clang? If I want to do this, where in the code should I look into?

Regards to all,

Kézia