1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 03:33:20 +01:00
Go to file
Gordon Henriksen db4f51e1b9 With this patch, the LowerGC transformation becomes the
ShadowStackCollector, which additionally has reduced overhead with
no sacrifice in portability.

Considering a function @fun with 8 loop-local roots,
ShadowStackCollector introduces the following overhead
(x86):

; shadowstack prologue
        movl    L_llvm_gc_root_chain$non_lazy_ptr, %eax
        movl    (%eax), %ecx
        movl    $___gc_fun, 20(%esp)
        movl    $0, 24(%esp)
        movl    $0, 28(%esp)
        movl    $0, 32(%esp)
        movl    $0, 36(%esp)
        movl    $0, 40(%esp)
        movl    $0, 44(%esp)
        movl    $0, 48(%esp)
        movl    $0, 52(%esp)
        movl    %ecx, 16(%esp)
        leal    16(%esp), %ecx
        movl    %ecx, (%eax)

; shadowstack loop overhead
        (none)

; shadowstack epilogue
        movl    48(%esp), %edx
        movl    %edx, (%ecx)

; shadowstack metadata
        .align  3
___gc_fun:                              # __gc_fun
        .long   8
        .space  4

In comparison to LowerGC:

; lowergc prologue
        movl    L_llvm_gc_root_chain$non_lazy_ptr, %eax
        movl    (%eax), %ecx
        movl    %ecx, 48(%esp)
        movl    $8, 52(%esp)
        movl    $0, 60(%esp)
        movl    $0, 56(%esp)
        movl    $0, 68(%esp)
        movl    $0, 64(%esp)
        movl    $0, 76(%esp)
        movl    $0, 72(%esp)
        movl    $0, 84(%esp)
        movl    $0, 80(%esp)
        movl    $0, 92(%esp)
        movl    $0, 88(%esp)
        movl    $0, 100(%esp)
        movl    $0, 96(%esp)
        movl    $0, 108(%esp)
        movl    $0, 104(%esp)
        movl    $0, 116(%esp)
        movl    $0, 112(%esp)

; lowergc loop overhead
        leal    44(%esp), %eax
        movl    %eax, 56(%esp)
        leal    40(%esp), %eax
        movl    %eax, 64(%esp)
        leal    36(%esp), %eax
        movl    %eax, 72(%esp)
        leal    32(%esp), %eax
        movl    %eax, 80(%esp)
        leal    28(%esp), %eax
        movl    %eax, 88(%esp)
        leal    24(%esp), %eax
        movl    %eax, 96(%esp)
        leal    20(%esp), %eax
        movl    %eax, 104(%esp)
        leal    16(%esp), %eax
        movl    %eax, 112(%esp)

; lowergc epilogue
        movl    48(%esp), %edx
        movl    %edx, (%ecx)

; lowergc metadata
        (none)

llvm-svn: 45670
2008-01-07 01:30:53 +00:00
autoconf remove attribution from a variety of miscellaneous files. 2007-12-29 22:59:10 +00:00
bindings Modify Makefile.rules to allow makefiles to prepend to C.Flags and 2008-01-06 21:54:35 +00:00
docs improve description of alignment, patch by Alain Frisch. 2008-01-06 21:04:43 +00:00
examples remove attributions from examples. 2007-12-29 20:37:57 +00:00
include With this patch, the LowerGC transformation becomes the 2008-01-07 01:30:53 +00:00
lib With this patch, the LowerGC transformation becomes the 2008-01-07 01:30:53 +00:00
projects remove attributions from the rest of the llvm makefiles. 2007-12-29 20:11:13 +00:00
runtime With this patch, the LowerGC transformation becomes the 2008-01-07 01:30:53 +00:00
test With this patch, the LowerGC transformation becomes the 2008-01-07 01:30:53 +00:00
tools remove attribution from a variety of miscellaneous files. 2007-12-29 22:59:10 +00:00
utils rename isLoad -> isSimpleLoad due to evan's desire to have such a predicate. 2008-01-06 23:38:27 +00:00
website Prepare for "core" website. 2007-08-03 05:43:35 +00:00
win32 Adding new files to win32 build 2008-01-03 19:53:03 +00:00
Xcode Removing obsolete files from the Xcode project. 2007-12-31 01:45:55 +00:00
build-for-llvm-top.sh Allow the configure options to be set according to the llvm-top options. 2007-08-31 19:53:42 +00:00
configure Do not build CBackend and MSIL regardless of configured targets 2007-12-13 01:18:52 +00:00
CREDITS.TXT Update credits. 2007-12-11 09:32:07 +00:00
LICENSE.TXT Updated source file headers to llvm coding standard. 2007-12-05 01:40:25 +00:00
llvm.spec.in * llvm.spec.in: update blurb 2007-07-13 09:48:29 +00:00
Makefile remove attributions from the rest of the llvm makefiles. 2007-12-29 20:11:13 +00:00
Makefile.common remove attributions from the rest of the llvm makefiles. 2007-12-29 20:11:13 +00:00
Makefile.config.in remove attributions from the rest of the llvm makefiles. 2007-12-29 20:11:13 +00:00
Makefile.rules Modify Makefile.rules to allow makefiles to prepend to C.Flags and 2008-01-06 21:54:35 +00:00
ModuleInfo.txt Update to include clean and install commands. 2007-07-20 20:54:41 +00:00
README.txt test 2007-04-20 20:49:25 +00:00

Low Level Virtual Machine (LLVM)
================================

This directory and its subdirectories contain source code for the Low Level 
Virtual Machine, a toolkit for the construction of highly optimized compilers,
optimizers, and runtime environments. 

LLVM is open source software. You may freely distribute it under the terms of
the license agreement found in LICENSE.txt.

Please see the HTML documentation provided in docs/index.html for further
assistance with LLVM.