Devang,
Let me reframe my question.I require to keep this extra information as
a structure so as to pass it around to other functions which require
it. Specifically I am working on CellBE and wish to DMA this
information to the SPEs The way of adding the information by PHI nodes
will not suffise since the information may be very large in some cases
which will need to be transfered by a DMA rather than by parameter
passing.
From what I know it is not allowed to modify anything outside the
loop's scope in a loop pass. A runonFunction method will run on
functions and probably able to add this new struct type to the module.
Can you provide me pointers towards obtaining loops inside
runOnFunction method?
Thanks,
Kshitiz
On Wed, Apr 22, 2009 at 11:26 PM, Devang Patel <devang.patel at gmail.com>
wrote:> On Wed, Apr 22, 2009 at 12:10 AM, Kshitiz Garg <ksh.cseiitk at
gmail.com> wrote:
>> Hello,
>> I wanted to do some speculative execution on a loop for which I
>> require some data storage structure for book keeping. The exact
>> structure of this storage buffer can only be determined after loop
>> analysis. Is there a clean way to add this new structure to the
>> module. Since this structure is to be used for each loop iteration I
>> do not want to allocate it inside the loop.
>>
>> A second alternative could be I run a module pass and go through
>> the loop inside that. Is there a way to call the loop pass from inside
>> the module pass or obtain information about the loops present inside
>> the module and individually call the loop pass on them.
>>
>
> Kshitiz,
>
> Your loop pass should be able to manage this extra information. See
> various loop transformations implementation, for example LoopRotation
> maintains LoopHeaderInfo.
>
> -
> Devang
>
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>
--
Kshitiz Garg
Graduate Student
Department of Computer Science & Engineering
IIT Kanpur
http://home.iitk.ac.in/~kshitizg