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

Graham Hunter via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 2 02:40:31 PDT 2017


huntergr created this revision.
Herald added subscribers: tschuett, mehdi_amini.

The length of a scalable vector is unknown during compilation.  When
vectorising loops the runtime length is required to update induction
variables and thus a representation is required within the IR.

This patch introduces the 'vscale' identifier to represent the scaling
factor 'n' of a scalable vector of the form '<n x #elements x ty>'.

In use, induction variable updates for scalable vectorisation become:

  ; i += number_of_elements(<n x 4 x i32)
  %i.next = add i32 %i, mul (i32 vscale, i32 4)

Picking up where Paul left off with https://reviews.llvm.org/D27103


https://reviews.llvm.org/D32737

Files:
  docs/LangRef.rst
  include/llvm-c/Core.h
  include/llvm/Bitcode/LLVMBitCodes.h
  include/llvm/IR/Constants.h
  include/llvm/IR/Value.def
  lib/AsmParser/LLLexer.cpp
  lib/AsmParser/LLParser.cpp
  lib/AsmParser/LLParser.h
  lib/AsmParser/LLToken.h
  lib/Bitcode/Reader/BitcodeReader.cpp
  lib/Bitcode/Writer/BitcodeWriter.cpp
  lib/IR/AsmWriter.cpp
  lib/IR/Constants.cpp
  lib/IR/LLVMContextImpl.cpp
  lib/IR/LLVMContextImpl.h
  test/Bitcode/compatibility.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D32737.97410.patch
Type: text/x-patch
Size: 10138 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170502/30af2bdb/attachment.bin>


More information about the llvm-commits mailing list