[PATCH] D58253: [CodeExtractor] Do not lift lifetime.end markers for region inputs

Vedant Kumar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 14 14:07:35 PST 2019

vsk created this revision.
vsk added reviewers: kachkov98, davidxl, tejohnson.
Herald added subscribers: jdoerfert, dmgreen, hiraditya, eraman.
Herald added a project: LLVM.

If a lifetime.end marker occurs along one path through the extraction
region, but not another, then it's still incorrect to lift the marker,
because there is some path through the extracted function which would
ordinarily not reach the marker. If the call to the extracted function
is in a loop, unrolling can cause inputs to the function to become
optimized out as undef after the first iteration.

To prevent incorrect stack slot merging in the calling function, it
should be sufficient to lift lifetime.start markers for region inputs.
I've tested this theory out by doing a stage2 check-all with randomized
splitting enabled.

This is a follow-up to r353973, and there's additional context for this
change in https://reviews.llvm.org/D57834.




-------------- next part --------------
A non-text attachment was scrubbed...
Name: D58253.186916.patch
Type: text/x-patch
Size: 7619 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190214/b79f31d2/attachment.bin>

More information about the llvm-commits mailing list