[llvm-dev] [RFC] Interprocedural MIR-level outlining pass

Daniel Berlin via llvm-dev llvm-dev at lists.llvm.org
Wed Aug 31 16:13:14 PDT 2016

On Wed, Aug 31, 2016 at 5:17 AM, Andrey Bokhanko <andreybokhanko at gmail.com>

> On Tue, Aug 30, 2016 at 7:28 PM, Daniel Berlin <dberlin at dberlin.org>
> wrote:
>> I tend to agree with Hal -- value numbering computes equivalent *values*,
>> Sorry, but this is just flat out wrong
>> "A Global Value Numbering(GVN) algorithm is considered to be complete (or
>> precise), if it can detect all Herbrand equivalences among expressions in a
>> program.
>> Two expressions are said to be Herbrand equivalent (or transparent
>> equivalent ), if they are computed by the same operator applied to
>> equivalent operands "
>> This is, AFAIK, precisely what you want.
> I'm not entirely happy with this definition (IMHO, it's overly
> restrictive),

Err, this is the definition going all the way back to kildall, so ...

> but this in irrelevant.
> What relevant is what one considers to be "equivalent operands". Take my
> example again -- for outlining (Jessica's name) / code folding (your name)
> optimization reads of "a" and "b" globals are equivalent; for VN and its
> users they are not.

You realize how you define "equivalent" is completely up to you, right?
The algorithm does not care.

It does not care if you say "anything that i can prove equal is equivalent"
or "anything that is a variable " is equivalent.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160831/12c169e0/attachment.html>

More information about the llvm-dev mailing list