[PATCH] D92657: [WIP] Fix interaction between clang and some inline builtins from glibc under _FORTIFY_SOURCE
serge via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Dec 4 07:18:31 PST 2020
serge-sans-paille created this revision.
serge-sans-paille added a reviewer: george.burgess.iv.
Herald added subscribers: haicheng, hiraditya, eraman.
serge-sans-paille requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
Clang considers trivially recursive a function that may call itself, not a function that always call itself. This leads to some inline definition of fortified libc builtins no being emitted, and thus ignored.
Work around the situation by being slightly smarter on the recursion computation, even though this is still very naive.
https://reviews.llvm.org/D92657
Files:
clang/lib/CodeGen/CodeGenModule.cpp
clang/test/CodeGen/memmove-always-inline-definition-used.c
llvm/include/llvm/Analysis/InlineCost.h
llvm/lib/Analysis/InlineCost.cpp
llvm/lib/Transforms/IPO/AlwaysInliner.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D92657.309533.patch
Type: text/x-patch
Size: 4444 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20201204/d9a4d0ec/attachment.bin>
More information about the llvm-commits
mailing list