[all-commits] [llvm/llvm-project] 2062b3: [LAA] Avoid adding pointers to the checks if they ...
Florian Hahn via All-commits
all-commits at lists.llvm.org
Thu Jul 30 11:21:45 PDT 2020
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: 2062b3707c1ef698deaa9abc571b937fdd077168
https://github.com/llvm/llvm-project/commit/2062b3707c1ef698deaa9abc571b937fdd077168
Author: Florian Hahn <flo at fhahn.com>
Date: 2020-07-30 (Thu, 30 Jul 2020)
Changed paths:
M llvm/lib/Analysis/LoopAccessAnalysis.cpp
A llvm/test/Transforms/LoopLoadElim/pr46854-adress-spaces.ll
Log Message:
-----------
[LAA] Avoid adding pointers to the checks if they are not needed.
Currently we skip alias sets with only reads or a single write and no
reads, but still add the pointers to the list of pointers in RtCheck.
This can lead to cases where we try to access a pointer that does not
exist when grouping checks. In most cases, the way we access
PositionMap masked that, as the value would default to index 0.
But in the example in PR46854 it causes a crash.
This patch updates the logic to avoid adding pointers for alias sets
that do not need any checks. It makes things slightly more verbose, by
first checking the numbers of reads/writes and bailing out early if we don't
need checks for the alias set.
I think this makes the logic a bit simpler to follow.
Reviewed By: anemet
Differential Revision: https://reviews.llvm.org/D84608
More information about the All-commits
mailing list