1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-25 05:52:53 +02:00
Commit Graph

1797 Commits

Author SHA1 Message Date
Brian Gaeke
2a7cedb657 This file has funny include guards and funny extra whitespace.
Make this file less funny.

llvm-svn: 9186
2003-10-16 23:43:35 +00:00
Misha Brukman
99daf743bb If we move the constructors to the .cpp file, we can drop the #include
llvm-svn: 9180
2003-10-16 21:16:21 +00:00
Chris Lattner
a8899d65d3 Add weak linking type
llvm-svn: 9168
2003-10-16 18:27:04 +00:00
Chris Lattner
0493113344 Completely rewrite support for the Value::use_* list. Now, all operations on
this list (except use_size()) are constant time.  Before the killUse method
(used whenever something stopped using a value) was linear time, and thus
very very slow for large programs.

This speeds GCCAS up _substantially_ on large programs: almost 2x for 176.gcc:

176.gcc:     77.07s -> 37.38s
177.mesa:     7.59s ->  5.57s
252.eon:     21.02s -> 19.52s (*)
253.perlbmk: 11.40s -> 13.05s
254.gap:      7.25s -> 7.42s

252.eon would speed up a whole lot more, but optimization time is being
dominated by the inlining pass, which needs to be fixed.

llvm-svn: 9159
2003-10-16 16:53:04 +00:00
Chris Lattner
64d7bc76b8 Vector is my friend, do you like vector?
llvm-svn: 9147
2003-10-15 22:10:10 +00:00
Chris Lattner
a390208127 lalala
llvm-svn: 9146
2003-10-15 22:09:57 +00:00
Chris Lattner
9db0d011b4 We'll need this soon as well
llvm-svn: 9145
2003-10-15 22:09:46 +00:00
Chris Lattner
d335336fda This file uses assert and doesn't include anything which already #includes <cassert>
llvm-svn: 9142
2003-10-15 21:55:37 +00:00
Chris Lattner
7e21039f40 Remove usage of use_size()
llvm-svn: 9134
2003-10-15 16:43:24 +00:00
Chris Lattner
27a1330106 Add new hasOneUse() method. Remove explicit inline qualifiers
llvm-svn: 9132
2003-10-15 16:39:04 +00:00
Chris Lattner
ac95730fca Generalize abstract interpreter interface to allow linking in an arbitrary number of shared objects
llvm-svn: 9129
2003-10-14 21:52:52 +00:00
Misha Brukman
2ab03faac1 Enabling incremental bytecode loading in the JIT:
* ExecutionEngine can be constructed from a ModuleProvider
* Alphabetized order of forward-declared classes

llvm-svn: 9123
2003-10-14 21:35:52 +00:00
Misha Brukman
6e81243ff7 Enabling incremental bytecode loading in the JIT:
* Add ModuleProvider as a parameter to FunctionPassManager

llvm-svn: 9122
2003-10-14 21:34:56 +00:00
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
John Criswell
1cee7eb4a6 Adding additional license information to these files.
llvm-svn: 9102
2003-10-13 20:34:27 +00:00
Chris Lattner
59b20efaec Add missing default argument
llvm-svn: 9092
2003-10-13 16:44:30 +00:00
Chris Lattner
4063621588 add support for "external" depth first iterators, which store the 'visited' set
outside of the iterator itself.

llvm-svn: 9090
2003-10-13 16:34:26 +00:00
John Criswell
ff4e11b823 Added a macro and code that checks for the %a format string in sprintf().
llvm-svn: 9089
2003-10-13 16:22:01 +00:00
Chris Lattner
d83c90abd7 Extricate the "reverse" support from the depth-first iterator. This is really
a crappy form of post-order traversal which really does not belong here.  While
we are at it, improve documentation and use a vector instead of a stack.

This improves the post dominator analysis pass by ~5%, and probably also helps
other passes as well.

llvm-svn: 9084
2003-10-13 15:45:33 +00:00
Chris Lattner
1005b2d0c6 Add operator= for type iterators to make them assignable
llvm-svn: 9083
2003-10-13 15:34:17 +00:00
Chris Lattner
f545835766 Remove explicit inline qualifiers when the implicit ones work just as well
llvm-svn: 9082
2003-10-13 15:30:59 +00:00
Chris Lattner
b743545965 Add new op_erase method
llvm-svn: 9068
2003-10-13 03:29:26 +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
8b5c8f4722 Rename method to indicate what it does
llvm-svn: 9054
2003-10-12 18:51:53 +00:00
Brian Gaeke
7f0669e624 No longer used anywhere.
Dead.

This is a dead header.

