[PATCH] Fix GlobalOpt to use range metadata instead of creating SelectInsts.
dan433584 at gmail.com
Fri Mar 7 11:16:57 PST 2014
On Fri, Feb 28, 2014 at 11:38 AM, Dan Gohman <dan433584 at gmail.com> wrote:
> Previously, when GlobalOpt noticed that a GlobalVariable only ever has two
> values, it replaced the GlobalVariable with a boolean, and introduced
> SelectInsts to produce the desired values. The main purpose of this was to
> expose the value range information to subsequent optimization passes.
> espindola on IRC suggested that range metadata could achieve the same
> purpose. Attached is a patch which replaces GlobalOpt's
> TryToShrinkGlobalToBoolean with a TryToAddRangeMetadata. The metadata is
> sufficient to enable the main optimization that TryToShrinkGlobalToBoolean
> enabled, as can be seen in the test/Transforms/GlobalOpt/integer-bool.ll
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the llvm-commits