[LLVMdev] loop clone?

Madhusudan, Vinay Vinay.Madhusudan at amd.com
Wed Sep 24 21:44:39 PDT 2014


Hi Linhai,

The similar transformation is done in LoopUnswitch.cpp [1] and it has a static CloneLoop [2] function too.

[1]  http://llvm.org/docs/doxygen/html/LoopUnswitch_8cpp_source.html 
[2]  http://llvm.org/docs/doxygen/html/LoopUnswitch_8cpp_source.html#l00668


Vinay.

-----Original Message-----
From: llvmdev-bounces at cs.uiuc.edu [mailto:llvmdev-bounces at cs.uiuc.edu] On Behalf Of Linhai
Sent: Thursday, September 25, 2014 2:39 AM
To: LLVM Developers Mailing List
Subject: [LLVMdev] loop clone?

Hi,

     I want to add a branch before a loop, and clone the loop to the else part. After that, I can do instrumentation in one loop, and keep the other one uninstrumented. Does llvm have existing functionality to clone loops, or similar codes I can check?

     Thanks a lot!

     Best,

Linhai
_______________________________________________
LLVM Developers mailing list
LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev




More information about the llvm-dev mailing list