[llvm-dev] llvm outlining question

Zaks, Ayal via llvm-dev llvm-dev at lists.llvm.org
Wed Apr 13 23:49:06 PDT 2016


I’ll see what fixes of Michael I can find, including http://reviews.llvm.org/D9647.

If you have concrete examples showing failures, it would be good to open PRs with testcases. That can help drive such fixes.

From: minghwa.wang at gmail.com [mailto:minghwa.wang at gmail.com] On Behalf Of Minghwa Wang
Sent: Thursday, April 14, 2016 02:03
To: Michael Kuperstein <michael.kuperstein at gmail.com>
Cc: Tom Chen <cyt046 at gmail.com>; llvm-dev at lists.llvm.org; Zaks, Ayal <ayal.zaks at intel.com>
Subject: Re: [llvm-dev] llvm outlining question

Hi Ayal,

Do you have any CodeExtractor fixes I can use?

Thanks,
Ming-Hwa


On Tue, Apr 12, 2016 at 2:44 PM, Michael Kuperstein <michael.kuperstein at gmail.com<mailto:michael.kuperstein at gmail.com>> wrote:
I'm not aware of anything else in LLVM that performs outlining.
Ayal (CCed) may be able to help you regarding CodeExtractor fixes.

Thanks,
  Michael

On 12 April 2016 at 14:21, Minghwa Wang <mwang2 at cse.scu.edu<mailto:mwang2 at cse.scu.edu>> wrote:
Thank you Michael and Tom for the quick reply.

According to your experience and comments, CodeExtractor is buggy only works for special cases but not general enough for most usages. Then do we have other outlining solution in llvm? Or I have to repeat what Michel done before?

Best regards,
Ming-Hwa

On Tue, Apr 12, 2016 at 1:48 PM, Michael Kuperstein <michael.kuperstein at gmail.com<mailto:michael.kuperstein at gmail.com>> wrote:
CodeExtractor sort of does this.

First, it's a utility, not a pass - you'd still need to wrap it up with pass that actually causes it to outlines what you want it to outline.

Second, it's a bit buggy. There are, as far as I know, two in-tree users of this utility: bugpoint, and partial inlining. Both of them are fairly specialized use-cases, and don't actually exercise the full generality of outlining an arbitrary region. And since a lot of cases are in practice untested - they don't quite work.
I've had some fixes for this internally, but never actually upstreamed them, and no longer have access to that codebase. So, you'll probably run into the same issues if you try to do anything untrivial with it.

Michael



On 12 April 2016 at 13:24, Tom Chen via llvm-dev <llvm-dev at lists.llvm.org<mailto:llvm-dev at lists.llvm.org>> wrote:
Does this do what you want http://llvm.org/docs/doxygen/html/classllvm_1_1CodeExtractor.html?

2016-04-12 14:58 GMT-05:00 Minghwa Wang via llvm-dev <llvm-dev at lists.llvm.org<mailto:llvm-dev at lists.llvm.org>>:
Is there any support for outlining in llvm?

As we know outlining is the opposite of inlining and while refactoring, if we can outlining common code into functions, then function merge (supported by llvm) can be more efficient in reducing code size.

If llvm support outlining, how to use it? Any documentation for it?

Thanks,
Ming-Hwa


_______________________________________________
LLVM Developers mailing list
llvm-dev at lists.llvm.org<mailto:llvm-dev at lists.llvm.org>
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev


_______________________________________________
LLVM Developers mailing list
llvm-dev at lists.llvm.org<mailto:llvm-dev at lists.llvm.org>
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev




---------------------------------------------------------------------
Intel Israel (74) Limited

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160414/a234b924/attachment.html>


More information about the llvm-dev mailing list