[PATCH] [PM] Create a separate library for high-level pass management code.

Chandler Carruth chandlerc at google.com
Thu Mar 5 15:02:56 PST 2015


On Thu, Mar 5, 2015 at 3:00 PM, Pete Cooper <peter_cooper at apple.com> wrote:

> On Mar 5, 2015, at 2:56 PM, Chandler Carruth <chandlerc at google.com> wrote:
>
>
> On Thu, Mar 5, 2015 at 2:51 PM, Pete Cooper <peter_cooper at apple.com>
> wrote:
>
>> On Mar 5, 2015, at 2:47 PM, Chandler Carruth <chandlerc at google.com>
>> wrote:
>>
>>
>> On Thu, Mar 5, 2015 at 2:46 PM, Pete Cooper <peter_cooper at apple.com>
>> wrote:
>>
>>> Yeah, I agree that layering is an issue.
>>>
>>> The current pass code is in lib/IR, which I think is libCore.  There’s
>>> no fundamental reason why your code couldn’t also live there right now.
>>> Its linked against everything you mentioned already.
>>>
>>
>> Wait, you've lost me.
>>
>> I’m talking about what if you didn’t create a new library.  I think
>> you’re talking about the relationship between the new libPasses and other
>> libraries.  Otherwise i’m lost too :)
>>
>> I was saying that if you didn’t create a new library, then I assumed the
>> new PM code could live in libCore next to the current PM code.  And then
>> everything just depends on libCore as they currently do.
>>
>
> No no, that's the problem. Everything depends on libCore. Including
> libTransforms, libTarget, etc.
>
> the code i've got in Passes right now depends on code in the target
> library and in the transforms and analysis library. It can't do that from
> libCore without creating a cycle.
>
> Ah, i see.  Ouch!
>
>
> So we have:
>
> parsePassPipeline -> SROA (libTransforms) -> PassManager (IR / Core)
>
> If we put parsePassPipeline in Core, we form a cycle.
>
> Gotcha.
>
> So how much of this is going to be optional?  If I create a dylib, can I
> opt out of parsePassPipeline (export list probably), and therefore not have
> to link all the passes?  I don’t want to have to carry around passes I know
> I don’t need.
>

All of this is optional.

The Passes library contains code to aggregate passes in a useful way. If
you define your pass pipeline, you shouldn't need this at all.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150305/3db39895/attachment.html>


More information about the llvm-commits mailing list