aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
diff options
context:
space:
mode:
authorNick Desaulniers <ndesaulniers@google.com>2021-06-28 13:53:55 -0700
committerNick Desaulniers <ndesaulniers@google.com>2021-06-28 13:53:57 -0700
commit8aee282f57f42773570fc5d29f03a03361ff7fb4 (patch)
tree5c960242b5c562e04e08022d0bafbf390b66c6f7 /llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
parenta00ad8599045ce7d0b5d2a64a8d22267df37bd14 (diff)
downloadllvm-8aee282f57f42773570fc5d29f03a03361ff7fb4.zip
llvm-8aee282f57f42773570fc5d29f03a03361ff7fb4.tar.gz
llvm-8aee282f57f42773570fc5d29f03a03361ff7fb4.tar.bz2
[IR] remove assert since always_inline can appear on CallBase
I added an assertion in D91816 (documenting behavior added in D93422) that callers and callees with mismatched fn attr's related to stack protectors should not occur unless the callee was attributed always_inline. This falls apart when a call, invoke, or callbr (any instruction inheriting from CallBase) itself has an always_inline attribute. Clang will emit such attributes on Instructions when __attribute__((flatten)) is used to recursively force inlining from a caller. Since these assertions only had the caller and callee Functions, and not the call site (CallBase derived classes), we would have to search the caller for such instructions to reconstruct the call site information. But at that point, inlining has already occurred; the call site has already been removed from the caller. Remove the assertions, add a unit test for always_inline call sites, and update the LangRef. Another curiosity is that the always_inline Attribute on Instructions is only expanded by the inline pass, not the always_inline pass. Thanks to @pcc on this report when building Android's RunTime (ART) interpreter. Reviewed By: pcc, MaskRay Differential Revision: https://reviews.llvm.org/D104944
Diffstat (limited to 'llvm/lib/Bitcode/Writer/BitcodeWriter.cpp')
0 files changed, 0 insertions, 0 deletions