[PATCH] D102834: [SLPVectorizer] WIP Implement initial memory versioning (WIP!)

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu May 20 02:46:08 PDT 2021


fhahn created this revision.
fhahn added reviewers: spatel, RKSimon, dtemirbulatov, anton-afanasyev, ABataev.
Herald added a subscriber: hiraditya.
fhahn requested review of this revision.
Herald added a project: LLVM.

This patch is just an initial sketch to get a discussion going on how to
best support generating runtime checks for may-aliasing memory accesses.

The key question to start with is where to best collect and generate
runtime checks. Currently codegen for a block is eager; for each block,
if we find a vectorizable tree, we vectorize it and then analyze the
rest of the block. This makes it hard to collect *all* runtime checks
for a block before changing the code.

Perhaps for now we need to limit the checks to the first vectorizable
tree in a block? This is what the patch tries to do.

There are a couple of mechanical/technical issues that need to be
addressed, but I think the questions above are key to answer/address
first.

Other than that, the patch does not yet consider the cost of cloning
the block and the runtime checks. It also does not introduce phis
for values used outside the cloned block, so it will generate invalid IR
in those cases for now.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D102834

Files:
  llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
  llvm/test/Transforms/SLPVectorizer/AArch64/memory-runtime-checks.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D102834.346674.patch
Type: text/x-patch
Size: 14845 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210520/9a1c3851/attachment.bin>


More information about the llvm-commits mailing list