[cfe-dev] Is ModuleBuilder useful to anyone?
Yaron Keren
yaron.keren at gmail.com
Wed Dec 31 01:39:22 PST 2014
ModuleBuilder is an ASTConsumer wrapping CodeGenModule to generate IR. It
has two types of users (we know of so far). The first is in-tree
BackendConsumer, generating object and assembler files and the second is
MCJIT (and the old JIT in previous versions).
Since BackendConsumer can generate no file (Action = Backend_EmitNothing)
it may make sense to merge BackendConsumer into ModuleBuilder and
remove BackendConsumer
altogether. This should work with JIT just the same and eliminate the
BackendConsumer-ModuleBuilder interface.
2014-12-31 0:07 GMT+02:00 Vassil Vassilev <vvasilev at cern.ch>:
> On 30/12/14 13:34, Yaron Keren wrote:
>
> True, I checked now and cling uses the ModuleBuilder. It can't switch
> to BackendConsumer as it's still using the old JIT.
>
> Technically the old JIT is gone and if we update to newer llvm (which is
> the plan) we will have to migrate to MCJIT. Given that, would it be easier
> to avoid using ModuleBuilder?
> Vassil
>
>
>
> 2014-12-30 10:04 GMT+02:00 Mark Boyall <wolfeinstein at gmail.com>:
>
>> I have a hard dependency on it and have no idea how I could handle
>> losing that API
>> ------------------------------
>> From: Keno Fischer <kfischer at college.harvard.edu>
>> Sent: 30/12/2014 07:32
>> To: Yaron Keren <yaron.keren at gmail.com>; vvasilev at cern.ch
>> Cc: cfe-dev at cs.uiuc.edu Developers <cfe-dev at cs.uiuc.edu>; Rafael Ávila
>> de Espíndola <rafael.espindola at gmail.com>; Reid Kleckner <rnk at google.com>;
>> Chandler Carruth <chandlerc at google.com>; Richard Smith
>> <richard at metafoo.co.uk>; Mark Boyall <wolfeinstein at gmail.com>;
>> chisophugis at gmail.com
>> Subject: Re: Is ModuleBuilder useful to anyone?
>>
>> Personally I'm not using it, but I recall that cling might be?
>>
>> On Tue, Dec 30, 2014 at 8:22 AM, Yaron Keren <yaron.keren at gmail.com>
>> wrote:
>>
>>> Following
>>>
>>>
>>> http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20140825/113355.html
>>>
>>> In tree, ModuleBuilder has one user (+test) only, the BackendConsumer.
>>> The interaction between the two classes complicates BackendConsumer
>>> logic. For instance, both hold the same Module * in two different
>>> std::unique_ptr and dance around this problem to avoid releasing it twice
>>> or none.
>>>
>>> Out of tree, is ModuleBuilder limited functionality useful to any
>>> project?
>>>
>>>
>>
>
>
> --
> --------------------------------------------
> Q: Why is this email five sentences or less?
> A: http://five.sentenc.es
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20141231/297906d6/attachment.html>
More information about the cfe-dev
mailing list