Commit Graph

10324 Commits

Author SHA1 Message Date
Chris Lattner cbd34b2ae6 Now that all of the derived types have disciplined interfaces, we can eliminate
all of the ad-hoc storage of contained types.  This allows getContainedType to
not be virtual, and allows us to entirely delete the TypeIterator class.

llvm-svn: 11230
2004-02-09 05:40:24 +00:00
Chris Lattner e3af6f73ce Don't depend on auto data conversion
llvm-svn: 11229
2004-02-09 05:16:30 +00:00
Chris Lattner ac6db755c3 Adjust to the changed StructType interface. In particular, getElementTypes() is gone.
llvm-svn: 11228
2004-02-09 04:37:31 +00:00
Chris Lattner 4da68e2d7b Increase encapsulation of the StructType class, eliminating the getElementTypes() member
llvm-svn: 11227
2004-02-09 04:36:50 +00:00
Chris Lattner 66aef96171 Method is gone
llvm-svn: 11226
2004-02-09 04:14:46 +00:00
Chris Lattner fa829be4d3 Start using the new and improve interface to FunctionType arguments
llvm-svn: 11224
2004-02-09 04:14:01 +00:00
Chris Lattner f5a4e33e49 Improve encapsulation in the FunctionType class, by adding param_(iterator/begin/end)
members, and eliminating the getParamTypes() method, and the associated typedef.

llvm-svn: 11223
2004-02-09 04:12:57 +00:00
Chris Lattner a9634a0ee3 This #include is not needed, it should have been removed with the last patch
llvm-svn: 11222
2004-02-09 03:22:32 +00:00
Chris Lattner 3cb4167b26 Instead of searching the entire type graph for a type to determine if it
contains the type we are looking for, just search the immediately used types.
We can only do this because we keep the "current" type in the nesting level
as we decrement upreferences.

This change speeds up the testcase in PR224 from 50.4s to 22.08s, not
too shabby.

llvm-svn: 11221
2004-02-09 03:19:29 +00:00
Chris Lattner a263b85fe6 Upreferences are always OpaqueTypes, meaning that it is impossible for a non-abstract
type from containing one.  This speeds up the asmparser on the testcase in PR224 from
61->50s.

llvm-svn: 11220
2004-02-09 03:03:10 +00:00
Chris Lattner 80cbed4f61 Another nice speedup for the register allocator. This time, we replace
the Virt2PhysRegMap std::map with an std::vector.  This speeds up the
register allocator another (almost) 40%, from .72->.45s in a release build
of LLC on 253.perlbmk.

llvm-svn: 11219
2004-02-09 02:12:04 +00:00
Chris Lattner 56f9b190e1 Add a new (hidden) option that is useful for profiling.
llvm-svn: 11218
2004-02-09 01:47:10 +00:00
Chris Lattner bbd9a43d20 Ugh, perform an optimization that GCC should be able to do itself. This
speeds up livevar from .48/.32s -> .45/.31s in LLC on perlbmk

llvm-svn: 11217
2004-02-09 01:43:23 +00:00
Chris Lattner 26407384ec Only do stuff for the REAL number of physical registers we have, not 1024.
This speeds up live variables a lot, from .60/.39s -> .47/.26s in LLC, for
the first/second pass respectively.

llvm-svn: 11216
2004-02-09 01:35:21 +00:00
Chris Lattner 490627a404 Change the PhysRegsUsed map into a dense array. Seeing that this is a mapping
from physical registers, and they are always dense, it makes sense to not have
a ton of RBtree overhead.  This change speeds up regalloclocal about ~30% on
253.perlbmk, from .35s -> .27s in the JIT (in LLC, it goes from .74 -> .55).

