[PATCH] Fix GlobalOpt to use range metadata instead of creating SelectInsts.

Dan Gohman dan433584 at gmail.com
Sun Mar 16 11:07:24 PDT 2014


On Wed, Mar 12, 2014 at 9:56 AM, Rafael EspĂ­ndola <
rafael.espindola at gmail.com> wrote:

>
> > This patch is still powerful enough to optimize the bzip2 benchmark that
> > originally motivated this optimization. It's only less powerful in that
> it
> > indicates a range of values instead of just the two discrete values, but
> it
> > seems most existing optimizations just care about the range. If more
> precise
> > information is desired, it would make sense to augment the range
> metadata to
> > be able to provide that. If that is done, then this optimization could
> > easily be augmented to support it.
>
> The range should already support that if need. Only the optimization
> would need to up updated to created multiple ranges.
>

I missed that earlier. Attached is a new patch which implements this, and
uses APInts as you suggested.


> One more nit, can you update test/Transforms/GlobalOpt/integer-bool.ll
> to also CHECK the range added to the load?
>

The load in that testcase is eliminated, so I added a new test in which
loads aren't eliminated, that tests that they have the range metadata.

Dan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140316/63db3559/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: use-range-metadata-instead-of-introducing-selects.patch
Type: text/x-patch
Size: 10855 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140316/63db3559/attachment.bin>


More information about the llvm-commits mailing list