[PATCH] D115873: [LAA] Add remarks for unbounded array access
Malhar via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 28 03:17:54 PST 2022
malharJ added inline comments.
================
Comment at: llvm/lib/Analysis/LoopAccessAnalysis.cpp:565
+ bool ShouldCheckWrap = false,
+ Value **UncomputablePtr = nullptr);
----------------
sdesmalen wrote:
> Instead of passing in the pointer with a default value of `nullptr`, can you make it a reference, so that it always gets set, e.g.
>
> Value *&UncomputablePtr
>
> That also removes the need for the conditional write.
Can we please leave it as initialised as nullptr ?
The conditional write ensures that the first unsafe dependence gets reported by the remark.
```
if (UncomputablePtr)
*UncomputablePtr = Access.getPointer();
```
================
Comment at: llvm/test/Transforms/LoopVectorize/X86/vectorization-remarks-missed.ll:200
for.body.preheader: ; preds = %entry
- br label %for.body, !dbg !35
+ br label %for.body, !dbg !32
----------------
sdesmalen wrote:
> Is this an unrelated change?
Ok. I've submitted as a separate commit to avoid any confusion.
https://github.com/llvm/llvm-project/commit/b75bdff4a0e91af1237ba77adce2f9fc7198ec26
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D115873/new/
https://reviews.llvm.org/D115873
More information about the llvm-commits
mailing list