[PATCH] D95815: [WIP] Demonstrate correctness problem with deref attributes and free

Philip Reames via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 1 12:58:19 PST 2021


reames created this revision.
Herald added subscribers: dantrushin, asbirlea, hiraditya, mcrosier.
Herald added a reviewer: bollu.
reames requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

Not for review, posted to a) save the patch, and b) have something concrete in discussions.

The intention of this was to allow us to hoist loads out of loops when we could prove they were accessing memory in bounds of a malloc which has not yet been captured.  This was expected to be a straight forward extension to 0129cd5 <https://reviews.llvm.org/rG0129cd503575076556935a16f458b0a3c2e30646>, but it turns out that the issue we thought we'd addressed in that review isn't addressed after all.

The basic problem we have here is that many of our dereferenceability related facts are current global, and we don't have a good way to handle invalidation at frees.

Johannes and I discussed an approach to this a while ago, guess I need to actually go write that email now.


https://reviews.llvm.org/D95815

Files:
  llvm/include/llvm/Analysis/ValueTracking.h
  llvm/lib/Analysis/Loads.cpp
  llvm/lib/Analysis/ValueTracking.cpp
  llvm/lib/Transforms/Scalar/LICM.cpp
  llvm/test/Transforms/LICM/hoist-alloc.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D95815.320567.patch
Type: text/x-patch
Size: 15429 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210201/c4df1f01/attachment.bin>


More information about the llvm-commits mailing list