[PATCH] D108371: [LAA] Add Memory dependence and unknown bounds remarks.

Malhar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 19 06:11:28 PDT 2021


malharJ created this revision.
malharJ added reviewers: huntergr, alban.bridonneau.
Herald added a subscriber: hiraditya.
malharJ requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

Adds optimization remarks when vectorization fails.
The remarks will contain source location info if the input
is compiled with debug info (-g).

The failures are classified mainly into 2 categories
based on whether it is an aliased memory access
that is unsafe, and if a bound can be computed.

It is important to note that only one of the sources
of failures (to vectorize) is reported by the remarks.
This source of failure may not be first in program order.
In the future if may be possible to report all sources
of failure (and in program order).

A regression test has been added to test the following cases:

1. Loop can be vectorized. An optimization remark is emitted indicating that vectorization was successful. (note that this functionality was already present, ie. has not been added as part of this patch.)

2. Loop can not be vectorized. In this case an optimization remark will be emitted for one source of failure.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D108371

Files:
  llvm/include/llvm/Analysis/LoopAccessAnalysis.h
  llvm/include/llvm/Transforms/Vectorize/LoopVectorizationLegality.h
  llvm/lib/Analysis/LoopAccessAnalysis.cpp
  llvm/lib/Transforms/Vectorize/LoopVectorizationLegality.cpp
  llvm/test/Transforms/LoopVectorize/loopvectorize-opt-remarks.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D108371.367479.patch
Type: text/x-patch
Size: 57792 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210819/199bfb68/attachment.bin>


More information about the llvm-commits mailing list