[LLVMdev] outlining in llvm

Nema, Ashutosh Ashutosh.Nema at amd.com
Wed Jan 28 02:38:25 PST 2015


Hi Tehila,

You can use CodeExtractor to do function outlining.
It provide you facility to extract following to a function:
1) single block                    2) Series of block
3) Region node                 4) Loop

First it identify input and output to outlined function.
Then it does actual outlining on the specified blocks.
It sets input and output to functions as parameter.
Also it take cares of adding a callsite.

Hope this helps you.

Regards,
Ashutosh

From: llvmdev-bounces at cs.uiuc.edu [mailto:llvmdev-bounces at cs.uiuc.edu] On Behalf Of Tehila Mayzels
Sent: Thursday, January 01, 2015 2:19 AM
To: llvmdev at cs.uiuc.edu
Subject: [LLVMdev] outlining in llvm

Hi,

I have some questions regarding outlining (extracting piece of code into a function):

1.       Is there an outlining pass in llvm (IR)? I've found out CodeExtractor pass, but I'm not sure it's exactly the same idea.

2.       How do I set the function name?


And another question:
Where do I control the execution of my pass? I'm writing a pass that first works on loops, than on a function (outlined from the loop) and then again on loops.
How can I do that?

Thanks and happy new year,
Tehila.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150128/3ab25776/attachment.html>


More information about the llvm-dev mailing list