[PATCH] D92887: [LoopUnroll] Introduce llvm.noalias.decl and use if for duplicating noalias metadata as needed

Jeroen Dobbelaere via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 8 14:46:28 PST 2020


jeroen.dobbelaere created this revision.
Herald added subscribers: dexonsmith, lxfind, asbirlea, george.burgess.iv, zzheng, modocache, hiraditya.
jeroen.dobbelaere requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

This is a fix for https://bugs.llvm.org/show_bug.cgi?id=39282. Compared to D90104 <https://reviews.llvm.org/D90104>, this version is based on part of the full restrict patched (D68484 <https://reviews.llvm.org/D68484>) and used the `@llvm.noalias.decl` intrinsic to track the location where !noalias and !alias.scope scopes have been introduced. This allows us to only duplicate the scopes that are really needed.

Notes:

- it also includes changes and tests from D90104 <https://reviews.llvm.org/D90104>
- no `@llvm.noalias.decl` entry yet for the langref
- Two test failures, because of slightly different behavior with the new pass manager:
  - `Transforms/Coroutines/coro-retcon-resume-values.ll`
  - `Transforms/Coroutines/coro-retcon-value.ll` No clue yet why the new pass manager can not see through the `@llvm.noalias.decl` intrinsics.


https://reviews.llvm.org/D92887

Files:
  clang/test/OpenMP/target_codegen.cpp
  llvm/include/llvm/Analysis/TargetTransformInfoImpl.h
  llvm/include/llvm/IR/IRBuilder.h
  llvm/include/llvm/IR/Intrinsics.h
  llvm/include/llvm/IR/Intrinsics.td
  llvm/include/llvm/IR/Metadata.h
  llvm/include/llvm/Transforms/Utils/Cloning.h
  llvm/lib/Analysis/MemorySSA.cpp
  llvm/lib/Analysis/ValueTracking.cpp
  llvm/lib/CodeGen/IntrinsicLowering.cpp
  llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
  llvm/lib/IR/IRBuilder.cpp
  llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp
  llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
  llvm/lib/Transforms/Scalar/EarlyCSE.cpp
  llvm/lib/Transforms/Utils/CloneFunction.cpp
  llvm/lib/Transforms/Utils/InlineFunction.cpp
  llvm/lib/Transforms/Utils/LoopUnroll.cpp
  llvm/test/Transforms/Coroutines/ArgAddr.ll
  llvm/test/Transforms/Coroutines/coro-retcon-resume-values.ll
  llvm/test/Transforms/Coroutines/coro-retcon.ll
  llvm/test/Transforms/Coroutines/ex2.ll
  llvm/test/Transforms/Coroutines/ex3.ll
  llvm/test/Transforms/Coroutines/ex4.ll
  llvm/test/Transforms/Inline/launder.invariant.group.ll
  llvm/test/Transforms/Inline/noalias-calls-always.ll
  llvm/test/Transforms/Inline/noalias-calls.ll
  llvm/test/Transforms/Inline/noalias.ll
  llvm/test/Transforms/Inline/noalias2.ll
  llvm/test/Transforms/LoopUnroll/noalias.ll
  llvm/test/Transforms/PhaseOrdering/inlining-alignment-assumptions.ll
  llvm/test/Transforms/PhaseOrdering/instcombine-sroa-inttoptr.ll
  llvm/test/Transforms/PhaseOrdering/pr39282.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D92887.310350.patch
Type: text/x-patch
Size: 67585 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20201208/d1d7e997/attachment.bin>


More information about the llvm-commits mailing list