[PATCH] D146179: ValueTypes.td: Reorganize ValueType

NAKAMURA Takumi via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 15 16:49:21 PDT 2023


chapuni created this revision.
Herald added a subscriber: ctetreau.
Herald added a project: All.
chapuni requested review of this revision.
Herald added subscribers: llvm-commits, alextsao1999, jdoerfert.
Herald added a project: LLVM.

Introduce VTAny as `isOverloaded = true`. ValueType.isOverloaded` is used for;

- Define `iPTRAny`, `vAny`, `fAny`, and `Any`
- Reflect `ValueType.isOverloaded` to `LLVMType.isAny` in `Intrinsics.td`
- (Planninig) Reflect the condition to `MVT::isOverloaded()`

Introduce some fields in `ValueType`

- isInteger
- isFP
- isVector
- isScalable
- nElem
- ElementType

Introduce `VTVec<int nelem, ValueType elt, int value>` to represent
the element type. VTVec.Size may be calculated by `!mul(nelem, elt.Size)`.

Introduce `list<ValueType> ValueTypes` as convention for lookup.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D146179

Files:
  llvm/include/llvm/CodeGen/ValueTypes.td
  llvm/include/llvm/IR/Intrinsics.td

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D146179.505659.patch
Type: text/x-patch
Size: 28419 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230315/5d1dee85/attachment.bin>


More information about the llvm-commits mailing list