[PATCH] D95260: [Local] Don't DCE calls that may not return
Nikita Popov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 22 12:31:29 PST 2021
nikic created this revision.
nikic added reviewers: jdoerfert, fhahn.
Herald added subscribers: lxfind, okura, kuter.
nikic requested review of this revision.
Herald added a reviewer: sstefan1.
Herald added subscribers: llvm-commits, bbn, sstefan1.
Herald added a reviewer: baziotis.
Herald added a project: LLVM.
Calls that aren't willreturn should not be eliminated, as this may remove an infinite loop.
This patch is a slightly more conservative variation on D94106 <https://reviews.llvm.org/D94106> which assumes that intrinsics are willreturn, as most target intrinsics have not been properly annotated yet, and we don't want to break DCE for them.
In conjunction with the recently implemented willreturn inference, I hope this is conservative enough to land before LLVM 12 branches.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D95260
Files:
lib/Transforms/Utils/Local.cpp
test/Transforms/Attributor/ArgumentPromotion/fp80.ll
test/Transforms/Attributor/align.ll
test/Transforms/Attributor/nocapture-1.ll
test/Transforms/Attributor/nocapture-2.ll
test/Transforms/Attributor/nonnull.ll
test/Transforms/Attributor/norecurse.ll
test/Transforms/Attributor/range.ll
test/Transforms/Attributor/readattrs.ll
test/Transforms/BDCE/basic.ll
test/Transforms/CodeGenPrepare/X86/delete-assume-dead-code.ll
test/Transforms/Coroutines/coro-split-00.ll
test/Transforms/Coroutines/coro-split-hidden.ll
test/Transforms/Coroutines/no-suspend.ll
test/Transforms/InstCombine/nothrow.ll
test/Transforms/InstSimplify/ConstProp/calls-math-finite.ll
test/Transforms/InstSimplify/ConstProp/calls.ll
test/Transforms/InstSimplify/ConstProp/math-1.ll
test/Transforms/InstSimplify/ConstProp/math-2.ll
test/Transforms/InstSimplify/ConstProp/rint.ll
test/Transforms/InstSimplify/ConstProp/round.ll
test/Transforms/InstSimplify/ConstProp/trunc.ll
test/Transforms/InstSimplify/remove-dead-call.ll
test/Transforms/InstSimplify/returned.ll
test/Transforms/NewGVN/eliminate-callsite-inline.ll
test/Transforms/OpenMP/parallel_deletion.ll
test/Transforms/Reassociate/erase_inst_made_change.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D95260.318610.patch
Type: text/x-patch
Size: 78404 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210122/f625c17b/attachment.bin>
More information about the llvm-commits
mailing list