[LLVMdev] Determine which loops are parallel in Loop pass

Nema, Ashutosh Ashutosh.Nema at amd.com
Fri Jun 19 03:31:10 PDT 2015


Hi Alex,

Did you checked “Loop::isAnnotatedParallel” ?
Probably it will help you.

Regards,
Ashutosh

From: llvmdev-bounces at cs.uiuc.edu [mailto:llvmdev-bounces at cs.uiuc.edu] On Behalf Of Alexander Fougner
Sent: Thursday, June 18, 2015 9:09 PM
To: llvmdev at cs.uiuc.edu
Subject: [LLVMdev] Determine which loops are parallel in Loop pass

Hello,

I have a couple of C/C++ programs I want to analyze/modify with a Loop pass, and I want to find the loops free of loop-carried dependences.
The parallel loops are annotated with the OpenMP #pragma omp parallel for directive, but OpenMP will not be used, just single-threaded execution. I can also manually annotate/tag the source code if that would help, the important part is that the pass automatically can determine whether the loop is annotated parallel or not.

I've seen a few interesting options that might (or might not) solve my problem.
- llvm.mem.parallel metadata ?
- annotate intrinsics/attributes ?

What would the simplest way to do this?

Thank you!

Alex
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150619/10c6f3ac/attachment.html>


More information about the llvm-dev mailing list