[PATCH] D27101: [Type] Extend VectorType to support scalable vectors. [IR support for SVE scalable vectors 1/4]

Paul Walker via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 24 06:41:19 PST 2016


paulwalker-arm created this revision.
paulwalker-arm added reviewers: hfinkel, nadav.
paulwalker-arm added a subscriber: llvm-commits.
Herald added a subscriber: mehdi_amini.

  VT::NumElements is replaced by VT::ElementCount with the later holding
  the minimum #Elements along with a scalable flag.  This leads to three
  scenarios:
  
  1. The vector length is treated as opaque and thus calls to
  getNumElements become getElementCount.
  2. The vector length is being scaled (doubled/halved) in which case
  calls to getNumElements become getElementCount and the arithmetic
  remains the same.
  3. The code does not support scalable vectors in which case it is
  protected by !isScalable() and operates on getNumElements as it does
  today.
  
  This patch extends VectorType with an ElementCount based interface along
  with IR parsing/writing and bitcode changes to support scalable vector
  types.


https://reviews.llvm.org/D27101

Files:
  docs/LangRef.rst
  include/llvm/IR/DerivedTypes.h
  include/llvm/IR/Type.h
  lib/AsmParser/LLLexer.cpp
  lib/AsmParser/LLParser.cpp
  lib/AsmParser/LLToken.h
  lib/Bitcode/Reader/BitcodeReader.cpp
  lib/Bitcode/Writer/BitcodeWriter.cpp
  lib/IR/AsmWriter.cpp
  lib/IR/Type.cpp
  test/Bitcode/compatibility.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D27101.79228.patch
Type: text/x-patch
Size: 16371 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20161124/6ee0d674/attachment.bin>


More information about the llvm-commits mailing list