[LLVMdev] outlining in llvm
Philip Reames
listmail at philipreames.com
Fri Jan 2 12:15:18 PST 2015
On 12/31/2014 12:49 PM, Tehila Mayzels wrote:
>
> 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.
>
To my knowledge, there is not an existing outlining pass in tree. Most
of the functionality to write one could probably be found in various
places, but the profitability heuristics are entirely missing. One
reasonable starting point might be the MergeFunctions pass.
>
> 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?
>
This ordering isn't a natural thing to express in LLVM's pass
structure. You'll probably need to use a Module pass since that's the
only type allowed to modify other functions. (A loop pass will not work
for this.)
> Thanks and happy new year,
>
> Tehila.
>
>
>
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150102/cf308c30/attachment.html>
More information about the llvm-dev
mailing list