[LLVMdev] IntervalPartition and Intervals per function
Prakash Prabhu
prakash.prabhu at gmail.com
Thu Aug 28 07:18:34 PDT 2008
On Wed, Aug 27, 2008 at 11:35 PM, Chris Lattner <clattner at apple.com> wrote:
>
> On Aug 27, 2008, at 3:04 PM, Prakash Prabhu wrote:
>
>> Hi Chris,
>>
>> Thanks for the reply. I am actually interested in using the Intervals
>> Analysis mainly to be able to do Region based analysis. In fact, I
>> found that the way Intervals are defined mirror exactly the definition
>> of a Region in the second edition of the Dragon Book (Section 9.7 on
>> Region-Based Analysis), so it will be great if the Intervals related
>> code still lives on in LLVM :).
>
> Ok :)
>
>> I found a fix for the bug, which may not be very elegant, but works
>> none the less. Firstly, the destroy() method in IntervalPartition.cpp
>> did not clear the Intervals vector and secondly,
>
> Applied!
> http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20080825/066480.html
>
>> since destroy() is
>> only called from the destructor the state of the intervals is
>> maintained across different runOnFunction() calls. So now I clear the
>> Intervals vector in destroy() and call destroy() to start on a clean
>> state before doing the processing (as was done earlier) in
>> runOnFunction. I am attaching the patch with this mail.
>
> The right fix for this is to rename destroy() to releaseMemory().
> Does that work?
Yeah, that works. Thanks !
- Prakash
>
> -Chris
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>
More information about the llvm-dev
mailing list