[llvm-dev] Dataflow analysis regression in 3.7

Daniel Berlin via llvm-dev llvm-dev at lists.llvm.org
Sun Jul 9 10:24:01 PDT 2017

>> Matt Simpson and I briefly discussed this transformation.  One of his
> suggestions was to add a pass in the pipeline where the dominator tree was
> available (note my patch used a poor man's version of domination) and to
> add range meta-data to values (or replace values if we know the exact
> value) based on dominating conditions.

This is a pretty trivial variant of what the predicateinfo utility  does :)

(it just happens to process branches, assumes, etc. But you could trivially
modify it to change the name anywhere the range is different, to ensure the
invariant that anything with the same ssa name has the same range)

I thought it was pretty interesting idea, but I'm not very familiar with
> how range metadata is generated and used.
GCC pretty much does what i said above:
It generates assert_expr's, which rename values, where the ranges change
(this is equivalent to what predicateinfo does), then solves a lattice over
the resulting IR.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20170709/39e005db/attachment.html>

More information about the llvm-dev mailing list