It's not pining! It's passed on! This header is no more! It has ceased
to be!  It's expired and gone to meet its maker! It's a stiff! Bereft
of life, it rests in peace! If you hadn't nailed it to the perch it'd
be pushing up the daisies! Its metabolic processes are now history! It's
off the twig! It's kicked the bucket! It's shuffled off its mortal coil,
run down the curtain, and joined the bleeding choir invisibile!! THIS IS
AN EX-HEADER!!

llvm-svn: 9035
2003-10-10 18:58:07 +00:00
Misha Brukman
32c5aec6ec Fix spelling.
llvm-svn: 9021
2003-10-10 17:42:19 +00:00
Misha Brukman
2d53099507 Use 'F' for Function instead of 'M'.
llvm-svn: 9019
2003-10-10 17:38:31 +00:00
Brian Gaeke
ec80b3028e Add my abstracted dynamic linker support files.
llvm-svn: 9008
2003-10-10 16:55:42 +00:00
Chris Lattner
b6367d9414 Add a method to reserve space for operands
llvm-svn: 8992
2003-10-09 22:45:59 +00:00
Chris Lattner
b876f55b76 Kill warning when compiling in optimized mode
llvm-svn: 8989
2003-10-09 20:43:55 +00:00
Chris Lattner
8e6b42c567 Make getContainedType more efficient by not returning null if out of range!
llvm-svn: 8987
2003-10-09 20:35:15 +00:00
Alkis Evlogimenos
33a498f90c Forward declare class Type since it is used in this class and Type.h is not included
llvm-svn: 8958
2003-10-08 04:45:45 +00:00
Brian Gaeke
f8bed70df3 Regenerated with (at top-level llvm directory):
% autoheader -I autoconf autoconf/configure.ac

llvm-svn: 8956
2003-10-07 23:39:51 +00:00
Misha Brukman
3ab5f2d5d4 Moved to llvm/include/llvm/Support because it is LLVM-specific.
llvm-svn: 8897
2003-10-06 18:34:38 +00:00
Chris Lattner
394f190dab Remove unneeded dtors
llvm-svn: 8896
2003-10-06 17:36:49 +00:00
Chris Lattner
05f16ed60b Doxygenize class comments. Add new NamedRegionTimer class
llvm-svn: 8888
2003-10-06 15:02:16 +00:00
Chris Lattner
d1c3f771f8 Change the interface to PromoteMemToReg to also take a DominatorTree
llvm-svn: 8883
2003-10-05 21:20:13 +00:00
Chris Lattner
8848bf58ce Add new prototype for createLowerInvokePass(). Make simplifycfg be a
functionpass

llvm-svn: 8870
2003-10-05 19:15:13 +00:00
Chris Lattner
b7688b7b80 Output a very high-precision number
llvm-svn: 8856
2003-10-05 00:41:07 +00:00
Chris Lattner
cb5dd5ba25 Add some new methods to forward to
llvm-svn: 8852
2003-10-05 00:13:28 +00:00
Chris Lattner
def80d731a Rename AbstractModuleProvider -> ModuleProvider, to match the header file name,
and because, while the class used by the interface is abstract, the actual
concept is not.

llvm-svn: 8850
2003-10-04 20:14:59 +00:00
Chris Lattner
a2c1509b21 Minor cleanups
llvm-svn: 8843
2003-10-03 18:57:54 +00:00
Chris Lattner
18c3f42894 This checkin basically amounts to a complete rewrite of the type-resolution
machinery.  This dramatically simplifies how things works, removes irritating
little corner cases, and overall improves speed and reliability.

Highlights of this change are:

1. The exponential algorithm built into the code is now gone.  For example
   the time to disassemble one bytecode file from the mesa benchmark went
   from taking 12.5s to taking 0.16s.
2. The linker bugs should be dramatically reduced.  The one remaining bug
   has to do with constant handling, which I actually introduced in
   "union-find" checkins.
3. The code is much easier to follow, as a result of fewer special cases.
   It's probably also smaller.  yaay.

llvm-svn: 8842
2003-10-03 18:46:24 +00:00
Chris Lattner
2e3f124f10 These methods are dead, remove them
llvm-svn: 8839
2003-10-03 18:39:40 +00:00
Chris Lattner
b217f24289 Make the PATypeHolder use a simple union-find implementation to handle
merging of types.  This makes it MUCH more efficient than before, also
making things simpler.

llvm-svn: 8833
2003-10-02 23:35:57 +00:00
Chris Lattner
564dbbf299 There is no reason for Value to be an AbstractTypeUser. This just makes things
significantly more complete.  Instead, just make DerivedType's AbstractTypeUser's,
and make Value contain a PATypeHolder.  This will also be more efficient in the
future.

