[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
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...
Size: 7619 bytes
Desc: not available
More information about the llvm-commits