[PATCH] D83976: [Mem2Reg] Teach promote to register about droppable instructions
Johannes Doerfert via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 16 12:00:16 PDT 2020
jdoerfert created this revision.
jdoerfert added reviewers: Tyker, fhahn, lebedev.ri, nicholas.
Herald added subscribers: bollu, hiraditya.
Herald added a project: LLVM.
This is the first of two patches to address PR46753. We basically allow
mem2reg to promote allocas that are used in doppable instructions, for
now that means `llvm.assume`. The uses of the alloca (or a bitcast or
zero offset GEP from there) are replaced by `undef` in the droppable
instructions.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D83976
Files:
llvm/include/llvm/Analysis/ValueTracking.h
llvm/lib/Analysis/ValueTracking.cpp
llvm/lib/Transforms/Utils/PromoteMemoryToRegister.cpp
llvm/test/Transforms/Mem2Reg/ignore-droppable.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D83976.278566.patch
Type: text/x-patch
Size: 9818 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200716/dca2c72b/attachment.bin>
More information about the llvm-commits
mailing list