[all-commits] [llvm/llvm-project] e2c662: [deref-at-point] restrict inference of dereference...

Philip Reames via All-commits all-commits at lists.llvm.org
Thu Apr 1 08:35:02 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: e2c6621e638e4dc30963293bff052784d3a3305a
      https://github.com/llvm/llvm-project/commit/e2c6621e638e4dc30963293bff052784d3a3305a
  Author: Philip Reames <listmail at philipreames.com>
  Date:   2021-04-01 (Thu, 01 Apr 2021)

  Changed paths:
    M llvm/include/llvm/IR/Value.h
    M llvm/lib/Analysis/Loads.cpp
    M llvm/lib/IR/Value.cpp
    M llvm/test/Transforms/LICM/hoist-alloc.ll
    M llvm/test/Transforms/LoopVectorize/X86/load-deref-pred.ll

  Log Message:
  -----------
  [deref-at-point] restrict inference of dereferenceability based on allocsize attribute

Support deriving dereferenceability facts from allocation sites with known object sizes while correctly accounting for any possibly frees between allocation and use site. (At the moment, we're conservative and only allowing it in functions where we know we can't free.)

This is part of the work on deref-at-point semantics. I'm making the change unconditional as the miscompile in this case is way too easy to trip by accident, and the optimization was only recently added (by me).

There will be a follow up patch wiring through TLI since that should now be doable without introducing widespread miscompiles.

Differential Revision: https://reviews.llvm.org/D95815




More information about the All-commits mailing list