[PATCH] D104618: [LoopDeletion] Exploit undef when symbolically executing 1st iteration

Max Kazantsev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Jun 20 23:43:53 PDT 2021


mkazantsev created this revision.
mkazantsev added reviewers: lebedev.ri, nikic, fhahn, reames.
Herald added a subscriber: hiraditya.
mkazantsev requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

Follow-up on Roman's idea expressed in D103959 <https://reviews.llvm.org/D103959>. We can benefit from
undefs when symbolically executing 1st iteration in two ways:

- If a Phi has both defined and undefined live inputs, we can skip undefs, assuming they are all equal to the defined input;
- Branching by undef condition is undefined behavior, and we can not mark any of its successors live.


https://reviews.llvm.org/D104618

Files:
  llvm/lib/Transforms/Scalar/LoopDeletion.cpp
  llvm/test/Transforms/LoopDeletion/eval_first_iteration.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D104618.353277.patch
Type: text/x-patch
Size: 7951 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210621/f84b700e/attachment.bin>


More information about the llvm-commits mailing list