[llvm-commits] PATCH: Introduce a verify routine for LiveInterval and start using it during merging operations

Chandler Carruth chandlerc at gmail.com
Sun Jul 8 02:26:59 PDT 2012


On Fri, Jul 6, 2012 at 4:02 PM, Jakob Stoklund Olesen <stoklund at 2pi.dk>wrote:

>
> On Jul 6, 2012, at 3:40 PM, Chandler Carruth <chandlerc at gmail.com> wrote:
>
> I'll integrate this (as wel as your and Ben's comments) into a fresh patch
> shortly for you to look at before I commit.
>
>
> You'll probably need this anyway: I think it would be nice to have a
> LiveInterval::verify() function that checks all the invariants:
>
> ranges[i].start.isValid()
> ranges[i].end.isValid()
> ranges[i].start < ranges[i].end
> ranges[i].valno != NULL
> ranges[i].valno == valnos[ranges[i].valno->id]
> ranges[i].end <= ranges[i+1].start
> ranges[i].end == ranges[i+1].start ==> ranges[i].valno != ranges[i+1].valno
>

Attached a patch to implement this. It's used in fairly ad-hoc places
currently, but seems useful and its super easy to wire it up more places.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20120708/160e15ba/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: live-interval-verify.patch
Type: application/octet-stream
Size: 3585 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20120708/160e15ba/attachment.obj>


More information about the llvm-commits mailing list