[LLVMdev] Adding structures in a loop pass
ksh.cseiitk at gmail.com
Wed Apr 22 21:30:26 PDT 2009
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
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
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:
>> 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.
> Your loop pass should be able to manage this extra information. See
> various loop transformations implementation, for example LoopRotation
> maintains LoopHeaderInfo.
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu
Department of Computer Science & Engineering
More information about the llvm-dev