llvm-svn: 8827
2003-10-02 19:44:23 +00:00
Chris Lattner
bd6ff0adbc There is no reason for the PATypeHolder class to derive from the
PATypeHandle class

llvm-svn: 8825
2003-10-02 19:08:18 +00:00
Alkis Evlogimenos
a37b58ce09 Moved enum and command-line option in separate file. Also added function that returns the user selected register allocator to the caller.
llvm-svn: 8819
2003-10-02 16:57:49 +00:00
Alkis Evlogimenos
42a09316bb Change llc command line for register allocators
llvm-svn: 8815
2003-10-02 06:13:19 +00:00
Chris Lattner
ba703c3f17 Remove obsolete scoped pred and succ iterator typedefs
llvm-svn: 8810
2003-10-01 22:28:39 +00:00
Chris Lattner
c228625040 Use graph traits to perform generic interval construction
llvm-svn: 8809
2003-10-01 22:28:00 +00:00
Chris Lattner
679ad2c46d Add graph traits specializations for intervals
llvm-svn: 8808
2003-10-01 22:27:36 +00:00
Chris Lattner
c3767eab12 Forward declare a class
llvm-svn: 8797
2003-09-30 20:15:40 +00:00
Chris Lattner
d63bd276f0 This got merged into Passes.h
llvm-svn: 8796
2003-09-30 20:15:32 +00:00
Chris Lattner
08d6f140ab Include the sparc register in this file
llvm-svn: 8794
2003-09-30 20:14:43 +00:00
Chris Lattner
f6f3a5505a Update comment
llvm-svn: 8783
2003-09-30 18:44:27 +00:00
Chris Lattner
4e4c763dfc Standardize header file comments
llvm-svn: 8782
2003-09-30 18:37:50 +00:00
Chris Lattner
d2a392eef1 Add a file header
llvm-svn: 8781
2003-09-30 18:28:53 +00:00
Chris Lattner
166b62e171 Remove unused header
llvm-svn: 8780
2003-09-30 18:19:13 +00:00
Chris Lattner
0c15a20712 Fix header comment
llvm-svn: 8779
2003-09-30 18:12:25 +00:00
Chris Lattner
1ea5d5a0c0 Fix header, remove dead decl
llvm-svn: 8777
2003-09-30 18:06:51 +00:00
Chris Lattner
7d059b8c3d Fix header file comment
llvm-svn: 8776
2003-09-30 18:05:30 +00:00
Chris Lattner
633b14c13b make the header comment more useful
llvm-svn: 8774
2003-09-30 17:53:30 +00:00
Misha Brukman
a081e4323f Abstracted away the process of running our tools + gcc from bugpoint.
llvm-svn: 8753
2003-09-29 22:38:57 +00:00
Misha Brukman
04a97743ca Tersified and fixed whitespace (tabs -> spaces).
llvm-svn: 8752
2003-09-29 22:37:57 +00:00
Brian Gaeke
16e30e5c84 Fix a typo I happened to notice.
Rename include guards in the "usual" manner.

llvm-svn: 8695
2003-09-24 04:09:50 +00:00
Misha Brukman
7623477716 Added doxygen comments for the streaming module provider.
llvm-svn: 8672
2003-09-22 23:40:38 +00:00
Misha Brukman
a0fb45ff4b Added functions to perform streaming function loading, doxygenified comments.
llvm-svn: 8670
2003-09-22 23:36:33 +00:00
Misha Brukman
26a7c3e066 Converted tabs to spaces.
llvm-svn: 8669
2003-09-22 23:35:54 +00:00
Misha Brukman
f49d1804d5 Materialize the module before releasing it.
llvm-svn: 8668
2003-09-22 23:35:23 +00:00
Chris Lattner
d6c9d2ca72 Add prototype
llvm-svn: 8640
2003-09-21 00:28:18 +00:00
Chris Lattner
b12a8a6177 Switch from using CallInst's to represent call sites to using the LLVM
CallSite class.  Now we can represent function calls by invoke instructions
too!

llvm-svn: 8629
2003-09-20 16:34:13 +00:00
Chris Lattner
d4de2760aa Rename Function::getEntryNode -> getEntryBlock
llvm-svn: 8625
2003-09-20 14:39:18 +00:00
Chris Lattner
6f06eb4eb3 Rename getEntryNode -> getEntryBlock()
llvm-svn: 8624
2003-09-20 14:36:49 +00:00
Chris Lattner
b64863a2f3 Cleanup header file
llvm-svn: 8622
2003-09-20 14:35:38 +00:00
Chris Lattner
bf7dd80e7c Expose the TCE pass
llvm-svn: 8619
2003-09-20 05:14:13 +00:00
Chris Lattner
dc73981ba4 Fix header, fix broken friend decl
llvm-svn: 8616
2003-09-20 03:34:44 +00:00
Chris Lattner
3e98c3aaeb Unsquishify
llvm-svn: 8612
2003-09-20 01:23:29 +00:00
Misha Brukman
fb31f22b76 Abstract interface for module providers, e.g. streaming bytecode reader.
llvm-svn: 8593
2003-09-18 16:16:32 +00:00
John Criswell
e1ccc5a286 In ExecWait(), made the child process exit if it can't execve() the new
program.
Added the use of const (which compiles and is hopefully correct).
Added comments.

