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

989 Commits

Author SHA1 Message Date
Chris Lattner
9c390fa13f When printing out a function, make sure that local and global symbols
don't conflict.  This fixes Assembler/2004-12-05-LocalGlobalSymtabConflict.ll

llvm-svn: 18532
2004-12-05 06:44:09 +00:00
Chris Lattner
cdcd7126f1 Add a new method
llvm-svn: 18531
2004-12-05 06:43:27 +00:00
Alkis Evlogimenos
7202acacf7 Check if a block has a terminator first before calling front() on
it. If a block has a terminator then it is certainly non-empty so the
verifier will not crash on it.

llvm-svn: 18484
2004-12-04 02:30:42 +00:00
Alkis Evlogimenos
edf490b75e Make error msg reflect what exactly went wrong.
llvm-svn: 18478
2004-12-04 01:25:06 +00:00
Chris Lattner
08d8b2ecaa Get GEP's working with packed types. Contributed by Morten Ofstad!
llvm-svn: 18404
2004-12-01 17:12:16 +00:00
Chris Lattner
e561ef0261 Add method
llvm-svn: 18368
2004-11-30 02:51:53 +00:00
Chris Lattner
7647235f0f Fix test/Regression/CFrontend/2003-11-01-EmptyStructCrash.c
llvm-svn: 18115
2004-11-22 19:15:27 +00:00
Chris Lattner
d9770db639 Fix memory leaks, patch contributed by Morten Ofstad!
llvm-svn: 17999
2004-11-19 17:09:48 +00:00
Chris Lattner
7a2566c4ff Add hooks to free all memory allocated by the singleton factories in these
files.  Patch contributed by Morten Ofstad!

llvm-svn: 17995
2004-11-19 16:39:44 +00:00
Chris Lattner
a06c8cfe80 These methods are inlined
llvm-svn: 17958
2004-11-18 17:47:13 +00:00
Alkis Evlogimenos
b9e38d3cc5 Make ReturnInst accept a value of type void as the return value. The
ReturnInst constructed is the same as if NULL was passed instead of
the void value.

llvm-svn: 17923
2004-11-17 21:02:25 +00:00
Chris Lattner
5a2ce1faab Generalize this code to turn any cast-to-first-element-of into a gep constexpr
llvm-svn: 17914
2004-11-17 17:59:35 +00:00
Chris Lattner
4725ecbbd6 Minor cleanup and speedup. This reduces link-time for 252.eon from 35.5s
to 34.7s with a profile build.

llvm-svn: 17906
2004-11-16 20:39:04 +00:00
Chris Lattner
7fdc458443 Make this function work with non-abstract types.
llvm-svn: 17905
2004-11-16 20:30:53 +00:00
Misha Brukman
a3b5e5f569 Remove extra space char
llvm-svn: 17834
2004-11-15 19:30:05 +00:00
Reid Spencer
e51435be09 Moved to lib/Linker
llvm-svn: 17786
2004-11-14 22:15:31 +00:00
Misha Brukman
8d4e1d62dd GhostLinkage not allowed in LLVM AsmWriter, either
llvm-svn: 17751
2004-11-14 21:04:34 +00:00
Reid Spencer
7090e6a875 Stop propagating method names that violate the coding standard
llvm-svn: 17498
2004-11-05 22:15:36 +00:00
Misha Brukman
dba13ac3cb The Alpha (tm) intrinsics have never been used anywhere
llvm-svn: 17340
2004-10-29 18:43:17 +00:00
Alkis Evlogimenos
e88c2aaed7 Gep indices must be of int, uint, long or ulong type.
llvm-svn: 17313
2004-10-28 06:43:38 +00:00
Reid Spencer
d3f7233495 Change Library Names Not To Conflict With Others When Installed
llvm-svn: 17286
2004-10-27 23:18:45 +00:00
Chris Lattner
dd0094e4ed Convert 'struct' to 'class' in various places to adhere to the coding standards
and work better with VC++.  Patch contributed by Morten Ofstad!

llvm-svn: 17281
2004-10-27 16:14:51 +00:00
Alkis Evlogimenos
4c30220f3a Make this actually work.
llvm-svn: 17199
2004-10-24 03:02:16 +00:00
Alkis Evlogimenos
a893aad8fb Add ConstantExpr::getSizeOf(Type*).
llvm-svn: 17196
2004-10-24 01:41:10 +00:00
Reid Spencer
e48ba34fd4 We won't use automake
llvm-svn: 17155
2004-10-22 03:35:04 +00:00
Reid Spencer
ce514b1c2c Initial automake generated Makefile template
llvm-svn: 17136
2004-10-18 23:55:41 +00:00
Chris Lattner
c088680a5f fold gep undef, ... -> undef
This comes up many times in perlbmk and probably others.

llvm-svn: 17100
2004-10-17 21:54:55 +00:00
Chris Lattner
e5aa085c1d Fix constant folding relational operators with undef operands.
llvm-svn: 17077
2004-10-17 04:01:51 +00:00
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