[LLVMdev] IntervalPartition bug?

Chris Lattner sabre at nondot.org
Fri Apr 29 20:30:30 PDT 2005


On Fri, 29 Apr 2005, Vladimir Prus wrote:
> it looks like the IntervalPartition does not work as expected when constructed
> from another interval partition.
>
> Say, I have built an interval partition from function, and the first interval
> has two basic blocks. When I create second order partition and print all
> intervals, the second basic block of the function is not seen anywhere.

To be honest, this code is really old and has never been thoroughly 
tested.  If you want to become the "owner" of it, I'll take any patches 
you want against it.

> Here's NodeTy is a first order interval and can contain several basic 
> blocks, but we add only the first one. I attach the patch which tries to 
> fixes that. Also, for convenience, there's output of 2-order interval on 
> some test case. 'log' is before the change and 'log_good' is after the 
> change.

> I must admit the change does not look 100% right to me yet.

Hrm, when you get something that looks right, let me know and I'll apply 
it :)

> On a related note, I'm a bit surprised that 2-nd order partition consists of
> basic blocks. I'd more expect that it consisted of Interval's. As it stands,
> it's not easy to tell which 1-st order invervals are contained in a given
> 2-nd order interval.

That does seem strange.  If you would like to change/refactor this code, 
feel free.

-Chris

-- 
http://nondot.org/sabre/
http://llvm.cs.uiuc.edu/




More information about the llvm-dev mailing list