1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 19:42:54 +02:00
Commit Graph

5306 Commits

Author SHA1 Message Date
Chris Lattner
c9900e2eb3 Make sure to register the 'no profile' implementation as the default for ProfileInfo
llvm-svn: 11309
2004-02-11 04:47:54 +00:00
Chris Lattner
f8077b7801 Simplify implementation, and probably speed things up too.
llvm-svn: 11308
2004-02-11 03:57:16 +00:00
Chris Lattner
4418633216 Implement SimplifyCFG/PhiEliminate.ll
Having a proper 'select' instruction would allow the elimination of a lot
of the special case cruft in this patch, but we don't have one yet.

llvm-svn: 11307
2004-02-11 03:36:04 +00:00
Chris Lattner
ceb4bfebcc Initialize the count instance variable.
llvm-svn: 11305
2004-02-11 03:29:16 +00:00
Chris Lattner
ea85b486f1 Expose the "Other" value type to tablegen targets
llvm-svn: 11304
2004-02-11 03:08:45 +00:00
Chris Lattner
43553da3a0 Remove obsolete method
llvm-svn: 11302
2004-02-11 01:17:33 +00:00
Chris Lattner
754914b142 The hasConstantReferences predicate always returns false.
llvm-svn: 11301
2004-02-11 01:17:07 +00:00
Chris Lattner
a81258a786 An initial implementation of an LLVM ProfileInfo class which is designed to
eventually allow Passes to use profiling information to direct them.

llvm-svn: 11294
2004-02-10 22:11:42 +00:00
Chris Lattner
db2c8941a5 Add #include
llvm-svn: 11285
2004-02-10 21:18:55 +00:00
Chris Lattner
37e040ee03 Do not use MachineOperand::isVirtualRegister either!
llvm-svn: 11283
2004-02-10 21:12:22 +00:00
Chris Lattner
d64519766e Stop using this method
llvm-svn: 11282
2004-02-10 21:12:06 +00:00
Chris Lattner
c9f1da7374 Remove uses of MachineOperand::isVirtualRegister
llvm-svn: 11281
2004-02-10 20:55:47 +00:00
Chris Lattner
0d6d4075e3 Remvoe use of MO.isVirtualRegister(), turn an assertion into an assert()
llvm-svn: 11280
2004-02-10 20:47:24 +00:00
Chris Lattner
9d0a4e63b1 Eliminate users of MachineOperand::isPhysicalRegister
llvm-svn: 11278
2004-02-10 20:41:10 +00:00
Chris Lattner
6fb75586ba Remove use of isPhysicalRegister
llvm-svn: 11277
2004-02-10 20:35:42 +00:00
Chris Lattner
d58b38eeca Don't use MachineOperator::is(Phys|Virt)Register
llvm-svn: 11276
2004-02-10 20:31:28 +00:00
Chris Lattner
421302bc54 Tighten up checks
llvm-svn: 11274
2004-02-10 20:25:13 +00:00
Chris Lattner
d2c679e5f6 initialization calls now return argc. If the program uses the argc value
passed into main, make sure they use the return value of the init call
instead of the one passed in.

llvm-svn: 11262
2004-02-10 17:41:01 +00:00
Chris Lattner
a62e6a4952 Fix PR228: [sparc] Boolean constants are emitted as true and false
I will observe that the concept of using WriteAsOperand is completely broken,
but then we all knew that, didn't we?

llvm-svn: 11255
2004-02-10 05:16:44 +00:00
Misha Brukman
ac167832e7 Doxygenify comments.
llvm-svn: 11252
2004-02-09 23:18:42 +00:00
Chris Lattner
e961c1189f Only add the global variable with the abort message if an unwind actually
occurs in the program.

llvm-svn: 11249
2004-02-09 22:48:47 +00:00
John Criswell
c1fa74809a Fix PR#226: When emitting padding, always emit it as bytes. Bytes can be
placed into any alignment situation.

