summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGen/pr9614.c
Commit message (Collapse)AuthorAgeFilesLines
* Allow prefetching from non-zero address spacesJF Bastien2019-07-251-2/+2
| | | | | | | | | | | | | | | Summary: This is useful for targets which have prefetch instructions for non-default address spaces. <rdar://problem/42662136> Subscribers: nemanjai, javed.absar, hiraditya, kbarton, jkorous, dexonsmith, cfe-commits, llvm-commits, RKSimon, hfinkel, t.p.northover, craig.topper, anemet Tags: #clang, #llvm Differential Revision: https://reviews.llvm.org/D65254 llvm-svn: 367032
* Revert "Always_inline codegen rewrite" and 2 follow-ups.Evgeniy Stepanov2015-09-141-6/+4
| | | | | | | | | | Revert "Update cxx-irgen.cpp test to allow signext in alwaysinline functions." Revert "[CodeGen] Remove wrapper-free always_inline functions from COMDATs" Revert "Always_inline codegen rewrite." Reason for revert: PR24793. llvm-svn: 247620
* Always_inline codegen rewrite.Evgeniy Stepanov2015-09-121-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Current implementation may end up emitting an undefined reference for an "inline __attribute__((always_inline))" function by generating an "available_externally alwaysinline" IR function for it and then failing to inline all the calls. This happens when a call to such function is in dead code. As the inliner is an SCC pass, it does not process dead code. Libc++ relies on the compiler never emitting such undefined reference. With this patch, we emit a pair of 1. internal alwaysinline definition (called F.alwaysinline) 2a. A stub F() { musttail call F.alwaysinline } -- or, depending on the linkage -- 2b. A declaration of F. The frontend ensures that F.inlinefunction is only used for direct calls, and the stub is used for everything else (taking the address of the function, really). Declaration (2b) is emitted in the case when "inline" is meant for inlining only (like __gnu_inline__ and some other cases). This approach, among other nice properties, ensures that alwaysinline functions are always internal, making it impossible for a direct call to such function to produce an undefined symbol reference. This patch is based on ideas by Chandler Carruth and Richard Smith. llvm-svn: 247494
* Revert "Specify target triple in alwaysinline tests."Evgeniy Stepanov2015-09-111-6/+4
| | | | | | | | | Revert "Always_inline codegen rewrite." Breaks gdb & lldb tests. Breaks on Fedora 22 x86_64. llvm-svn: 247491
* Always_inline codegen rewrite.Evgeniy Stepanov2015-09-111-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Current implementation may end up emitting an undefined reference for an "inline __attribute__((always_inline))" function by generating an "available_externally alwaysinline" IR function for it and then failing to inline all the calls. This happens when a call to such function is in dead code. As the inliner is an SCC pass, it does not process dead code. Libc++ relies on the compiler never emitting such undefined reference. With this patch, we emit a pair of 1. internal alwaysinline definition (called F.alwaysinline) 2a. A stub F() { musttail call F.alwaysinline } -- or, depending on the linkage -- 2b. A declaration of F. The frontend ensures that F.inlinefunction is only used for direct calls, and the stub is used for everything else (taking the address of the function, really). Declaration (2b) is emitted in the case when "inline" is meant for inlining only (like __gnu_inline__ and some other cases). This approach, among other nice properties, ensures that alwaysinline functions are always internal, making it impossible for a direct call to such function to produce an undefined symbol reference. This patch is based on ideas by Chandler Carruth and Richard Smith. llvm-svn: 247465
* [CodeGen] Tweak isTriviallyRecursive furtherDavid Majnemer2015-06-301-0/+7
| | | | | | | | | | | | | | | | isTriviallyRecursive is a hack used to bridge a gap between the expectations that source code assumes and the semantics that LLVM IR can provide. Specifically, asm labels on functions are treated as an explicit name for a GlobalObject in Clang but treated like an output-processing step in GCC. Tweak this hack a little further to emit calls to library functions instead of emitting an incorrect definition. The definition in question would have available_externally linkage (this is OK) but result in a call to itself which will either result in an infinite loop or stack overflow. This fixes PR23964. llvm-svn: 241043
* [CodeGen] Restrict isTriviallyRecursive to predefined lib functions ↵David Majnemer2015-06-251-8/+17
| | | | | | | | | | | forwarding to lib functions isTriviallyRecursive is only supposed to guard functions part of the implementation. This fixes PR23953. llvm-svn: 240735
* CHECK-LABEL-ify some code gen tests to improve diagnostic experience when ↵Stephen Lin2013-08-151-1/+1
| | | | | | tests fail. llvm-svn: 188447
* Add a triple to the test.Rafael Espindola2011-12-191-1/+1
| | | | llvm-svn: 146871
* Extend the fix for PR9614 to handle inline asm in the outer decl andRafael Espindola2011-12-191-1/+8
| | | | | | | the inner decl being a builtin. This is needed to support the glibc headers in fedora 16 (2.14). llvm-svn: 146867
* Fix this on the bots and make the test more complete by enabling optimizations.Rafael Espindola2011-10-281-3/+2
| | | | llvm-svn: 143223
* Fix PR9614 for functions with the always_inline attribute. Try to keepRafael Espindola2011-10-281-9/+17
| | | | | | the common case (-O0, no always_inline) fast. llvm-svn: 143222
* Fix this tests on the bots.Rafael Espindola2011-10-261-2/+2
| | | | llvm-svn: 143052
* Fix pr9614 by not emitting an available_externally function when it callsRafael Espindola2011-10-261-0/+15
itself via an asm label. available_externally functions are supposed to correspond to an external function, and that is not the case in the examples in pr9614. llvm-svn: 143049
OpenPOWER on IntegriCloud