[Mesa-dev] [PATCH 0/5] [RFC] Value range propagation for NIR

Thomas Helland thomashelland90 at gmail.com
Tue Jul 14 15:49:51 PDT 2015


For now you'll just have to check my github repo at:
https://github.com/thohel/mesa/tree/gsoc-range-prop2

I'll get the last patch out ASAP, but it seems like something
has taken a huge crap on my send-email.
It failed halfway, and is now crying about git send-email
possibly being broken. Weird stuff.

2015-07-15 0:08 GMT+02:00 Thomas Helland <thomashelland90 at gmail.com>:
> The deadline for GSoC is aproaching a bit faster than I'm
> comfortable with, so I need to get this out on the list
> for some review-action. It's not yet complete, but I think
> it's getting there. At least it should be possible to infer
> what I'm trying to do I think.
> I haven't yet gotten to testing this a whole lot, as I
> wanted to get some feedback before getting to lost with
> all the debugging. It compiles though, so that's nice.
> (apart from some . / -> blunders I got in there just before
> sending out the pathces).
>
> Things I know are a bit iffy, and that I need to look into,
> is the long citation from LLVM's SCCP at close-to-bottom of the pass.
> TLDR of that section is:
> Since we don't analyze blocks that are results of branching on
> instructions that are undefined the assumptions that the
> pass has made when we get to the end may be wrong.
> I have a sketch in my mind on how to do that though,
> so I don't think it should be that bad.
>
> I'm hoping to get a similar series on the list tomorrow
> for the loop analysis pass. I just need to figure out
> how to hook the pass up to the metadata system.
> When these two series are out I'll let them soak
> on the list for some comments while I go head-to-head with
> the loop unrolling. Happy reviewing =)
>
> Thomas Helland (5):
>   nir/worklist: Split out the type-independent parts
>   nir: Add a worklist for SSA definitions
>   nir: Move nir_instr_get_dest_ssa_def to nir.c / nir.h
>   nir: Add a helper for iterating over blocks in a cf node
>   nir: Add a value range propagation pass
>
>  src/glsl/Makefile.sources           |    3 +
>  src/glsl/nir/nir.c                  |   28 +
>  src/glsl/nir/nir.h                  |    8 +
>  src/glsl/nir/nir_block_worklist.h   |  112 +++
>  src/glsl/nir/nir_live_variables.c   |    2 +-
>  src/glsl/nir/nir_opt_cse.c          |   20 -
>  src/glsl/nir/nir_opt_value_range.c  | 1330 +++++++++++++++++++++++++++++++++++
>  src/glsl/nir/nir_ssa_def_worklist.h |  100 +++
>  src/glsl/nir/nir_worklist.c         |   78 +-
>  src/glsl/nir/nir_worklist.h         |   44 +-
>  10 files changed, 1637 insertions(+), 88 deletions(-)
>  create mode 100644 src/glsl/nir/nir_block_worklist.h
>  create mode 100644 src/glsl/nir/nir_opt_value_range.c
>  create mode 100644 src/glsl/nir/nir_ssa_def_worklist.h
>
> --
> 2.4.5
>


More information about the mesa-dev mailing list