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

961 Commits

Author SHA1 Message Date
Chris Lattner
8c86882a99 Implement constant folding of undef values.
llvm-svn: 17070
2004-10-16 23:31:32 +00:00
Chris Lattner
93bf5a8066 Add support for undef and unreachable
llvm-svn: 17041
2004-10-16 18:08:06 +00:00
Chris Lattner
8824a5ee1c Implement UndefValue class
llvm-svn: 17040
2004-10-16 18:07:16 +00:00
Chris Lattner
d3844cc216 Move the implementation of the instructions clone methods to this file so
that the vtables for these classes are only instantiated in this translation
unit, not in every xlation unit they are used.

llvm-svn: 17026
2004-10-15 23:52:53 +00:00
Misha Brukman
209f5ea32b Add a space between the type and name of value when printing error message
llvm-svn: 17022
2004-10-15 23:08:50 +00:00
Chris Lattner
44e34a155c Make sure any client of Dominators.h links in Dominators.cpp
Patch by Morten Ofstad

llvm-svn: 16987
2004-10-14 15:47:16 +00:00
Reid Spencer
e6418ec30f Update to reflect changes in Makefile rules.
llvm-svn: 16950
2004-10-13 11:46:52 +00:00
Chris Lattner
58435df175 Minor tweaks
llvm-svn: 16929
2004-10-12 04:32:37 +00:00
Chris Lattner
8428411c46 Implement a new method
llvm-svn: 16927
2004-10-12 04:20:25 +00:00
Chris Lattner
63ba63bb56 Allow creation of GEP constantexprs with a vector of value* operands as
well as a vector of constant*'s.  It turns out that this is more efficient
and all of the clients want to do that, so we should cater to them.

llvm-svn: 16923
2004-10-11 22:52:25 +00:00
Chris Lattner
6496308d18 Implement remove/eraseFromParent methods
llvm-svn: 16922
2004-10-11 22:21:39 +00:00
Chris Lattner
f8380b953a If we are trying to create a ConstantExpr cast that is really a GEP to the
first element of an array, return a GEP instead of a cast.  This allows us
to transparently fold this:

int* getelementptr (int* cast ([100 x int]* %Gbody to int*), int 40)

into this:

int* getelementptr ([100 x int]* %Gbody, int 0, int 40)

llvm-svn: 16911
2004-10-11 03:57:30 +00:00
Reid Spencer
1b7459b29d Initial version of automake Makefile.am file.
llvm-svn: 16893
2004-10-10 22:20:40 +00:00
Chris Lattner
50e55bcdb0 Unfortunately the fix for the previous bug introduced the previous
exponential behavior (bork!).  This patch processes stuff with an
explicit SCC finder, allowing the algorithm to be more clear,
efficient, and also (as a bonus) correct!  This gets us back to taking
0.6s to disassemble my horrible .bc file that previously took something
> 30 mins.

llvm-svn: 16811
2004-10-07 19:20:48 +00:00
Chris Lattner
dfdbd62d37 Fix a bug in my previous change. Unfortunately this reverts most of the
speedup, but has the advantage of not breaking a bunch of programs!

llvm-svn: 16806
2004-10-07 16:19:40 +00:00
Chris Lattner
c2563bf614 Change Type::isAbstract to have better comments, a more correct name
(PromoteAbstractToConcrete), and to use a set to avoid recomputation.
In particular, this set eliminates the potentially exponential cases
from this little recursive algorithm.

On a particularly nasty testcase, llvm-dis on the .bc file went from 34
minutes (which is when I killed it, it still hadn't finished) to 0.57s.
Remember kids, exponential algorithms are bad.

llvm-svn: 16772
2004-10-06 16:36:46 +00:00
Chris Lattner
6023408a6e Make sure the const bit gets inherited correctly when linking declarations
of disagreeing constness.  This fixes
test/Regression/Linker/ConstantGlobals[123].ll

llvm-svn: 16692
2004-10-05 02:28:11 +00:00
Chris Lattner
7af052f5c8 Make sure to check select instructions for generic instruction properties
llvm-svn: 16597
2004-09-29 21:19:28 +00:00
Chris Lattner
da5c635143 Don't use DominatorSet::dominates for intra-block instruction dom checks.
This method is linear time in the size of the basic block, which is very
bad for large basic blocks.  On the Assembler/2004-09-29-VerifierIsReallySlow.llx
testcase, the verifier changes from taking 50s to 0.23s with this patch.

llvm-svn: 16593
2004-09-29 20:07:45 +00:00
Chris Lattner
43c0372c0b 'Pass' should now not be derived from by clients. Instead, they should derive
from ModulePass.  Instead of implementing Pass::run, then should implement
ModulePass::runOnModule.

llvm-svn: 16436
2004-09-20 04:48:05 +00:00
Chris Lattner
3acc541d97 'Pass' should now not be derived from by clients. Instead, they should derive
from ModulePass.  Instead of implementing Pass::run, then should implement
ModulePass::runOnModule.

Also, fix some undefined behavior, expecting | on booleans to evaluate
left-to-right.

llvm-svn: 16435
2004-09-20 04:47:19 +00:00
Alkis Evlogimenos
95075646ab When creating constant arrays check that the initializer vector is the
same size as the one in the array type.

llvm-svn: 16354
2004-09-15 02:32:15 +00:00
Reid Spencer
7bd9d86b65 Okay, the list of link-time passes wasn't such a hot idea. Its prone to
error. We'll strategize on this when we have multiple front ends to deal
with. For now llvm-ld just runs a standard set of transforms.

llvm-svn: 16333
2004-09-14 05:43:23 +00:00
Chris Lattner
99d5ceac0d Don't print newlines between passes in the pass list.
Note to self: sentences end with ".", not "...".
Note to reid: sentences end with ".", not "".   :)

