diff options
author | Duncan Sands <baldrick@free.fr> | 2007-12-16 15:51:49 +0000 |
---|---|---|
committer | Duncan Sands <baldrick@free.fr> | 2007-12-16 15:51:49 +0000 |
commit | ece2c04d532d46405c085769d03173b392813eb3 (patch) | |
tree | f1736e3eb6bdff960456746e561a89c2b021122b /lib/Transforms/Utils/InlineFunction.cpp | |
parent | 2c6fd8c7ceea0392635ce21038d2b7fc215d9116 (diff) |
Make instcombine promote inline asm calls to 'nounwind'
calls. Remove special casing of inline asm from the
inliner. There is a potential problem: the verifier
rejects invokes of inline asm (not sure why). If an
asm call is not marked "nounwind" in some .ll, and
instcombine is not run, but the inliner is run, then
an illegal module will be created. This is bad but
I'm not sure what the best approach is. I'm tempted
to remove the check in the verifier...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45073 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Utils/InlineFunction.cpp')
-rw-r--r-- | lib/Transforms/Utils/InlineFunction.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/Transforms/Utils/InlineFunction.cpp b/lib/Transforms/Utils/InlineFunction.cpp index e9f6b28e98..3d31f71300 100644 --- a/lib/Transforms/Utils/InlineFunction.cpp +++ b/lib/Transforms/Utils/InlineFunction.cpp @@ -69,9 +69,8 @@ static void HandleInlinedInvoke(InvokeInst *II, BasicBlock *FirstNewBlock, if (!isa<CallInst>(I)) continue; CallInst *CI = cast<CallInst>(I); - // If this call cannot unwind or is an inline asm, don't - // convert it to an invoke. - if (CI->isNoUnwind() || isa<InlineAsm>(CI->getCalledValue())) + // If this call cannot unwind, don't convert it to an invoke. + if (CI->isNoUnwind()) continue; // Convert this function call into an invoke instruction. |