1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-25 04:02:41 +01:00
Commit Graph

283 Commits

Author SHA1 Message Date
Gordon Henriksen
639468e763 Fixing the stack walker.
llvm-svn: 46302
2008-01-24 05:16:36 +00:00
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
Chris Lattner
7a9b0bf0eb remove attribution from a variety of miscellaneous files.
llvm-svn: 45425
2007-12-29 22:59:10 +00:00
Chris Lattner
6aece93d5c remove attributions from the rest of the llvm makefiles.
llvm-svn: 45416
2007-12-29 20:11:13 +00:00
Gordon Henriksen
351222b471 GarbageCollection.html is expanded to encompass the coming
capabilities. This is a major rewrite and is easier to read en toto
rather than patchwise.

llvm-svn: 42414
2007-09-27 19:31:36 +00:00
Chris Lattner
59f75f14db Reenable libgc and libprofile is explicitly requested.
llvm-svn: 41851
2007-09-11 17:12:32 +00:00
Chris Lattner
1c76085679 remove an obsolete library.
llvm-svn: 41850
2007-09-11 17:10:52 +00:00
Anton Korobeynikov
835bb69cd2 Dror GCCLibraries: they are obsolete since 2.0 release. This also reduces number of licenses used in LLVM.
llvm-svn: 41257
2007-08-21 22:40:44 +00:00
Chris Lattner
dfe6e0bea4 crtend is only for llvm-gcc3, remove it.
llvm-svn: 34529
2007-02-23 19:34:09 +00:00
Chris Lattner
cadd85f8eb the old trace values pass has been removed, remove its runtime library.
llvm-svn: 32999
2007-01-07 18:13:48 +00:00
Reid Spencer
788d8ef578 Undo removal of the runtime libraries. While this may have been a bit
premature, these libraries will be going away for the 2.0 release. Other
arrangements for profiling, gc, etc. should be made in the next few months.

llvm-svn: 31807
2006-11-17 03:32:33 +00:00
Reid Spencer
77422c102b In LLVM 2.0 we won't use the runtime libraries as llvm-gcc3 support will
be dropped. This patch pertains to removing the runtime directory from LLVM.

