[Inliner] Don't inline functions with frameescape calls
authorReid Kleckner <reid@kleckner.net>
Tue, 14 Apr 2015 20:38:14 +0000 (20:38 +0000)
committerReid Kleckner <reid@kleckner.net>
Tue, 14 Apr 2015 20:38:14 +0000 (20:38 +0000)
commitecc4595ce4cb7fb6fdf6182693b6beef2f1cb5c6
tree8caf562c6bf7033e7ddf336877f9194e965c7e54
parent2e6716eb5517f39d7951c23a8b0d9b6fc7c7045d
[Inliner] Don't inline functions with frameescape calls

Inlining such intrinsics is very difficult, since you need to
simultaneously transform many calls to llvm.framerecover and potentially
duplicate the functions containing them.  Normally this intrinsic isn't
added until EH preparation, which is part of the backend pass pipeline
after inlining.  However, if it were to get fed through the inliner,
this change will ensure that it doesn't break the code.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234937 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Analysis/IPA/InlineCost.cpp
test/Transforms/Inline/frameescape.ll [new file with mode: 0644]