[LLVMdev] Memory Subsystem Representation

David A. Greene greened at obbligato.org
Tue May 3 12:01:19 PDT 2011


"Rotem, Nadav" <nadav.rotem at intel.com> writes:

> Can you describe which passes may benefit from this information ?  My
> intuition is that until there are a number of passes which require
> this information, there are other ways to provide this
> information. One way would be to use Metadata.

We have Cray-specific passes that use this information.  Some of the
stuff Polly is doing almost certainly would benefit.

Metadata seems a very clunky way to do this.  It is so target-specific
that it would render IR files completely target-dependent.  These are
rather complex structures we're talking about.  Encoding it in metadata
would be inconvenient.

> Having said that, I do share the feeling that IR-level optimization
> often need more target-specific information. For example, vectorizing
> compilers need to know which instructions set the target has, etc. 

Yep, absolutely.

> To this end, we have implemented a new 'instcombine-like' pass which
> has optimizations which should have gone into 'instcombine' had we had
> more information about the target.

Right.  Exposing some target attributes via generic queries (e.g. what's
the max vector length for this scalar type?) has been on my wishlist for
a while now.

                            -Dave



More information about the llvm-dev mailing list