llvm-svn: 16332
2004-09-14 05:06:58 +00:00
Chris Lattner
c131f05ebb Don't print newlines between each library in the deplibs list.
llvm-svn: 16331
2004-09-14 04:51:44 +00:00
Reid Spencer
4a1593ebd2 Add support for the link-time pass list to Modules.
llvm-svn: 16321
2004-09-13 23:44:23 +00:00
Reid Spencer
870976f573 Implement support for dependent libraries. The "source" module's dependent
libraries list is merged into the "destination" module's list. Also, if the
source module is one of the dependent libraries, it is removed from the
list.

llvm-svn: 16282
2004-09-11 04:25:17 +00:00
Alkis Evlogimenos
04207a7cf6 Add assertion descriptiosn on type mismatches when creating
ConstantArray and ConstantPacked objects.

llvm-svn: 16261
2004-09-10 04:16:59 +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
Reid Spencer
0c3bada696 Add an assert to cature null Operands. It is better to catch it here than
to SIGSEGV in the bowels of isa<...> later.

llvm-svn: 16098
2004-08-29 19:37:59 +00:00
Reid Spencer
1605d22f77 Give the -time-passes tool option a global storage location so that its
value can be discovered by the various LLVM tools.

llvm-svn: 16032
2004-08-24 17:52:35 +00:00
Chris Lattner
aa175129ea Fix a nasty bug that Nate ran into. In particular, instead of emitting a 2+MB
error message, print out:

llvm-link: error linking in 'g.2.rbc': Global Variable Collision on
' %struct.D_Reduction* %d_reduction_10_gram' - External linkage globals have
different initializers

That's a bit more concise, huh?

llvm-svn: 15958
2004-08-21 00:50:59 +00:00
Reid Spencer
448910c216 Fix a bug found exposed by: Regression/Other/2004-08-20-PackedControlFlow.ll
Packed types need to be allowed in type statements too.

Patch provided by Brad Jones.

llvm-svn: 15953
2004-08-20 15:37:30 +00:00
Brian Gaeke
01636f4e0f Packed types, brought to you by Brad Jones
llvm-svn: 15938
2004-08-20 06:00:58 +00:00
Chris Lattner
5b69d2d1b5 Check constant expression validity more strictly
llvm-svn: 15883
2004-08-17 17:28:46 +00:00
Chris Lattner
a54012917a Allow an arbitrary prefix
llvm-svn: 15865
2004-08-17 06:06:54 +00:00
Misha Brukman
7c32d35f9e Move these files (which are dependent on VMCore) into VMCore
llvm-svn: 15825
2004-08-16 19:04:36 +00:00
Reid Spencer
b9ab0ef60d Fix PR422.
Ouch! Changes in the lazy initialization code caused each incorporated
function to reprocess the entire function on every lookup of a value's
slot number. This caused a horrible slowdown in all functions. This
fix made llvm-dis go from "longer than I care to wait" (minutes) on a large
test case to 0.53 seconds.

llvm-svn: 15818
2004-08-16 07:46:33 +00:00
Alkis Evlogimenos
c1754b874d Split assertion to two in order to give better assertion messages.
llvm-svn: 15543
2004-08-06 14:33:37 +00:00
Alkis Evlogimenos
8fb6d20345 Make GlobalVariable constructor assert when an initializer is of
incorrect type.

llvm-svn: 15519
2004-08-05 11:28:34 +00:00
Chris Lattner
a36473bd83 Fix another minor problem that exists if you ahve multiple functions with
nonunifiable types but the same name.  Down with PR411!

llvm-svn: 15511
2004-08-04 22:39:54 +00:00
Chris Lattner
a359f9e730 Fix a typeo
llvm-svn: 15510
2004-08-04 22:29:05 +00:00
Chris Lattner
b22ba044c1 Add a hack to work around a problem my changes exposed
llvm-svn: 15509
2004-08-04 22:26:13 +00:00
Chris Lattner
4107bfcf9b Fix a latent bug exposed by my recent changes
llvm-svn: 15498
2004-08-04 18:50:09 +00:00
Chris Lattner
586734c438 Fix a major regression in my previous checkin
llvm-svn: 15486
2004-08-04 08:30:43 +00:00
Alkis Evlogimenos
bdd0467a1e Stop using getValues().
llvm-svn: 15485
2004-08-04 08:08:13 +00:00
Alkis Evlogimenos
72232b4a01 Stop using getValues().
llvm-svn: 15482
2004-08-04 08:02:59 +00:00
Chris Lattner
3f4d9ffde5 FindGlobalNamed used to take 2.92s out of 8.39s running a profile build of
gccld -disable-opt on 252.eon.

This patch deletes it and replaces it with a map.  The proper fix for this
is to fix PR411, but this will do in the short term.

gccld on eon now takes 5.51s, which is 50% faster than before this patch. :)

llvm-svn: 15480
2004-08-04 07:44:58 +00:00
Chris Lattner
f140ae0851 I swear I compiled this, really I did.
llvm-svn: 15467
2004-08-04 07:28:06 +00:00
Chris Lattner
5cc9a6fda7 Factor some code out, no substantial change.
llvm-svn: 15466
2004-08-04 07:05:54 +00:00