[PATCH] D99100: [WIP] Implement RFC: Decomposing deref(N) into deref(N) + nofree

Philip Reames via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 22 11:59:36 PDT 2021


reames created this revision.
reames added reviewers: nlopes, jdoerfert, apilipenko, nlewycky.
Herald added subscribers: dexonsmith, dantrushin, pengfei, asbirlea, hiraditya, mcrosier.
Herald added a reviewer: bollu.
reames requested review of this revision.
Herald added a project: LLVM.

This implements the semantic change to dereferenceability described in the llvm-dev thread "RFC: Decomposing deref(N) into deref(N) + nofree".

At the moment, it shows the (widespread) optimization impact of simply toggling the behavior.  My plan is to examine each test change to see if a) we can generalize the transform slightly to not depend on global deref, or b) what appropriate test changes (e.g. adding attributes) make sense without destroying the intend of the test.  My plan is to tackle each transform in it's own review, and rebase this one incrementally as we go.

In addition to the updated tests, there are currently 4 failing tests.  These simply happen to be difficult to show updates in easily due to limitations of our auto-update tests.  They will be included before final review of this patch.

  LLVM :: Analysis/BasicAA/dereferenceable.ll
  LLVM :: Analysis/ValueTracking/memory-dereferenceable.ll
  LLVM :: Transforms/VectorCombine/X86/load-inseltpoison.ll
  LLVM :: Transforms/VectorCombine/X86/load.ll


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D99100

Files:
  llvm/docs/LangRef.rst
  llvm/lib/IR/Value.cpp
  llvm/test/Analysis/ValueTracking/deref-bitcast-of-gep.ll
  llvm/test/CodeGen/X86/hoist-invariant-load.ll
  llvm/test/CodeGen/X86/licm-dominance.ll
  llvm/test/CodeGen/X86/load-partial.ll
  llvm/test/CodeGen/X86/memcmp-mergeexpand.ll
  llvm/test/Transforms/GVN/PRE/load-pre-licm.ll
  llvm/test/Transforms/GVN/PRE/pre-load.ll
  llvm/test/Transforms/GVN/loadpre-context.ll
  llvm/test/Transforms/InstCombine/call-guard.ll
  llvm/test/Transforms/InstCombine/masked_intrinsics-inseltpoison.ll
  llvm/test/Transforms/InstCombine/masked_intrinsics.ll
  llvm/test/Transforms/InstCombine/select.ll
  llvm/test/Transforms/InstCombine/strcmp-memcmp.ll
  llvm/test/Transforms/JumpThreading/guards.ll
  llvm/test/Transforms/LICM/hoist-deref-load.ll
  llvm/test/Transforms/MemCpyOpt/callslot_deref.ll
  llvm/test/Transforms/MemCpyOpt/loadstore-sret.ll
  llvm/test/Transforms/MemCpyOpt/memcpy.ll
  llvm/test/Transforms/MemCpyOpt/sret.ll
  llvm/test/Transforms/MergeICmps/X86/alias-merge-blocks.ll
  llvm/test/Transforms/MergeICmps/X86/entry-block-shuffled.ll
  llvm/test/Transforms/MergeICmps/X86/gep-references-bb.ll
  llvm/test/Transforms/MergeICmps/X86/int64-and-ptr.ll
  llvm/test/Transforms/MergeICmps/X86/multiple-blocks-does-work.ll
  llvm/test/Transforms/MergeICmps/X86/pair-int32-int32.ll
  llvm/test/Transforms/MergeICmps/X86/pr41917.ll
  llvm/test/Transforms/MergeICmps/X86/split-block-does-work.ll
  llvm/test/Transforms/SimplifyCFG/X86/SpeculativeExec.ll
  llvm/test/Transforms/TailCallElim/reorder_load.ll
  llvm/test/Transforms/VectorCombine/X86/load-inseltpoison.ll
  llvm/test/Transforms/VectorCombine/X86/load.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D99100.332382.patch
Type: text/x-patch
Size: 129312 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210322/dee7e221/attachment-0001.bin>


More information about the llvm-commits mailing list