]> granicus.if.org Git - llvm/commit
[CodeExtractor] Update function's assumption cache after extracting blocks from it
authorSergey Dmitriev <serguei.n.dmitriev@intel.com>
Fri, 8 Feb 2019 06:55:18 +0000 (06:55 +0000)
committerSergey Dmitriev <serguei.n.dmitriev@intel.com>
Fri, 8 Feb 2019 06:55:18 +0000 (06:55 +0000)
commit9a22bfd50bf3694bbc4624f3f784108f23dce08f
tree8e840c8b9cb9aad03ecae8bc630fcdd4888918a1
parentbbd1e17a3399e1ecd48e699a84c5b3f9d0e8b11a
[CodeExtractor] Update function's assumption cache after extracting blocks from it

Summary: Assumption cache's self-updating mechanism does not correctly handle the case when blocks are extracted from the function by the CodeExtractor. As a result function's assumption cache may have stale references to the llvm.assume calls that were moved to the outlined function. This patch fixes this problem by removing extracted llvm.assume calls from the function’s assumption cache.

Reviewers: hfinkel, vsk, fhahn, davidxl, sanjoy

Reviewed By: hfinkel, vsk

Subscribers: llvm-commits

Tags: #llvm

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353500 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Analysis/AssumptionCache.h
include/llvm/Transforms/Utils/CodeExtractor.h
lib/Analysis/AssumptionCache.cpp
lib/Transforms/IPO/HotColdSplitting.cpp
lib/Transforms/IPO/LoopExtractor.cpp
lib/Transforms/IPO/PartialInlining.cpp
lib/Transforms/Utils/CodeExtractor.cpp
test/Transforms/CodeExtractor/extract-assume.ll [new file with mode: 0644]