mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-25 13:24:46 +00:00
Do not convert "call asm" to "invoke asm" in Inliner.
Given that backend does not handle "invoke asm" correctly ("invoke asm" will be handled by SelectionDAGBuilder::visitInlineAsm, which does not have the right setup for LPadToCallSiteMap) and we already made the assumption that inline asm does not throw in InstCombiner::visitCallSite, we are going to make the same assumption in Inliner to make sure we don't convert "call asm" to "invoke asm". If it becomes necessary to add support for "invoke asm" later on, we will need to modify the backend as well as remove the assumptions that inline asm does not throw. Fix rdar://15317907 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193808 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -193,7 +193,8 @@ static bool HandleCallsInBlockInlinedThroughInvoke(BasicBlock *BB,
|
||||
CallInst *CI = dyn_cast<CallInst>(I);
|
||||
|
||||
// If this call cannot unwind, don't convert it to an invoke.
|
||||
if (!CI || CI->doesNotThrow())
|
||||
// Inline asm calls cannot throw.
|
||||
if (!CI || CI->doesNotThrow() || isa<InlineAsm>(CI->getCalledValue()))
|
||||
continue;
|
||||
|
||||
// Convert this function call into an invoke instruction. First, split the
|
||||
|
Reference in New Issue
Block a user