This is an archive of the discontinued LLVM Phabricator instance.

[Lexicon] Add GVN
ClosedPublic

Authored by modocache on May 29 2017, 9:21 PM.

Details

Summary

Add a lexicon entry for global value numbering.

Event Timeline

modocache created this revision.May 29 2017, 9:21 PM
davide edited edge metadata.May 29 2017, 9:54 PM

Rather than practice, I'd say analysis. Also, maybe just mention expressions (you can look up several papers for the exact definition https://arxiv.org/pdf/1303.1880.pdf, or Kildall's one, which I think has the first definition).
Technically speaking, GVN is just an analysis (although the GVN pass in LLVM currently does also elimination and PRE) [and also NewGVN, but that will change soon, hopefully]

inouehrs added inline comments.
docs/Lexicon.rst
113

nit: Global value numbering -> Global Value Numbering (capitalize each word)

modocache updated this revision to Diff 100704.May 30 2017, 7:14 AM

Capitalize & only mention expressions. Thanks for the link to the paper!

modocache marked an inline comment as done.May 30 2017, 7:15 AM
davide accepted this revision.Jun 10 2017, 8:53 PM

If you don't mind, I like the description at the top of NewGVN better, i.e.

/// GVN partitions values computed by a function into congruence classes.
/// Values ending up in the same congruence class are guaranteed to be the same
/// for every execution of the program. In that respect, congruency is a
/// compile-time approximation of equivalence of values at runtime.

Can you use this one? I also would remove the bit about transformations (many thinks as GVN as PRE but it's actually not).
With that, LGTM, you don't need to resubmit for another look.

This revision is now accepted and ready to land.Jun 10 2017, 8:53 PM
modocache updated this revision to Diff 102287.Jun 12 2017, 7:23 PM

Sure! I updated this to use the description from NewGVN. (I'm updating Phabticator since that's my normal workflow.)

modocache closed this revision.Jun 12 2017, 8:06 PM