[PATCH] D32737: [Constants][SVE] Represent the runtime length of a scalable vector

Renato Golin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat May 20 15:08:22 PDT 2017


rengolin added reviewers: delena, asb.
rengolin added a comment.

In https://reviews.llvm.org/D32737#760276, @chandlerc wrote:

> Uh, where was it discussed? It's entirely possible I missed it, but I can't find any consensus on any of the threads that we actually want to support runtime vector width in LLVM's IR.


Hi Chandler,

This has been discussed in the list and phab, and I invited people from different targets and core devs to discuss. As usual, "consensus" is formed from the people that have actually cared, but there have been enough threads and discussions. We can always have more discussions, sure, but pulling the hand break without concrete proposals at this stage is really not fair.

> For the record, I remain unconvinced that LLVM's IR should support non-constant vector widths.

Do you have an alternative implementation to scalable vectors?

> I understand why some CPU vendors are interested in this, but the motivation for LLVM to support it so far is very weak, and the cost in terms of complexity to the IR and every vector-aware optimization is, in my opinion, far too high. However, I'm trying to remain open about this subject and have been awaiting a fresh RFC on llvm-dev to really dig into the motivation.

"Some CPU vendors"? Seriously?

This is not a thought experiment or an academic theoretical paper, ARM's SVE is out, many manufacturers were involved and the hardware is being developed right now, and we need to implement it somehow. RISC-V will have support for scalable vectors in the near future, not to mention GCC's ongoing implementation of the spec.

Not implementing SVE, in my opinion, is not an option. It's like not doing vector support because the new types will break scalar optimisations.

Given that this will be more common in the future, having a simple and (hopefully elegant) implementation will make it a lot easier for passes to infer semantics and maintain the existing optimisations working.

The MVT types are out already, other changes going and I'm really surprised at such comments at this stage.

--renato


https://reviews.llvm.org/D32737





More information about the llvm-commits mailing list