llvm-svn: 31793
2006-11-16 23:17:27 +00:00
Reid Spencer
f036c59ca0 Remove unused variable.
llvm-svn: 31404
2006-11-03 01:58:30 +00:00
Reid Spencer
4bafa71dc1 For PR786:
Turn on -Wunused and -Wno-unused-parameter. Clean up most of the resulting
fall out by removing unused variables. Remaining warnings have to do with
unused functions (I didn't want to delete code without review) and unused
variables in generated code. Maintainers should clean up the remaining
issues when they see them. All changes pass DejaGnu tests and Olden.

llvm-svn: 31380
2006-11-02 20:25:50 +00:00
John Criswell
f037045e9f Describe and date modifications we made per LGPL requirements.
llvm-svn: 29569
2006-08-08 14:47:54 +00:00
John Criswell
2d50f76605 Make information more complete.
llvm-svn: 29568
2006-08-08 14:47:33 +00:00
John Criswell
67a99e866c Reverted previous commit. Thanks, Chris.
llvm-svn: 29388
2006-07-28 18:30:52 +00:00
John Criswell
e42e6faf13 Added in the LGPL text and copyright information. This needs to be
included in the distribution.
Also added the glibc LICENSES file, which should be included as well.

llvm-svn: 29386
2006-07-28 18:16:00 +00:00
Reid Spencer
cf025eb201 For PR786:
Turn -pedantic and -Wno-long-long compile flags on by default. In a few
places, avoid the warnings by removing these options in the local makefile.
One notable exception: lib/Target/CBackend/Writer.cpp. These warnings are
left on as a reminder to developers to clean them up.

llvm-svn: 28614
2006-06-01 01:55:21 +00:00
Reid Spencer
b04b17f650 Put an innocuous statement in this file to quelch warnings about compiling
an empty file.

llvm-svn: 28612
2006-06-01 01:49:08 +00:00
Reid Spencer
94a443bb29 Use archive libraries instead of object files for VMCore, BCReader,
BCWriter, and bzip2 libraries. Adjust the various makefiles to accommodate
these changes. This was done to speed up link times.

llvm-svn: 28610
2006-06-01 01:30:27 +00:00
Reid Spencer
574d4e6992 For PR786:
Minor tweaks in public headers and a few .cpp files so that LLVM can build
successfully with -pedantic and projects using LLVM with -pedantic don't
get warnings from LLVM. There's still more -pedantic warnings to fix.

llvm-svn: 28453
2006-05-24 19:21:13 +00:00
Reid Spencer
04730dfbf7 Invert the tests on LLVMGCC_MAJVERS to check for value 4 instead of value
3. This ensures that if llvm-gcc isn't available and consequently the value
of LLVMGCC_MAJVERS is blank, that the old (include runtime) behavior will
persist.

llvm-svn: 27499
2006-04-07 21:45:23 +00:00
Chris Lattner
132373d144 add a newline at the end of the file
llvm-svn: 27492
2006-04-07 18:41:16 +00:00
Reid Spencer
8067330e59 Avoid building the runtime libraries if llvm-gcc version 4 is detected.
llvm-svn: 27464
2006-04-06 22:15:51 +00:00
Reid Spencer
8cb87336b8 For PR722:
Change the check for llvm-gcc from using LLVMGCCDIR to LLVMGCC. This checks
for the actual tool rather than the directory in which the tool resides. In
the case of this bug, it is possible that the directory exists but that the
tools in that directory do not. This fix should avoid the makefile from
erroneously proceeding without the actual tools being available.

llvm-svn: 27361
2006-04-02 14:34:26 +00:00
Evan Cheng
1fc1ed55c4 Optimizing to calloc() to malloc() + memset() can be bad on some platforms.
llvm-svn: 26732
2006-03-13 21:22:43 +00:00
Chris Lattner
d3fb9d9d08 Make the new and old front-ends more similar: now neither uses __main.
llvm-svn: 26629
2006-03-09 06:16:28 +00:00
Chris Lattner
c97d0d1f21 fix make install/uninstall of libcrtend.
llvm-svn: 25796
2006-01-30 02:03:56 +00:00
Chris Lattner
eb5e553719 Remove out of date comment
llvm-svn: 25705
2006-01-27 22:06:50 +00:00
Chris Lattner
6a3f08a312 Remove the only use of FAKE_SOURCES
llvm-svn: 25704
2006-01-27 22:06:23 +00:00
John Criswell
6992d365bf Add the remove() function from the C library.
llvm-svn: 24498
2005-11-28 15:49:15 +00:00
Chris Lattner
213cd5c12b This was never updated for the project makefile changes
llvm-svn: 23790
2005-10-18 18:50:26 +00:00
Chris Lattner
645b455920 This never got updated to reflect the project makefile changes
llvm-svn: 23789
2005-10-18 18:48:30 +00:00
Misha Brukman
53e199440e Remove trailing whitespace
llvm-svn: 21427
2005-04-21 23:48:37 +00:00
Misha Brukman
934b3ca2f5 Fix grammar
llvm-svn: 20789
2005-03-23 21:14:33 +00:00
Chris Lattner
2d1b7e14d2 Hrm, who knows what 'uint' is, but it seems to work sometimes? Wierd.
llvm-svn: 19876
2005-01-28 19:37:35 +00:00
Reid Spencer
d5bf5709c4 Turn on LOADABLE_MODULE so that profile.so can be loaded dynamically by
the JIT.

llvm-svn: 19524
2005-01-13 16:53:05 +00:00
Reid Spencer
55e707feb0 Re-enable libprofile now that llvm-ar is working better.
llvm-svn: 19523
2005-01-13 16:51:19 +00:00
Chris Lattner
dd2419276c Remove dead directories
llvm-svn: 19262
2005-01-02 22:55:16 +00:00
Chris Lattner
70d2c65415 This lib is dead
llvm-svn: 19261
2005-01-02 22:53:52 +00:00
Chris Lattner
80e1708bca Remove a bunch of useless empty libraries
llvm-svn: 19260
2005-01-02 22:52:28 +00:00
Chris Lattner
5d508e2ced This is no longer needed.
llvm-svn: 19259
2005-01-02 22:50:00 +00:00
Reid Spencer
abfa1798be For PR432:
* Variable name change: cferuntime_libdir -> CFERuntimeLibDir

llvm-svn: 19096
2004-12-22 05:57:33 +00:00
Chris Lattner
689c9cf79a Disable libprofile as llvm-ar bus errors on it, and I don't want to break
the nightly testers.

llvm-svn: 18960
2004-12-15 08:15:48 +00:00
Reid Spencer
cd492e3dfc Use the new BYTECODE_DESTINATION to override the default bytecode install
destination for this library so that it goes to $(cferuntime_libdir) rather
than just $(libdir). Normal bytecode libraries should be installed in the
$(libdir), but these ones are "special" because they're part of the the
C/C++ front end.

llvm-svn: 18882
2004-12-13 07:40:50 +00:00
Reid Spencer
8f27c45a7a Remove useless -L switch now that gccld -link-as-library bug is fixed.
llvm-svn: 18613
2004-12-08 04:22:47 +00:00
Reid Spencer
340229703b Make use of the LLVMGCCStdCXXLibDir variable to link objects
llvm-svn: 18548
2004-12-05 19:15:06 +00:00
Reid Spencer
3a48594cec Use the FAKE_SOURCES feature for proper distribution of contents
llvm-svn: 18506
2004-12-04 22:34:33 +00:00
Reid Spencer
62d6f8d10d Standardize the makefiles with space around = to match the rest of LLVM.
llvm-svn: 18429
2004-12-02 09:58:09 +00:00
Reid Spencer
66100cfb51 Standardize the format of the runtime libraries makefiles.
* Don't have lines longer than 80 cols
* Blank line after the header
* Reduce spaces in var definitions.

llvm-svn: 18427
2004-12-02 09:31:40 +00:00
Reid Spencer
5c84750d29 For PR466:
Much of what this Makefile did to make a libcrtend.a file is now supported
by Makefile.rules when BYTECODE_LIBRARY=1 is specified. So, we've
simplified the make rules for building this library.

llvm-svn: 18426
2004-12-02 09:29:49 +00:00
Reid Spencer
04ac624826 Remove this left-over crud from the automake experiment.
llvm-svn: 18424
2004-12-02 09:23:51 +00:00
Chris Lattner
264b322760 Remove zlib from the llvm tarball. This is only used (in theory by povray-31
which is part of llvm-test).  If anyone is interested in adding it to llvm-test,
feel free to go for it.

This is part of PR417

llvm-svn: 18277
2004-11-27 19:18:35 +00:00
Chris Lattner
d6df7d167b Remove zlib from the llvm tarball. This is only used (in theory by povray-31
which is part of llvm-test).  If anyone is interested in adding it to llvm-test,
feel free to go for it.

llvm-svn: 18276
2004-11-27 19:18:05 +00:00
Chris Lattner
1c3b6ea3b2 libpng is not even used by povray3.1 in the current configuration, just
drop it completely.

llvm-svn: 17966
2004-11-18 21:21:54 +00:00
Reid Spencer
48f603532a Use llvm-ar not ar for constructing archive. Wrap at 80 cols.
llvm-svn: 17784
2004-11-14 22:13:13 +00:00
Reid Spencer
acb1305e99 Internalize variable names to prevent recursive assignment. Cleanup docs.
llvm-svn: 17359
2004-10-30 09:19:36 +00:00
Reid Spencer
b82ecf9d2c * Make the libcrtend.a installation depend on the bytecode-libs directory
* Conform output to standard.

llvm-svn: 17267
2004-10-26 21:30:31 +00:00
Reid Spencer
6130e563e5 Add the export symbols list files as extra distribution files.
llvm-svn: 17246
2004-10-26 07:02:58 +00:00
Reid Spencer
2f74ad1e36 Add EXTRA_DIST for additional files to be distributed.
llvm-svn: 17233
2004-10-26 03:12:11 +00:00
Reid Spencer
957e5fcd71 Remove the clean target.
llvm-svn: 17185
2004-10-23 08:01:27 +00:00
Reid Spencer
5574857063 We're not doing automake any more
llvm-svn: 17168
2004-10-22 21:02:23 +00:00
Reid Spencer
019621a1ea Adjust to changes in Makefile.rules
llvm-svn: 17167
2004-10-22 21:02:08 +00:00
Reid Spencer
e48ba34fd4 We won't use automake
llvm-svn: 17155
2004-10-22 03:35:04 +00:00
Reid Spencer
ce514b1c2c Initial automake generated Makefile template
llvm-svn: 17136
2004-10-18 23:55:41 +00:00
Reid Spencer
c4abf55b69 Update to reflect building zlib for LLVM
llvm-svn: 17091
2004-10-17 15:02:47 +00:00
Reid Spencer
8c10b29823 Add missing targets for install/clean
llvm-svn: 17090
2004-10-17 15:01:59 +00:00
Reid Spencer
fabc2ac2b6 Initial Makefile.am for building with automake
llvm-svn: 17073
2004-10-17 00:24:24 +00:00
Reid Spencer
cb0f00e69b Initial Makefile.am for building with automake.
llvm-svn: 17072
2004-10-17 00:20:42 +00:00
Reid Spencer
56f93e24a5 Make sure that for systems where the string functions are actually macros
that we undefine the macro before using its name in the definition. This
can happen on Linux if _GNU_SOURCE is defined.

llvm-svn: 17071
2004-10-17 00:17:54 +00:00
Chris Lattner
6211fd3b08 Don't call memset if malloc returns a null pointer
llvm-svn: 16797
2004-10-06 23:08:03 +00:00
Misha Brukman
871d4475a9 Disable libprofile as it breaks the build on Sparc (autoconf issues).
llvm-svn: 16253
2004-09-08 20:30:26 +00:00
Reid Spencer
d5b1443205 Clean up some "clean:" targets so they use $(VERB) and don't print anything
by default, like every other "clean" target in LLVM.

llvm-svn: 16161
2004-09-03 23:19:53 +00:00
Reid Spencer
c4abcbefb1 Changes For Bug 352
Move include/Config and include/Support into include/llvm/Config,
include/llvm/ADT and include/llvm/Support. From here on out, all LLVM
public header files must be under include/llvm/.

llvm-svn: 16137
2004-09-01 22:55:40 +00:00
Misha Brukman
864bf611c6 Do not mention Chris in public Makefiles
llvm-svn: 15591
2004-08-09 20:23:44 +00:00
Misha Brukman
64e8914d46 Shorten comment header to 80 cols
llvm-svn: 15590
2004-08-09 20:13:14 +00:00
Misha Brukman
f17131571f * Remove UIUC-specific comment
* Make header comment span 80 cols

llvm-svn: 15589
2004-08-09 20:07:44 +00:00
Misha Brukman
f89455f72a Remove Chris-related bytecode-dir comment
llvm-svn: 15587
2004-08-09 19:51:49 +00:00
Chris Lattner
b45f75c674 This file is obsolete
llvm-svn: 15521
2004-08-05 17:45:32 +00:00
Chris Lattner
c1830c50ec C++ support does not live in the C runtime any longer
llvm-svn: 15515
2004-08-05 02:28:17 +00:00
Chris Lattner
dd605927d9 Two files are moved to libstdc++, and a NOTE gets added
llvm-svn: 15514
2004-08-05 02:27:28 +00:00
Chris Lattner
472637ce3a Add missing copyrights
llvm-svn: 15513
2004-08-05 00:20:51 +00:00
Chris Lattner
7b301dfa9d Update GC intrinsics to take a pointer to the object as well as a pointer
to the field being updated.  Patch contributed by Tobias Nurmiranta

llvm-svn: 15097
2004-07-22 05:51:13 +00:00
Brian Gaeke
2290ace94a Fix warning on 64-bit machines
llvm-svn: 14902
2004-07-16 21:40:32 +00:00
Chris Lattner
2200720a89 Continue the implementation
llvm-svn: 13818
2004-05-27 05:51:31 +00:00
Chris Lattner
695ca18c95 A few more microsteps
llvm-svn: 13817
2004-05-27 05:51:13 +00:00
Alkis Evlogimenos
1790a73dc5 Eliminate warnings
llvm-svn: 13704
2004-05-23 23:02:35 +00:00
Chris Lattner
87cf9f79dc Build the garbage collectors
llvm-svn: 13701
2004-05-23 21:26:29 +00:00
Chris Lattner
71890fd358 Initial checkin of GC implementation support files
llvm-svn: 13700
2004-05-23 21:25:59 +00:00
Chris Lattner
74d7e65df6 Check in an EARLY START on a simple copying collector
llvm-svn: 13698
2004-05-23 21:25:45 +00:00
Brian Gaeke
c30f79d8f4 Share the profile info type enum with the C++ analysis libraries.
Add a documentation comment for write_profiling_data().

llvm-svn: 13345
2004-05-04 16:51:48 +00:00
Brian Gaeke
2690f648c6 Constants for profile info type changed names to match the C++ ones.
llvm-svn: 13344
2004-05-04 16:51:47 +00:00
Brian Gaeke
b2d9d71730 Constants for profile info type changed names to match the C++ ones.
Edited comments.

llvm-svn: 13343
2004-05-04 16:51:46 +00:00
Brian Gaeke
6b569a35ba Add initial implementation of basic block tracing runtime
llvm-svn: 13339
2004-05-03 23:51:50 +00:00
Brian Gaeke
581652e2e1 Add basic block tracing functions as exported symbols.
llvm-svn: 13338
2004-05-03 23:49:17 +00:00
Brian Gaeke
0f806b8509 Add basic block tracing information as a type of "profiling" information.
llvm-svn: 13337
2004-05-03 23:49:16 +00:00
Misha Brukman
a2cc39ff28 Fit comment into 80 cols.
llvm-svn: 12996
2004-04-16 17:13:52 +00:00
Chris Lattner
a6f2680e2d Remove libraries that have no reason to be here, and keep breaking the nightly tester because their makefiles do not have the right dependencies!!
llvm-svn: 12981
2004-04-16 14:12:36 +00:00
Chris Lattner
c85541fa70 Reenable library now that the loopsimplify bug is fixed
llvm-svn: 12891
2004-04-13 16:24:53 +00:00