]> granicus.if.org Git - llvm/commit
[CodeExtractor] Only lift lifetime markers present in the extraction region
authorVedant Kumar <vsk@apple.com>
Wed, 13 Feb 2019 19:53:38 +0000 (19:53 +0000)
committerVedant Kumar <vsk@apple.com>
Wed, 13 Feb 2019 19:53:38 +0000 (19:53 +0000)
commit18afa443d99c507dd60294f975510b2138a15813
treed0a2978db358f7e0b29dc8a00e75aa38fbc411a7
parent4477a571f31d4a03e630c49b94ab94b807ec3288
[CodeExtractor] Only lift lifetime markers present in the extraction region

When CodeExtractor finds liftime markers referencing inputs to the
extraction region, it lifts these markers out of the region and inserts
them around the call to the extracted function (see r350420, PR39671).

However, it should *only* lift lifetime markers that are actually
present in the extraction region. I.e., if a start marker is present in
the extraction region but a corresponding end marker isn't (or vice
versa), only the start marker (or end marker, resp.) should be lifted.

Differential Revision: https://reviews.llvm.org/D57834

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353973 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Utils/CodeExtractor.cpp
test/Transforms/HotColdSplit/lifetime-markers-on-inputs-1.ll [moved from test/Transforms/HotColdSplit/lifetime-markers-on-inputs.ll with 100% similarity]
test/Transforms/HotColdSplit/lifetime-markers-on-inputs-2.ll [new file with mode: 0644]