Hi Todd,

Thanks a lot. This really helped me.

So, in case I can simply ignore module->setDataLayout(...) as it is already
set in it once. In my case, with LLVM 3.3, datalayout was added as Pass to
ModulePassManager and FunctionPassManager, which now is not needed, as it
is already set in the module object being used by these passmanagers.
Please confirm my understanding.

Also, it seems in your module_builder.cc, you are continuing using
PassManagers which are made as legacy now in LLVM 3.7. I hope it is okay to
use those legacy PassManagers instead of new PassManagers in
IR/PassManager.h.

Thanks,
Nishidha



From:   Todd Lipcon <[email protected]>
To:     [email protected]
Cc:     Silvius Rus <[email protected]>, nishidha panpaliya
            <[email protected]>, Nishidha
            Panpaliya/Austin/Contr/IBM@IBMUS, Sudarshan
            Jagadale/Austin/Contr/IBM@IBMUS
Date:   02/17/2016 11:45 PM
Subject:        Re: Passing DataLayout to Module/Function Pass Manager of LLVM



Regarding the DataLayout question, here's how we handle it with LLVM
3.7 in Kudu:

https://github.com/cloudera/kudu/blob/master/src/kudu/codegen/module_builder.cc#L267


You can see the diff in this mega commit:
https://github.com/cloudera/kudu/commit/9806863e78107505a622b44112a897189d9b3c24


On Wed, Feb 17, 2016 at 10:08 AM, Henry Robinson <[email protected]>
wrote:
> (Moving this conversation to [email protected],
> [email protected] to bcc:)
>
> On 17 February 2016 at 09:13, Silvius Rus <[email protected]> wrote:
>
>> Hey Nishidha,
>>
>> Would you be interested in contributing the changes you've made so far
to
>> the Impala ASF project?  It's easier to get help in context if you post
a
>> patch for review.  Upgrading to LLVM 3.7 would be beneficial to the
project
>> in general, so I think others will jump in to help.
>>
>> https://github.com/cloudera/Impala/wiki/Contributing-to-Impala
>>
>> Silvius
>>
>> On Wed, Feb 17, 2016 at 5:00 AM, nishidha panpaliya
<[email protected]>
>> wrote:
>>
>>> Alright Tim. Thanks for the reply.
>>>
>>> Regards,
>>> Nishidha
>>>
>>>
>>> On Tuesday, 16 February 2016 19:16:34 UTC+5:30, nishidha panpaliya
wrote:
>>>>
>>>> Hello,
>>>>
>>>> In Impala source code, I've encountered a place in
>>>> be/src/codegen/llvm-codegen.cc where DataLayout's pointer is passed to
>>>> PassManager::addPass method.
>>>>
>>>> module_pass_manager->add(new DataLayout(data_layout_str));
>>>> fn_pass_manager->add(new DataLayout(data_layout_str));
>>>>
>>>>
>>>> *Note*: addPass method is also changed to add in LLVM 3.7.
>>>>
>>>> I wanted to understand what exactly these two lines are doing. What
>>>> would be the impact if they are commented/removed? And if there is any
test
>>>> coverage for this?
>>>>
>>>> My rationale behind all these questions is to port Impala on ppc64le,
>>>> I'd to upgrade LLVM 3.3 to 3.7. And in LLVM 3.7, DataLayout is not
derived
>>>> from class Pass and hence these lines do not compile with LLVM 3.7.
So, I
>>>> need to either find equivalent of this or have to remove.
>>>>
>>>> I'll be grateful to you if you could provide some insights here.
>>>>
>>>> Thanks in advance,
>>>> Nishidha
>>>>
>>>> --
>>> You received this message because you are subscribed to the Google
Groups
>>> "Impala Dev" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
an
>>> email to [email protected].
>>>
>>
>> --
>> You received this message because you are subscribed to the Google
Groups
>> "Impala Dev" group.
>> To unsubscribe from this group and stop receiving emails from it, send
an
>> email to [email protected].
>>
>
>
>
> --
> Henry Robinson
> Software Engineer
> Cloudera
> 415-994-6679



--
Todd Lipcon
Software Engineer, Cloudera


Reply via email to