[llvm] [MVT][TableGen] Extend Machine Value Type to `uint16_t` (PR #99657)

Pengcheng Wang via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 23 02:53:07 PDT 2024


wangpc-pp wrote:

> > > > Another NOTE: after this patch, we should reorder the MVT values and move top-128-uses MVTs ahead to reduce MatcherTable size.
> > > 
> > > 
> > > Aren't they grouped in ranges?
> > 
> > 
> > I think @wangpc-pp means reorder the group?

Yes! I was thinking about reordering these groups. And further, we can reorder all MVTs one by one.

> There are quite a few places that loop over all integer types or all vector types by assuming they are in continguous ranges.

This assumption is weak, we should change it. We can remove these `MVT::FIRST_XXX` and `MVT::LAST_XXX`, and generate arrays for these MVTs with same attributes.

> Yes, but I don't think that will be easy. 

Agree! But for better maintainability and extendibility, we should address this weakness now.

https://github.com/llvm/llvm-project/pull/99657


More information about the llvm-commits mailing list