Now live variable analysis is the slowest codegen pass.  Of course it doesn't
help that we have to run it twice, because regalloclocal doesn't update it,
but even if it did it would be the slowest pass (now it's just the 2x slowest
pass :(

llvm-svn: 11215
2004-02-09 01:26:13 +00:00
Chris Lattner 2eaf58775e Two problems with these lines of code:
1. The "work" was not in the assert, so it was punishing the optimized release
 2. getNamedFunction is _very_ expensive in large programs.  It is not designed
    to be used like this, and was taking 7% of the execution time of the code
    generator on perlbmk.

Since the assert "can never fail", I'm just killing it.

llvm-svn: 11214
2004-02-09 00:59:07 +00:00
Chris Lattner 57ea2e3294 The ConstantExpr::getCast call can cause a CPR to be generated. If so,
strip it off.

llvm-svn: 11213
2004-02-09 00:20:55 +00:00
Chris Lattner 5b6892e37c Fix PR215: [bcwriter] Problem compactifying ConstantPointerRefs
Have I ever mentioned how much I _hate_ constantpointerrefs?

llvm-svn: 11212
2004-02-09 00:15:41 +00:00
Misha Brukman 3480e935d0 Fix grammar-o.
llvm-svn: 11210
2004-02-08 22:27:33 +00:00
Chris Lattner c5b7b24949 All of spec, including 253.perlbmk should now work. There is still the 254.gap
regression, but that will definitely be fixed by 1.2

llvm-svn: 11209
2004-02-08 22:23:33 +00:00
Chris Lattner 3b7f6b2217 Improve compatibility with programs that already have a prototype for 'write',
even if it is wierd in some way.

llvm-svn: 11207
2004-02-08 22:14:44 +00:00
Chris Lattner 85195147e1 vi failed me again. :)
llvm-svn: 11206
2004-02-08 21:52:30 +00:00
Chris Lattner 144f0efd4c Rename the invoke 'except' destination to the 'unwind' destination
llvm-svn: 11205
2004-02-08 21:52:04 +00:00
Chris Lattner 17235712fb Change the 'exception' destination to the 'unwind' destination. We will always
allow 'except' instead of 'unwind' here though.

llvm-svn: 11203
2004-02-08 21:48:25 +00:00
Chris Lattner fae8ab3088 rename the "exceptional" destination of an invoke instruction to the 'unwind' dest
llvm-svn: 11202
2004-02-08 21:44:31 +00:00
Chris Lattner 35630adf54 Add new bug, add note about llvm-db
llvm-svn: 11201
2004-02-08 21:20:42 +00:00
Chris Lattner 56997dd283 Fix PR225: [pruneeh] -pruneeh pass removes invoke instructions it shouldn't
llvm-svn: 11200
2004-02-08 21:15:59 +00:00
Chris Lattner 071bc60450 splitBasicBlock "does the right thing" now, no reason to reposition it.
llvm-svn: 11199
2004-02-08 20:49:07 +00:00
Chris Lattner 50ceee1ead Bug fixed
llvm-svn: 11198
2004-02-08 19:59:05 +00:00
Chris Lattner 108cadc274 Implement proper invoke/unwind lowering.
This fixed PR16 "[lowerinvoke] The -lowerinvoke pass does not insert calls to setjmp/longjmp"

llvm-svn: 11195
2004-02-08 19:53:56 +00:00
Chris Lattner 8a9da302a8 New testcase, code generators should support invoke/unwind
llvm-svn: 11192
2004-02-08 19:40:58 +00:00
Chris Lattner dc631735e6 Print out all globals as they are emitted, not just those emitted from
emitGlobals

llvm-svn: 11191
2004-02-08 19:33:23 +00:00
Chris Lattner 6604615a16 There is no reason to #define fd
llvm-svn: 11190
2004-02-08 19:33:07 +00:00
Brian Gaeke d7b895a0c5 add pr105
llvm-svn: 11189
2004-02-08 18:49:13 +00:00
Brian Gaeke 3e666c1897 Fix unterminated-quote typo in echo command
llvm-svn: 11188
2004-02-08 08:01:00 +00:00
Brian Gaeke 8613f13cc3 Document automake as a build dependency because we use aclocal
llvm-svn: 11187
2004-02-08 07:49:04 +00:00
Brian Gaeke b921039ee9 Move rules for regenerating autoconf files into this shell script.
llvm-svn: 11186
2004-02-08 07:44:48 +00:00
Brian Gaeke 4f99c4f75f Remove rules for autoconf'ing files from top-level Makefile
llvm-svn: 11185
2004-02-08 07:44:30 +00:00
Chris Lattner 476488e669 Add a call to 'write' right before the call to abort() in the unwind path.
This causes the JIT, or LLC'd program to print out a nice message, explaining
WHY the program aborted.

llvm-svn: 11184
2004-02-08 07:30:29 +00:00
Brian Gaeke d97d8faa17 Fix indentation of selectiondag.
I don't know why its indentation has been bugging me, but it has.

llvm-svn: 11180
2004-02-08 05:49:29 +00:00
Chris Lattner fa616e14fc Add one that I missed
llvm-svn: 11179
2004-02-08 01:53:10 +00:00
Chris Lattner 9ab85275ef Instead of callign removeTriviallyDeadNodes on the global graph every time
removeDeadNodes is called, only call it at the end of the pass being run.
This saves 1.3 seconds running DSA on 177.mesa (5.3->4.0s), which is
pretty big.  This is only possible because of the automatic garbage
collection done on forwarding nodes.

llvm-svn: 11178
2004-02-08 01:51:48 +00:00
Chris Lattner e1531f3eb1 Remove another unneeded call.
llvm-svn: 11177
2004-02-08 01:40:40 +00:00
Chris Lattner 985282c78e This call is no longer needed now that merging does not produce garbage
llvm-svn: 11176
2004-02-08 01:38:34 +00:00
Chris Lattner b0f32183e4 Substantially improve the DSA code by removing 'forwarding' nodes from
DSGraphs while they are forwarding.  When the last reference to the forwarding
node is dropped, the forwarding node is autodeleted.  This should simplify
removeTriviallyDead nodes, and is only (efficiently) possible because we are
using an ilist of dsnodes now.

llvm-svn: 11175
2004-02-08 01:27:18 +00:00
Chris Lattner 5592af7927 Bugfix for ilist conversion. The ilist wants to make an 'end' node which has
G == 0

llvm-svn: 11174
2004-02-08 01:05:37 +00:00
Chris Lattner f3861ce4f6 Switch the Nodes list from being an std::vector<DSNode*> to an ilist<DSNode>
llvm-svn: 11173
2004-02-08 00:53:26 +00:00
Chris Lattner 74a99554d1 One of the 'annoying' things about ilists is that the iterators don't behave
quite the same as for non-intrusive lists of pointers to nodes.  To support
transitioning code bases, add a new 'compatibility' iterator.

llvm-svn: 11172
2004-02-08 00:51:31 +00:00
Chris Lattner bd16efb88f Change to use node_iterators instead of direct access to Nodes
llvm-svn: 11171
2004-02-08 00:23:16 +00:00
Chris Lattner d9a063c9a2 Change to use iterators instead of direct access
llvm-svn: 11170
2004-02-08 00:22:41 +00:00