[PATCH] D88529: [DAE] MarkLive in MarkValue(MaybeLive) if any use is live

Arthur Eubanks via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 29 22:46:12 PDT 2020


aeubanks created this revision.
Herald added subscribers: llvm-commits, hiraditya.
Herald added a project: LLVM.
aeubanks requested review of this revision.

While looping through all args or all return values, we may mark a use
of a later iteration as live. Previously when we got to that later value
it would ignore that and continue adding to Uses instead of marking it
live. For example, when looping through arg#0 and arg#1,
MarkValue(arg#0, Live) may cause some use of arg#1 to be live, but
MarkValue(arg#1, MaybeLive) will not notice that and continue adding
into Uses.

Now MarkValue(RA, MaybeLive) will MarkLive(RA) if any use is live.

Fixes PR47444.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D88529

Files:
  llvm/include/llvm/Transforms/IPO/DeadArgumentElimination.h
  llvm/lib/Transforms/IPO/DeadArgumentElimination.cpp
  llvm/test/Transforms/DeadArgElim/preserve-used-ret.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D88529.295176.patch
Type: text/x-patch
Size: 4023 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200930/63bfa761/attachment.bin>


More information about the llvm-commits mailing list