[PATCH] D144933: [instcombine] Simplify separate_storage hints.

David Goldblatt via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 27 17:20:06 PST 2023


davidtgoldblatt created this revision.
Herald added subscribers: jeroen.dobbelaere, hiraditya.
Herald added a project: All.
davidtgoldblatt requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

Before this change, we call getUnderlyingObject on each separate_storage
operand on every alias() call (potentially requiring lots of pointer
chasing). Instead, we rewrite the assumptions in instcombine to do this
pointer-chasing once.

We still leave the getUnderlyingObject calls in alias(), just expecting
them to be no-ops much of the time. This is relatively fast (just a
couple dyn_casts with no pointer chasing) and avoids making alias
analysis results depend on whether or not instcombine has been run.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D144933

Files:
  llvm/lib/Analysis/BasicAliasAnalysis.cpp
  llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp
  llvm/test/Transforms/InstCombine/assume-separate_storage.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D144933.500979.patch
Type: text/x-patch
Size: 5362 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230228/0f340a8e/attachment.bin>


More information about the llvm-commits mailing list