llvm-svn: 11247
2004-02-09 22:15:33 +00:00
Chris Lattner
034a264a99 It turns out that the two dimensional vectors were causing big slowdowns
in this for programs with lots of types (like the testcase in PR224).
The problem was that the type ID that the outer vector was using was not
very dense (as many types are getting resolved), so the vector is large
and gets reallocated a lot.

Since there are a lot of values in the program (the .ll file is 10M),
each reallocation has to copy the subvectors, which is also quite slow
(this wouldn't be a problem if C++ supported move semantics, but it
doesn't, at least not yet :(

Changing the outer data structure to a map speeds a release build of
llvm-as up from 11.21s to 5.13s on the testcase in PR224.

llvm-svn: 11244
2004-02-09 21:03:38 +00:00
Chris Lattner
ef4a05f780 Remove the statistics
llvm-svn: 11243
2004-02-09 21:01:23 +00:00
Chris Lattner
6deb7ad03b Speed up type resolution some more. On the testcase in PR224, for example,
this speeds up a release llvm-as from 21.95s to 11.21s, because before it
would do an expensive traversal of the type-graph of every type resolved.

llvm-svn: 11242
2004-02-09 20:23:44 +00:00
Chris Lattner
7eb118e4f7 When resolving upreferences, if multiple uprefs will be resolved to the same
type at the same time, resolve the upreferences to each other before resolving
it to the outer type.  This shaves off some time from the testcase in PR224, from
25.41s -> 21.72s.

llvm-svn: 11241
2004-02-09 18:53:54 +00:00
Brian Gaeke
c86ce8b134 Move InstrSchedule's iterator begin/end methods inline.
llvm-svn: 11239
2004-02-09 18:42:46 +00:00
Brian Gaeke
60268b265f Make SchedGraph::dump() use SchedGraphNodeCommon's const_iterator
instead of randomly groping about inside its outEdges array.
Make SchedGraph::addDummyEdges() use getNumOutEdges() instead of
outEdges.size().
Get rid of ifdefed-out code in SchedGraph::buildGraph().

llvm-svn: 11238
2004-02-09 18:42:05 +00:00
Chris Lattner
f7f7d11eac Implement the hashing scheme in an attempt to speed up the "slow" case in
type resolution.  Unfortunately it doesn't help.

Also delete some dead debugging code.

llvm-svn: 11237
2004-02-09 18:32:40 +00:00
Chris Lattner
ada23acba4 This debugging hook is no longer needed.
llvm-svn: 11233
2004-02-09 17:20:52 +00:00
Chris Lattner
57a6b877ba Code cleanup in preparation for later changes. Now that ContainedTy's are
consistent across the various type classes, we can factor out a LOT more
almost-identical code.  Also, add a couple of temporary statistics.

llvm-svn: 11232
2004-02-09 16:35:14 +00:00
Chris Lattner
f231cb60f4 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
255269e677 Don't depend on auto data conversion
llvm-svn: 11229
2004-02-09 05:16:30 +00:00
Chris Lattner
16690fad3d Adjust to the changed StructType interface. In particular, getElementTypes() is gone.
llvm-svn: 11228
2004-02-09 04:37:31 +00:00
Chris Lattner
a1757d1d91 Start using the new and improve interface to FunctionType arguments
llvm-svn: 11224
2004-02-09 04:14:01 +00:00
Chris Lattner
2b3eaf045b 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
76292e7fcc 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
645f8fb4e5 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
95c21b04da 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
8e4aa43710 Add a new (hidden) option that is useful for profiling.
llvm-svn: 11218
2004-02-09 01:47:10 +00:00
Chris Lattner
9fb6056f1f 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
b665065e6d 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
c49e77cecd 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
b771939ef3 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
6ef23e7e64 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
9523c4de75 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
58ca173834 Fix grammar-o.
llvm-svn: 11210
2004-02-08 22:27:33 +00:00
Chris Lattner
a9887d33e8 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
a9a34f9d82 vi failed me again. :)
llvm-svn: 11206
2004-02-08 21:52:30 +00:00
Chris Lattner
2878b11cfc Rename the invoke 'except' destination to the 'unwind' destination
llvm-svn: 11205
2004-02-08 21:52:04 +00:00