[PATCH] D95815: [deref-at-point] restrict inference of dereferenceability based on allocsize attribute

Philip Reames via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 1 08:00:23 PDT 2021


reames added a comment.

In D95815#2663147 <https://reviews.llvm.org/D95815#2663147>, @nikic wrote:

> As we don't have any default-enabled nosync inference, doesn't this effectively disable this code entirely (for the default pipeline)?

Not really.

Remember, the currently hooked up code doesn't get the benefit of TLI.  (Because doing so immediately broke badly.)  As a result, it only handles things which are a) allocas and the like, or b) explicitly marked allocsize.  We do take a hit on the allocsize cases - except that the single consumer I know of is a GCd frontend which is special cased in the canBeFreed stuff anyways.  If anything, this should give us a net benefit because we can expose the malloc/new cases by adding TLI as a parameter (to be done and reviewed separately.)


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D95815/new/

https://reviews.llvm.org/D95815



More information about the llvm-commits mailing list