llvm-svn: 8585
2003-09-17 19:02:49 +00:00
John Criswell
391b64574d Added the ExecWait() function.
llvm-svn: 8578
2003-09-17 15:14:25 +00:00
Chris Lattner
0d28d582e1 Add new deleteBody method
llvm-svn: 8571
2003-09-17 04:58:43 +00:00
Chris Lattner
2233d8b00a Do not segfault when the post-dominator tree is empty (ie, there are no return
or unwind instructions in the function)

llvm-svn: 8537
2003-09-15 15:47:40 +00:00
Chris Lattner
0c3066b0ae Add prototype for the lowersetjmp pass
llvm-svn: 8522
2003-09-15 05:05:23 +00:00
Chris Lattner
27fcbcd3a3 Get rid of the whole "Node2" business, rename getNode() ->getBlock() to
be more descriptive

llvm-svn: 8468
2003-09-11 16:25:06 +00:00
Chris Lattner
e7c33c0f65 Rework dominator and post dominator information so that we do not have to
unify all exit nodes of a function to compute post-dominance information.
This does not work with functions that have both unwind and return nodes,
because we cannot unify these blocks.  The new implementation is better
anyway. :)

llvm-svn: 8459
2003-09-10 20:36:51 +00:00
Chris Lattner
ee577bdc08 Expand the pass to unify all of the unwind blocks as well
llvm-svn: 8456
2003-09-10 20:34:51 +00:00
Brian Gaeke
7eaecc239a Make createVerifierPass return a FunctionPass *.
llvm-svn: 8449
2003-09-10 19:37:04 +00:00
Chris Lattner
dbca8de747 Fix spello
llvm-svn: 8432
2003-09-10 05:30:09 +00:00
Chris Lattner
58d4183a25 Fix spell-o's
llvm-svn: 8431
2003-09-10 05:29:43 +00:00
Chris Lattner
620f051422 Spelling fixes
llvm-svn: 8429
2003-09-10 05:24:09 +00:00
Chris Lattner
8c119fc9af Fix bug: InstCombine/2003-09-09-VolatileLoadElim.ll
Loads "mayWriteToMemory" if they are volatile

llvm-svn: 8422
2003-09-09 18:16:08 +00:00
Chris Lattner
4a708f1061 Eliminate the unwind intrinsic, it is now an instruction
llvm-svn: 8412
2003-09-08 19:44:47 +00:00
Chris Lattner
a1ae09f681 add support for the unwind inst
llvm-svn: 8406
2003-09-08 18:54:16 +00:00
Chris Lattner
3aeba4c6fc Add the unwind instruction class
llvm-svn: 8405
2003-09-08 18:54:09 +00:00
Chris Lattner
56bc7d4056 Add new unwind instruction. Happily there was a slot leftover from when the
'not' instruction was removed long ago

llvm-svn: 8404
2003-09-08 18:54:01 +00:00
Chris Lattner
2916eafa42 Add support for volatile loads/stores
llvm-svn: 8393
2003-09-08 17:45:59 +00:00
Brian Gaeke
83d2306098 No longer used
llvm-svn: 8374
2003-09-05 19:43:45 +00:00
Brian Gaeke
8e1bb0bcb2 Make getOperandValue and executeCastOperation methods of Interpreter.
This lets us protect a few more ExecutionEngine methods.

llvm-svn: 8367
2003-09-05 18:55:03 +00:00
Brian Gaeke
e157a77485 Make CreateArgv part of lli rather than part of ExecutionEngine.
Switch Interpreter and JIT's "run" methods to take a Function and a vector of
 GenericValues.
Move (almost all of) the stuff that constructs a canonical call to main()
 into lli (new methods "callAsMain", "makeStringVector").
Nuke getCurrentExecutablePath(), enableTracing(), getCurrentFunction(),
 isStopped(), and many dead decls from interpreter.
Add linux strdup() support to interpreter.
Make interpreter's atexit handler runner and JIT's runAtExitHandlers() look
 more alike, in preparation for refactoring.
atexit() is spelled "atexit", not "at_exit".

llvm-svn: 8366
2003-09-05 18:42:01 +00:00