1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-24 13:33:37 +02:00
Commit Graph

4426 Commits

Author SHA1 Message Date
Chris Lattner
1cad7eb7b0 Substantial cleanups:
* Add header comment
 * Remove extraneous #includes
 * Move the FileType enum into the GCC class
 * The GCC class is not virtual.
 * Move all of the "constructor" functions into the classes themselves
 * Stop using cl::list as arguments, use std::vector instead (which cl::list
   derives from)
 * Improve comments

llvm-svn: 9121
2003-10-14 21:34:11 +00:00
Chris Lattner
187faf250c Actually return an error if something bad happens, don't just exit.
llvm-svn: 9119
2003-10-14 21:07:25 +00:00
Chris Lattner
c115e75755 Output a contorted sequence of instructions to make sure that we don't access
off the bottom of the stack.  This fixes PR#41

llvm-svn: 9114
2003-10-14 19:09:05 +00:00
Chris Lattner
907de53acb Disable the leaf function optimization, which is apparently not legal on
X86/linux.  :(  The problem is that a signal delivered while the function
is executing could clobber the functions stack.  This is a partial fix
for PR41.

llvm-svn: 9113
2003-10-14 18:52:41 +00:00
Chris Lattner
a567862e89 Do not move variable sized allocations to the top of the caller, which might
break dominance relationships, and is otherwise bad.  This fixes bug:
Inline/2003-10-13-AllocaDominanceProblem.ll.  This also fixes miscompilation
of 3 176.gcc source files (reload1.c, global.c, flow.c)

llvm-svn: 9109
2003-10-14 01:11:07 +00:00
Chris Lattner
55c1da7877 Do not allow fallthroughs in switch statements. This fixes PR37,
253.perlbmk, and test/Programs/SingleSource/UnitTests/2003-10-13-SwitchTest.c!

llvm-svn: 9101
2003-10-13 20:32:04 +00:00
Brian Gaeke
add2fc5294 Remove WordsEmitted statistic; there's already a non-backend-specific
jello statistic for this (just divide #-bytes-of-code-emitted by 4).

Rewrite head-of-file comment.

llvm-svn: 9098
2003-10-13 19:51:20 +00:00
Chris Lattner
be8bc81ce0 LLI no longer has -abort-on-exception
llvm-svn: 9097
2003-10-13 18:26:49 +00:00
Chris Lattner
9506b0d6e2 Use the autoconf macro John wrote
llvm-svn: 9095
2003-10-13 17:13:53 +00:00
Chris Lattner
dda241ffe4 Whoops, we inserted into the wrong set. What's up with the dead set anyway?
llvm-svn: 9094
2003-10-13 16:49:21 +00:00
Chris Lattner
752b5bcffd Use external df iterators to avoid revisiting blocks in functions with
multiple setjmp calls.

llvm-svn: 9093
2003-10-13 16:44:50 +00:00
Chris Lattner
97f3f7e819 Make use of "external" depth-first iterators to avoid revisiting nodes
multiple times.  This reduces the time to construct post-dominance sets a LOT.
For example, optimizing perlbmk goes from taking 12.9894s to 1.4074s.

llvm-svn: 9091
2003-10-13 16:36:06 +00:00
Chris Lattner
c39d256841 Stop using "reverse depth first" order
llvm-svn: 9081
2003-10-13 15:21:58 +00:00
Chris Lattner
0ad8f7bb8f Minor cleanups
llvm-svn: 9079
2003-10-13 14:57:53 +00:00
Chris Lattner
20cebd6ccb Speed up TypesEqual by specializing it for all of the derived types, avoiding
a lot of virtual method dispatch overhead.

llvm-svn: 9078
2003-10-13 14:55:56 +00:00
Chris Lattner
8f34f82f84 Avoid calling getTypeSlot more
llvm-svn: 9077
2003-10-13 14:34:59 +00:00
Chris Lattner
bc7c13c803 Avoid creating lots of pointless opaque types, with short lifetimes
llvm-svn: 9076
2003-10-13 14:03:36 +00:00
Chris Lattner
1a43c990a8 This is a header file, hear me roar
llvm-svn: 9075
2003-10-13 05:34:24 +00:00
Chris Lattner
34b8bc6716 * Remove extraneous #includes
* Fix a nasty initializer ordering bug.  Any only-CFG passes which registered
  themselves before the CFGOnlyAnalysis vector initialized got forgotten and
  thus got invalidated and recomputed.

In particular, in my compiled version of gccas, the Loop information pass was
being recomputed unnecessarily.

llvm-svn: 9074
2003-10-13 05:33:01 +00:00
Chris Lattner
7a5241cc99 Wrap code at 80 columns
llvm-svn: 9073
2003-10-13 05:04:27 +00:00
Chris Lattner
09abbd2da6 This is a header file, thus it needs a -*-C++-*-
llvm-svn: 9072
2003-10-13 04:22:07 +00:00
Chris Lattner
b6c8569f05 Regularize header file comments
llvm-svn: 9071
2003-10-13 03:32:08 +00:00
Chris Lattner
1c989f6d65 Regularize header file comment, eliminate using's
llvm-svn: 9069
2003-10-13 03:30:47 +00:00
Chris Lattner
c8586d8d06 Minor cleanups
llvm-svn: 9067
2003-10-13 01:02:33 +00:00
Chris Lattner
af8f585013 Checkin an improvement contributed by Bill:
Only transform call sites in a setjmp'ing function which are reachable from
the setjmp.  If the call dominates the setjmp (for example), the called
function cannot longjmp to the setjmp.

This dramatically reduces the number of invoke instructions created in some
large testcases.

llvm-svn: 9066
2003-10-13 00:57:16 +00:00
Chris Lattner
7519b1216b Add support to the loop canonicalization pass to make it transform loops to
have a SINGLE backedge.  This is useful to, for example, the -indvars pass.

This implements testcase LoopSimplify/single-backedge.ll and closes PR#34

llvm-svn: 9065
2003-10-13 00:37:13 +00:00
Chris Lattner
be9a1813c6 Make getNumBackEdges more efficient
llvm-svn: 9063
2003-10-12 22:14:27 +00:00
Chris Lattner
f4ca01758d Rename loop preheaders pass to loop simplify
llvm-svn: 9061
2003-10-12 21:52:28 +00:00
Chris Lattner
1c8a980870 File is renamed to LoopSimplify.cpp
llvm-svn: 9059
2003-10-12 21:44:18 +00:00
Chris Lattner
7fe9661cae First step in renaming the preheaders pass to loopsimplify
llvm-svn: 9058
2003-10-12 21:43:28 +00:00
Chris Lattner
510dfc942a The preheader insertion pass only depends on the CFG. Mark it as such, which
allows GCCAS to only run it once.

llvm-svn: 9056
2003-10-12 19:33:10 +00:00
Chris Lattner
bfffd3052d Rename method
llvm-svn: 9055
2003-10-12 18:52:12 +00:00
Chris Lattner
5567441de9 * Spell "necessary" correctly
* Print floating point values using C99 hexadecimal style FP if possible.
  This increases the number of floating point constants that may be emitted
  inline, and improves precision for global variable initializers which
  can not be emitted in integer form.

This fixes the Olden/Power benchmark with the CBE!!!!

llvm-svn: 9052
2003-10-12 08:12:58 +00:00
Chris Lattner
b81f5e6db8 * Be TBAA safe
* Fix isFPCSafeToPrint to find more constants safe to print, which it was
  failing because ftostr was padding with leading space characters.
* Scan the entire module for global constants instead of each function at a
  time.  This has the advantage of allowing us to emit constants at global
  scope instead of function scope.  This speeds FP programs quite a bit.

llvm-svn: 9048
2003-10-12 04:36:29 +00:00
Brian Gaeke
143f9b5000 Make mmap's fd for anonymous memory acquisition default to -1, except on
Linux. This is consistent with what FreeBSD and Solaris both want.
This makes the JIT work on FreeBSD 5.1-RELEASE. Whee.

llvm-svn: 9045
2003-10-11 03:51:18 +00:00
Brian Gaeke
acbc37a19e Don't include "Config/stdlib.h".
llvm-svn: 9037
2003-10-10 19:12:22 +00:00
Brian Gaeke
b4b2fa9060 Include <cctype> and <cstdlib> instead of <ctype.h> and "Config/stdlib.h".
llvm-svn: 9036
2003-10-10 19:12:08 +00:00
Brian Gaeke
e5249bf429 Include <cstdio> instead of <stdio.h>.
llvm-svn: 9032
2003-10-10 18:46:52 +00:00
Brian Gaeke
a3f850a182 Don't include Config/stdio.h or <stdio.h>.
llvm-svn: 9031
2003-10-10 18:46:29 +00:00
Misha Brukman
868eac95dd Fix spelling.
llvm-svn: 9027
2003-10-10 17:57:28 +00:00
Misha Brukman
c59161ff84 Fix spelling/grammar.
llvm-svn: 9023
2003-10-10 17:54:14 +00:00
Misha Brukman
e7d07e3cf1 * Tabs to spaces
* Doxygenified function comments
* Added FIXMEs to solicit documentation for other functions

llvm-svn: 9022
2003-10-10 17:45:12 +00:00
Misha Brukman
32c5aec6ec Fix spelling.
llvm-svn: 9021
2003-10-10 17:42:19 +00:00
Misha Brukman
9fcbd8d16f * Doxygenified comments
* Wrap code at 80 columns
* Ordered includes according to LLVM style guide

llvm-svn: 9020
2003-10-10 17:41:32 +00:00
Brian Gaeke
c38ad8b86e Never set any signal handlers.
Never call setjmp(), longjmp() or strsignal().

llvm-svn: 9014
2003-10-10 17:03:22 +00:00
Brian Gaeke
e90a3199eb Rewrite head-of-file comment.
In lookupFunction():
 Change to use "F" for Function argument instead of ancient "M".
 Remove commented-out code.
 Change to use GetAddressOfSymbol instead of dlsym.

llvm-svn: 9013
2003-10-10 17:03:10 +00:00
Brian Gaeke
30e2817dc5 Change to use GetAddressOfSymbol instead of dlsym.
llvm-svn: 9012
2003-10-10 17:02:42 +00:00
Brian Gaeke
26333b9b39 Change to use LinkDynamicObject instead of dlopen.
llvm-svn: 9011
2003-10-10 17:01:49 +00:00
Brian Gaeke
254dd12289 Change to use strtoul instead of strtoll.
llvm-svn: 9010
2003-10-10 17:01:36 +00:00
Misha Brukman
339d9fb58d Fixing the spelling of this filename.
llvm-svn: 9009
2003-10-10 16:57:31 +00:00