diff options
| author | Philip Reames <listmail@philipreames.com> | 2015-04-26 19:41:23 +0000 |
|---|---|---|
| committer | Philip Reames <listmail@philipreames.com> | 2015-04-26 19:41:23 +0000 |
| commit | 2e78fa49a82c496a0701b996bacf2868204bef64 (patch) | |
| tree | bbb939b34385b778987f2016486f7609de38d983 /llvm/lib/Transforms/Scalar | |
| parent | ce216063acb78375a07323468730a7de33b4b5f9 (diff) | |
| download | bcm5719-llvm-2e78fa49a82c496a0701b996bacf2868204bef64.tar.gz bcm5719-llvm-2e78fa49a82c496a0701b996bacf2868204bef64.zip | |
Don't Place Entry Safepoints Before the llvm.frameescape() Intrinsic
llvm.frameescape() intrinsic is not a real call. The intrinsic can only exist in the entry block. Inserting a gc.statepoint() before llvm.frameescape() may split the entry block, and push the intrinsic out of the entry block.
Patch by: Swaroop.Sridhar@microsoft.com
Differential Revision: http://reviews.llvm.org/D8910
llvm-svn: 235820
Diffstat (limited to 'llvm/lib/Transforms/Scalar')
| -rw-r--r-- | llvm/lib/Transforms/Scalar/PlaceSafepoints.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/llvm/lib/Transforms/Scalar/PlaceSafepoints.cpp b/llvm/lib/Transforms/Scalar/PlaceSafepoints.cpp index 536f2a673bb..ffed810d823 100644 --- a/llvm/lib/Transforms/Scalar/PlaceSafepoints.cpp +++ b/llvm/lib/Transforms/Scalar/PlaceSafepoints.cpp @@ -430,6 +430,13 @@ static Instruction *findLocationForEntrySafepoint(Function &F, if (II->getIntrinsicID() == Intrinsic::assume) { continue; } + // llvm.frameescape() intrinsic is not a real call. The intrinsic can + // exist only in the entry block. + // Inserting a statepoint before llvm.frameescape() may split the + // entry block, and push the intrinsic out of the entry block. + if (II->getIntrinsicID() == Intrinsic::frameescape) { + continue; + } } break; } |

