diff options
author | Nicolai Hähnle <nicolai.haehnle@amd.com> | 2022-07-18 17:43:35 +0200 |
---|---|---|
committer | Nicolai Hähnle <nicolai.haehnle@amd.com> | 2022-07-18 17:43:35 +0200 |
commit | 344378808778c61d5599f4e0ac783ef7e6f8ed05 (patch) | |
tree | 0cfdb236314b4013d5e73e3a88bb60e20f71bbcb /llvm/lib/Transforms/Utils/InlineFunction.cpp | |
parent | 9905c379819fafdc2246bcd24dd7165bd72d7659 (diff) | |
download | llvm-344378808778c61d5599f4e0ac783ef7e6f8ed05.zip llvm-344378808778c61d5599f4e0ac783ef7e6f8ed05.tar.gz llvm-344378808778c61d5599f4e0ac783ef7e6f8ed05.tar.bz2 |
Revert "Inliner: don't mark call sites as 'nounwind' if that would be redundant"
This reverts commit 9905c379819fafdc2246bcd24dd7165bd72d7659.
Looks like there are Clang changes that are affected in trivial ways. Will look into it.
Diffstat (limited to 'llvm/lib/Transforms/Utils/InlineFunction.cpp')
-rw-r--r-- | llvm/lib/Transforms/Utils/InlineFunction.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/llvm/lib/Transforms/Utils/InlineFunction.cpp b/llvm/lib/Transforms/Utils/InlineFunction.cpp index 7e835bd..2fb00f9 100644 --- a/llvm/lib/Transforms/Utils/InlineFunction.cpp +++ b/llvm/lib/Transforms/Utils/InlineFunction.cpp @@ -2194,11 +2194,9 @@ llvm::InlineResult llvm::InlineFunction(CallBase &CB, InlineFunctionInfo &IFI, CI->setTailCallKind(ChildTCK); InlinedMustTailCalls |= CI->isMustTailCall(); - // Call sites inlined through a 'nounwind' call site should be - // 'nounwind' as well. However, avoid marking call sites explicitly - // where possible. This helps expose more opportunities for CSE after - // inlining, commonly when the callee is an intrinsic. - if (MarkNoUnwind && !CI->doesNotThrow()) + // Calls inlined through a 'nounwind' call site should be marked + // 'nounwind'. + if (MarkNoUnwind) CI->setDoesNotThrow(); } } |