Chris Lattner
06a5b2acff
Bugfix for etforest updating. Contributed by Daniel Berlin.
...
llvm-svn: 25152
2006-01-09 07:58:01 +00:00
Reid Spencer
1c717326d9
Saem Ghani's PassManager Patch #8 :
...
This fixes a "gccass" regression. The -debug-pass=Structure option now
prints all the appropriate output
llvm-svn: 25151
2006-01-08 22:57:07 +00:00
Chris Lattner
84a9d11b28
Initial implementation of the ET-Forest data structure for dominators and
...
post-dominators. This code was written/adapted by Daniel Berlin!
llvm-svn: 25144
2006-01-08 08:22:18 +00:00
Chris Lattner
8d84170fb5
Patch #7 from Saem:
...
"added the asserts and casts, fixed the comments and started the break
down of the larger methods. A few more patches and the breakdown
should be complete."
llvm-svn: 25142
2006-01-07 23:16:58 +00:00
Chris Lattner
ee327e57d2
Implement a few symbolic constant folding things. X ? Y : Y is Y.
...
Fold:
seteq ({ short }* cast (int 1 to { short }*), { short }* null)
setlt ({ short }* cast (int 1 to { short }*), { short }* cast (int 2 to { short }*))
to false/true. These last two commonly occur in the output of compilers that
tag integers, like cozmic's scheme compiler.
Tested by Regression/Assembler/ConstantExprFold.llx
llvm-svn: 25112
2006-01-05 07:49:30 +00:00
Chris Lattner
253796d43f
fix some formatting problems
...
llvm-svn: 25110
2006-01-05 07:19:51 +00:00
Chris Lattner
064e45054a
Patch #6 's in Saem's refactor-the-passmanager patch series. From him:
...
This sanitises the world, blows away the specialisations and adds
traits per passmanager type -- seemed most natural.
llvm-svn: 25085
2006-01-04 07:47:13 +00:00
Chris Lattner
586eae6b9a
Saem's patch #5 of the passmanager refactoring
...
llvm-svn: 25078
2006-01-04 05:02:04 +00:00
Chris Lattner
76bf19b0d5
patch #4 in Saem's passmanager refactoring.
...
llvm-svn: 25077
2006-01-04 04:36:11 +00:00
Chris Lattner
cbb7c27b51
implement constant folding of ==/!= on constant packed, simplify some code.
...
llvm-svn: 25074
2006-01-04 02:20:54 +00:00
Chris Lattner
00a5bdbb95
implement constant folding for the element-wise binary operations
...
llvm-svn: 25073
2006-01-04 02:15:02 +00:00
Chris Lattner
fffcbfffa6
don't crash when trying to constant fold packed expressions.
...
llvm-svn: 25072
2006-01-04 02:03:29 +00:00
Chris Lattner
291f009018
Fix an assertion to allow constant folding of packed values
...
llvm-svn: 25071
2006-01-04 01:01:04 +00:00
Chris Lattner
9be3d76ec9
silence some warnings
...
llvm-svn: 25066
2006-01-03 17:52:18 +00:00
Chris Lattner
4a422e2218
Finally commit Saem's 'patch #3 ' to refactor the pass manager
...
llvm-svn: 25063
2006-01-03 07:05:17 +00:00
Chris Lattner
a04fb40243
Patch #1 of Saem Ghani's Pass Manager refactoring. From the man:
...
"All this should do is create what will eventually be the specialised
passmanagers. Currently, the templates are inheriting them, once the
template specialisations' methods have been absorbed, patches
submitted method by method. I'll nuke the specialisations and have
the new objects inherit directly from passmanagert, and sanitise the
world of all references to templates.
"
llvm-svn: 25053
2005-12-30 20:00:46 +00:00
Duraid Madina
07a3df77d0
more HP-UX cleanliness
...
llvm-svn: 25015
2005-12-26 08:35:06 +00:00
Reid Spencer
63a1f99627
Revert previous patch. Additional tests fail.
...
llvm-svn: 24968
2005-12-22 21:46:37 +00:00
Reid Spencer
56825ced86
Fix PR409:
...
Implement the suggested check to ensure that out-of-range float constants
don't get accepted by LLVM accidentally. Adjust the supporting test cases
as well.
llvm-svn: 24963
2005-12-22 21:07:29 +00:00
Chris Lattner
d51de8d76f
Get logical operations to like packed types, allow BinOp::getNot to create
...
the right vector of -1's as its operand.
llvm-svn: 24906
2005-12-21 18:22:19 +00:00
Chris Lattner
8e01c48256
Add a flag to Module::getGlobalVariable to allow it to return vars with
...
internal linkage.
Patch provided by Evan Jones, thanks!
llvm-svn: 24604
2005-12-05 05:30:21 +00:00
Chris Lattner
48ddf6d833
This requires proper dominance
...
llvm-svn: 24408
2005-11-18 07:27:53 +00:00
Chris Lattner
d69b86453a
* Fix DerivedType::dropAllTypeUses to not change the number of types in a
...
type when it gets refined. This allows us to hash on this crucial value.
* Fix several issues in TypeMap::RefineAbstractType that prevent it from
handling hash values that change correctly.
* Define hashTypeStructure to not always return 0. :)
This last part (which depends on the first two) speeds up gccld time on eon
from 3.78s to 2.75s with a release build (a 28% speedup!). This resolves
PR474.
llvm-svn: 24372
2005-11-16 06:09:47 +00:00
Chris Lattner
f7a530046f
Fix handling of multiple unnamed globals with the same type
...
llvm-svn: 24362
2005-11-15 01:32:03 +00:00
Chris Lattner
5cafdc4edc
Add some dummy method impls
...
llvm-svn: 24345
2005-11-13 03:26:33 +00:00
Chris Lattner
4584142363
Move some methods around. Refactor the parts of TypeMap that do not depend
...
on its template arguments into a base class so that the code isn't duplicated
5 times.
llvm-svn: 24343
2005-11-13 03:14:09 +00:00
Chris Lattner
150cfb2968
Split the type refinement case completely out of the type-becomes-concrete
...
case, simplifying the code.
llvm-svn: 24340
2005-11-13 01:58:06 +00:00
Chris Lattner
6e3f8ee849
Separate the type-became-concrete case from the type-is-resolved case, the
...
former of which takes much less work than the later. This speeds up linking
eon from 3.749 to 3.637s with a release build (about 3%).
llvm-svn: 24338
2005-11-13 01:27:50 +00:00
Chris Lattner
cda6fc6409
Unswitch a loop, add more assertions, eliminate use of removeUserFromConcrete.
...
llvm-svn: 24324
2005-11-12 08:39:48 +00:00
Chris Lattner
2d82c5ba58
Tiny speedup, improve comments and code organization.
...
llvm-svn: 24323
2005-11-12 08:22:41 +00:00
Chris Lattner
5b42a5ea1a
print section info
...
llvm-svn: 24313
2005-11-12 00:10:19 +00:00
Andrew Lenharth
dca2f13e76
continued readcyclecounter support
...
llvm-svn: 24300
2005-11-11 16:47:30 +00:00
Chris Lattner
77c3b97f5d
Fix the optimized code handling of user asm strings
...
llvm-svn: 24296
2005-11-10 23:24:26 +00:00
Chris Lattner
32a3905ffc
speedup the common case where nothing needs to be quoted
...
llvm-svn: 24294
2005-11-10 21:47:01 +00:00
Chris Lattner
8dfe3bb6be
Allow per-character control over what target assemblers allow in symbol
...
names. This also changes the default to allow all of "$_." in addition
to letters and numbers as symbol names. If you don't want this, use
markCharUnacceptable to remove one of these or markCharAcceptable to add
to the set. This corresponds with what GAS accepts by default.
Also, this includes some minor speedups
llvm-svn: 24293
2005-11-10 21:40:01 +00:00
Chris Lattner
2ba7f5a64d
Add a new option for targets that accept quoted labels.
...
llvm-svn: 24283
2005-11-10 19:30:07 +00:00
Chris Lattner
6b9d854bad
remove the M instance var
...
llvm-svn: 24281
2005-11-10 19:02:18 +00:00
Chris Lattner
6e7e5fab70
Make this more efficient of the common case where we are only mangling globals.
...
Do not mangle internal global names that do not collide with anything.
This gives us strings that now look like this:
__2E_str_1: ; '.str_1'
.asciz "foo"
instead of this:
l1__2E_str_1: ; '.str_1'
.asciz "foo"
llvm-svn: 24277
2005-11-10 18:48:58 +00:00
Chris Lattner
6a14d020a3
Force packed vectors to be a power of two in length.
...
llvm-svn: 24264
2005-11-10 01:40:59 +00:00
Chris Lattner
6991a6f23f
print alignment info for globals and functions
...
llvm-svn: 24212
2005-11-06 06:48:53 +00:00
Chris Lattner
c6ef0112c0
verify that alignments are always a power of 2
...
llvm-svn: 24200
2005-11-05 21:57:54 +00:00
Chris Lattner
8eee9a6234
fix printing the alignment directive
...
llvm-svn: 24197
2005-11-05 21:20:34 +00:00
Nate Begeman
f299b9fb03
Add support alignment of allocation instructions.
...
Add support for specifying alignment and size of setjmp jmpbufs.
No targets currently do anything with this information, nor is it presrved
in the bytecode representation. That's coming up next.
llvm-svn: 24196
2005-11-05 09:21:28 +00:00
Chris Lattner
fd80437e76
Fix an iterator invalidation problem in code used by the -strip pass
...
llvm-svn: 24124
2005-10-31 18:42:37 +00:00
Chris Lattner
99b65b821a
Allow $
...
llvm-svn: 23721
2005-10-14 01:28:34 +00:00
Chris Lattner
5adabfc4fb
add a hack to work around broken VC++ scoping rules. Thx to JeffC for pointing
...
this out to me
llvm-svn: 23655
2005-10-07 05:23:36 +00:00
Chris Lattner
b98aa6cc83
refactor a bit of code.
...
When moving constant entries in 'Map' if the entry is the representative
constant for the abstractypemap, make sure to update it as well. This
fixes the bcreader failures from last night on several C++ apps.
llvm-svn: 23628
2005-10-04 21:35:50 +00:00
Chris Lattner
0fcb065305
Minor speedup to avoid array searches given a Use*. This speeds up bc reading
...
of the python test from 1:00 to 54s.
llvm-svn: 23627
2005-10-04 18:47:09 +00:00
Chris Lattner
e2a54ddd33
Change the signature of replaceUsesOfWithOnConstant. The bool was always
...
true dynamically. Finally, pass the Use* that replaceAllUsesWith has into
the method for future use.
llvm-svn: 23626
2005-10-04 18:13:04 +00:00
Chris Lattner
8cce7373f7
For large constants (e.g. arrays and structs with many elements) just
...
creating the keys and doing comparisons to index into 'Map' takes a lot
of time. For these large constants, keep an inverse map so that 'remove'
and move operations are much faster.
This speeds up a release build of the bc reader on Eric's nasty python
bytecode file from 1:39 to 1:00s.
llvm-svn: 23624
2005-10-04 17:48:46 +00:00
Chris Lattner
6627e8e4b5
minor cleanup/fastpath for the bcreader. This speeds up the bcreader
...
from 1:41 -> 1:39 on the large python .bc file in a release build.
llvm-svn: 23623
2005-10-04 16:52:46 +00:00
Chris Lattner
5d68585bb1
implement the struct version of the array speedup, speeding up the
...
testcase a bit more from 1:48 -> 1.40.
llvm-svn: 23619
2005-10-04 01:17:50 +00:00
Chris Lattner
eb44192fe0
Change ConstantArray::replaceUsesOfWithOnConstant to attempt to update
...
constant arrays in place instead of reallocating them and replaceAllUsesOf'ing
the result. This speeds up a release build of the bcreader from:
136.987u 120.866s 4:24.38
to
49.790u 49.890s 1:40.14
... a 2.6x speedup parsing a large python bc file.
llvm-svn: 23614
2005-10-03 22:51:37 +00:00
Chris Lattner
ae1bdaf67e
move some methods, no other changes
...
llvm-svn: 23613
2005-10-03 21:58:36 +00:00
Chris Lattner
6a65c397f3
minor microoptimizations
...
llvm-svn: 23612
2005-10-03 21:56:24 +00:00
Chris Lattner
20786460b5
Split SimpleConstantVal up into its components, so each Constant subclass getsa different enum value. This allows 'classof' for these to be really simple,not needing to call getType() anymore.
...
This speeds up isa/dyncast/etc for constants, and also makes them smaller.
For example, the text section of a release build of InstCombine.cpp shrinks
from 230037 bytes to 216363 bytes, a 6% reduction.
llvm-svn: 23467
2005-09-27 06:09:08 +00:00
Chris Lattner
26a6005735
Add support for a marker byte that indicates that we shouldn't add the user
...
prefix to a symbol name
llvm-svn: 23421
2005-09-24 08:24:28 +00:00
Jim Laskey
5f57048c62
Move code dependency for MathExtras.h out of Constants.h.
...
llvm-svn: 22840
2005-08-17 20:06:22 +00:00
Jim Laskey
61e3d7bca5
Culling out use of unions for converting FP to bits and vice versa.
...
llvm-svn: 22838
2005-08-17 19:34:49 +00:00
Andrew Lenharth
972c05771c
only build .a on alpha
...
llvm-svn: 22787
2005-08-14 15:14:34 +00:00
Andrew Lenharth
5f4a72a18e
Testing a variable before it is defined doesn't work so well. It is a fairly small thing, so just let everyone build the .a file
...
llvm-svn: 22783
2005-08-13 14:58:23 +00:00
Andrew Lenharth
d9a0c60da4
Fix oversized GOT problem with gcc-4 on alpha
...
llvm-svn: 22777
2005-08-13 05:09:50 +00:00
Chris Lattner
4e2d62ba5d
Add a helper method
...
llvm-svn: 22768
2005-08-12 22:14:06 +00:00
Chris Lattner
e698d06904
add new helper function
...
llvm-svn: 22698
2005-08-08 05:21:50 +00:00
Chris Lattner
fbcacf822a
PHINode::hasConstantValue should never return the PHI itself, even if the
...
PHI is its only operand.
llvm-svn: 22676
2005-08-05 15:37:31 +00:00
Chris Lattner
b80ff334d8
Fix an iterator invalidation problem when we decide a phi has a constant value
...
llvm-svn: 22675
2005-08-05 15:34:10 +00:00
Chris Lattner
f112b97227
Invoke instructions do not dominate all successors
...
llvm-svn: 22671
2005-08-05 01:03:27 +00:00
Chris Lattner
4a3dc26192
Now that hasConstantValue is more careful w.r.t. returning values that only
...
dominate the PHI node, this code can go away. This also makes passes more
aggressive, e.g. implementing Transforms/CondProp/phisimplify2.ll
llvm-svn: 22670
2005-08-05 01:02:04 +00:00
Chris Lattner
f9aa29ef5c
Use the bool argument to hasConstantValue to decide whether the client is
...
prepared to deal with return values that do not dominate the PHI. If we
cannot prove that the result dominates the PHI node, do not return it if
the client can't cope.
llvm-svn: 22669
2005-08-05 01:00:58 +00:00
Chris Lattner
752c3e7b35
Mark hasConstantValue as a const method
...
llvm-svn: 22666
2005-08-05 00:49:06 +00:00
Nate Begeman
7547f4085b
Add an extra parameter that Chris requested
...
llvm-svn: 22665
2005-08-04 23:50:43 +00:00
Nate Begeman
ef41400067
Fix a fixme in CondPropagate.cpp by moving a PhiNode optimization into
...
BasicBlock's removePredecessor routine. This requires shuffling around
the definition and implementation of hasContantValue from Utils.h,cpp into
Instructions.h,cpp
llvm-svn: 22664
2005-08-04 23:24:19 +00:00
Jeff Cohen
bd51ec7461
Eliminate all remaining tabs and trailing spaces.
...
llvm-svn: 22523
2005-07-27 06:12:32 +00:00
Andrew Lenharth
a9214fec08
core changes for varargs
...
llvm-svn: 22254
2005-06-18 18:34:52 +00:00
Reid Spencer
ba222e3e99
Some cleanups for compilation with GCC 4.0.0 to remove warnings:
...
* Use C++ style casts, not C style casts
* Abstract base classes should have virtual destructor.
llvm-svn: 22057
2005-05-15 16:13:11 +00:00
Chris Lattner
fb4a99b117
Verify that varargs functions all have ccc
...
llvm-svn: 21792
2005-05-08 22:27:09 +00:00
Chris Lattner
26a44493ef
add support for explicit calling conventions
...
llvm-svn: 21746
2005-05-06 20:26:43 +00:00
Chris Lattner
72ffd7e7d5
Add a 'tail' marker for call instructions, patch contributed by
...
Alexander Friedman.
llvm-svn: 21722
2005-05-06 05:51:46 +00:00
Andrew Lenharth
8b64bd0fd5
Implement count leading zeros (ctlz), count trailing zeros (cttz), and count
...
population (ctpop). Generic lowering is implemented, however only promotion
is implemented for SelectionDAG at the moment.
More coming soon.
llvm-svn: 21676
2005-05-03 17:19:30 +00:00
Chris Lattner
9620dd281d
fix a bug in the 1 index GEP handling code
...
llvm-svn: 21670
2005-05-03 16:44:45 +00:00
Chris Lattner
e53a188512
add direct support for making GEP instrs with one index
...
llvm-svn: 21665
2005-05-03 05:43:30 +00:00
Jeff Cohen
d33e8df701
Use ANSI-approved way of getting the value infinity (otherwise VC++ won't compile it)
...
llvm-svn: 21662
2005-05-03 03:13:01 +00:00
Andrew Lenharth
d46211fc03
fold fp div by 0 to inf, the way gcc does. This is legal according to the FP spec
...
llvm-svn: 21655
2005-05-02 21:25:47 +00:00
Chris Lattner
234ffe2395
Add llvm.sqrt intrinsic, patch contributed by Morten Ofstad
...
llvm-svn: 21627
2005-04-30 03:44:07 +00:00
Chris Lattner
11f6bc02a9
Unbreak the sparc backend.
...
llvm-svn: 21598
2005-04-27 18:57:15 +00:00
Chris Lattner
6b2ebc1531
don't let Reid build void*'s :)
...
llvm-svn: 21571
2005-04-26 20:03:33 +00:00
Chris Lattner
3aff97254e
Make dominates(A,B) work with post dominators. Patch contributed by
...
Naveen Neelakantam, thanks!
llvm-svn: 21543
2005-04-25 20:50:33 +00:00
Reid Spencer
27134f31f2
Older compilers won't like the inline virtual destructor in the header file
...
so we put the destructor in Pass.cpp and make it non-inline.
llvm-svn: 21520
2005-04-25 01:01:35 +00:00
Reid Spencer
c206223e65
Shut GCC 4.0 up about classes with virtual functions but no virtual
...
destructor.
llvm-svn: 21510
2005-04-24 22:27:20 +00:00
Chris Lattner
a9f3e89328
Allow these methods to take a generic Value* to simplify clients. Use
...
const_cast instead of c casts.
llvm-svn: 21493
2005-04-24 07:28:37 +00:00
Chris Lattner
dfae677997
Fix a bug in my previous checkin
...
llvm-svn: 21485
2005-04-23 22:01:39 +00:00
Chris Lattner
d10f1f55f9
Add a method, remove last use of Type.def
...
llvm-svn: 21483
2005-04-23 22:00:09 +00:00
Jeff Cohen
6c42217055
Eliminate tabs and trailing spaces
...
llvm-svn: 21480
2005-04-23 21:38:35 +00:00
Misha Brukman
53e199440e
Remove trailing whitespace
...
llvm-svn: 21427
2005-04-21 23:48:37 +00:00
Chris Lattner
2f96b346b4
Improve doxygen, from part of Evan's patch that didn't apply.
...
llvm-svn: 21394
2005-04-21 16:06:03 +00:00
Chris Lattner
472c891d23
Improve doxygen documentation, patch contributed by Evan Jones!
...
llvm-svn: 21393
2005-04-21 16:04:49 +00:00
Chris Lattner
7c88662870
add an argument to allow avoiding deleting phi nodes.
...
llvm-svn: 21255
2005-04-12 18:52:14 +00:00
Andrew Lenharth
c287cd1e4e
First step in adding pcmarker intrinsic. Second step (soon) is adding backend support.
...
llvm-svn: 20900
2005-03-28 20:05:49 +00:00
Alkis Evlogimenos
19bea8930f
Add new function getPtrPtrFromArrayPtr().
...
llvm-svn: 20684
2005-03-19 11:40:31 +00:00
Misha Brukman
674bbc7112
Convert tabs to spaces
...
llvm-svn: 20638
2005-03-16 05:42:00 +00:00
Chris Lattner
7a9186cb47
stop using arg_front
...
llvm-svn: 20599
2005-03-15 05:03:36 +00:00
Chris Lattner
4b688a1c70
This mega patch converts us from using Function::a{iterator|begin|end} to
...
using Function::arg_{iterator|begin|end}. Likewise Module::g* -> Module::global_*.
This patch is contributed by Gabor Greif, thanks!
llvm-svn: 20597
2005-03-15 04:54:21 +00:00
Chris Lattner
3cf502890c
correct the computation of the isAbstract bit for types.
...
llvm-svn: 20533
2005-03-09 17:34:27 +00:00
Reid Spencer
220e2f8519
Fix a typo in an assertion comment.
...
Patch contributed by Vladimir Merzliakov.
llvm-svn: 20529
2005-03-09 15:19:41 +00:00
Chris Lattner
46653269f4
rename insertEntry to insert
...
llvm-svn: 20484
2005-03-06 05:55:40 +00:00
Chris Lattner
b1ac7bc7f3
Merge SymbolTable::removeEntry into SymbolTable::remove, its only caller
...
llvm-svn: 20483
2005-03-06 05:51:09 +00:00
Chris Lattner
57a7a2d1cf
Delete the really inefficient method: void remove(const Type* Typ);
...
Speed up the symbol stripping code by avoiding a linear search of the
type table.
Get rid of removeEntry(type_iterator), since 'remove' is exactly the same
operation.
llvm-svn: 20481
2005-03-06 05:46:41 +00:00
Chris Lattner
f1d5e180ce
Remove some really gross and hard to understand code now that
...
InternallyInconsistent is always false.
llvm-svn: 20477
2005-03-06 05:21:40 +00:00
Chris Lattner
4af779dcba
Simplify some code.
...
llvm-svn: 20476
2005-03-06 05:13:42 +00:00
Chris Lattner
eb5987ee06
remove these methods.
...
llvm-svn: 20474
2005-03-06 02:37:47 +00:00
Chris Lattner
ffa96dc848
This fixes PR531, a crash when running the CBE on a bytecode file.
...
The problem is that Function::renameLocalSymbols is iterating through
the symbol table planes, occasionally calling setName to rename a value
(which used to do a symbol table remove/insert pair).
The problem is that if there is only a single value in a particular type
plane that the remove will nuke the symbol table plane, and the insert
will create and insert a new one. This hoses Function::renameLocalSymbols
because it has an iterator to the old plane, under the (very reasonable)
assumption that simply renaming a value won't cause the type plane to
disappear.
This patch fixes the bug by making the rename operation a single atomic
operation, which has a side effect of making the whole thing faster too. :)
llvm-svn: 20469
2005-03-06 02:14:28 +00:00
Chris Lattner
b177010d51
remove all of the various setName implementations, consolidating them into
...
Value::setName, which is no longer virtual.
llvm-svn: 20464
2005-03-05 19:51:50 +00:00
Chris Lattner
80ba99a8f6
2nd arg to setName goes away.
...
llvm-svn: 20460
2005-03-05 19:02:15 +00:00
Chris Lattner
2bd3d67a8d
Constants never get names.
...
llvm-svn: 20459
2005-03-05 19:01:59 +00:00
Chris Lattner
005a4a476a
Remove the 2nd argument to Value::setName
...
llvm-svn: 20458
2005-03-05 19:01:49 +00:00
Misha Brukman
5b587350ee
Fix the spelling of the word `the'
...
llvm-svn: 20412
2005-03-02 23:17:31 +00:00
Chris Lattner
f9597dc689
Print the module ID as a comment.
...
llvm-svn: 20411
2005-03-02 23:12:40 +00:00
Chris Lattner
0bb2828efb
Fix a nasty order of evaluation bug that Gabor Greif ran into. Here's an
...
explanation from IRC:
|sabre| I think it's an order of evaluation thing
|sabre| for me, the RHS of the assignment is evaluated first
|sabre| getTypeDescription checks to see if ConcreteTypeDescription[Ty] contains anything
|sabre| since it doesn't, it computes and returns the value
|sabre| this gets put into the map.
|sabre| For you, the LHS is evaluated first.
|sabre| Map[Ty] (aka ConcreteTypeDescriptions[Ty]) inserts an empty string into the map, returning a reference
|sabre| getTypeDesc then sees the empty string in the map
|sabre| and returns it
|sabre| bork :)
llvm-svn: 20394
2005-03-02 03:54:43 +00:00
Chris Lattner
82480f68d7
recognize llvm.prefetch. Patch contributed by Justin Wick!
...
llvm-svn: 20377
2005-02-28 19:28:00 +00:00
Chris Lattner
c4205a6b93
Verify llvm.prefetch.
...
llvm-svn: 20376
2005-02-28 19:27:42 +00:00
Chris Lattner
af54bd6050
Fix some problems where the verifier would crash on invalid input instead of
...
reporting the problem and exiting.
llvm-svn: 20302
2005-02-24 16:58:29 +00:00
Chris Lattner
902d9dc660
switch instructions only allow constantints for their values, be more specific.
...
llvm-svn: 20298
2005-02-24 05:32:09 +00:00
Chris Lattner
8044aa8d33
add a new method.
...
llvm-svn: 20293
2005-02-24 02:37:26 +00:00
Chris Lattner
bfb6a94126
make this more efficient. Scan up to 16 nodes, not the whole list.
...
llvm-svn: 20289
2005-02-23 16:53:04 +00:00
Chris Lattner
a91c25c69b
new method
...
llvm-svn: 20288
2005-02-23 16:51:11 +00:00
Chris Lattner
0ce5361846
Reduce the amount of searching this assertion does. On a testcase of mine,
...
this reduces the time for -simplifycfg in a debug build from 106s to 14.82s
llvm-svn: 20286
2005-02-23 07:09:08 +00:00
Chris Lattner
0ac02cee3c
Nuke blank line.
...
llvm-svn: 20154
2005-02-13 17:54:21 +00:00
Chris Lattner
343a831bab
Fix test/Regression/Assembler/2005-02-09-AsmWriterStoreBug.ll
...
llvm-svn: 20089
2005-02-09 17:45:03 +00:00
Chris Lattner
ec9411df83
Instead of initializing the volatile field, use accessors to set it.
...
llvm-svn: 20045
2005-02-05 01:38:38 +00:00
Chris Lattner
d73939a8ed
Initialize new field.
...
llvm-svn: 20044
2005-02-05 01:37:58 +00:00
Chris Lattner
839b0ef616
Updates for new use list changes.
...
llvm-svn: 19961
2005-02-01 01:24:21 +00:00
Chris Lattner
1cbca58b87
Update for API change.
...
llvm-svn: 19960
2005-02-01 01:24:01 +00:00
Chris Lattner
382abe80a0
Improve conformance with the Misha spelling benchmark suite
...
llvm-svn: 19930
2005-01-30 00:09:23 +00:00
Chris Lattner
aa4ae8f5b3
Adjust to ilist changes.
...
llvm-svn: 19923
2005-01-29 18:41:12 +00:00
Chris Lattner
35281b677a
Make sure that we always grow a multiple of 2 operands.
...
llvm-svn: 19902
2005-01-29 01:05:12 +00:00
Chris Lattner
50d674e9da
Adjust to changes in User class.
...
llvm-svn: 19892
2005-01-29 00:35:33 +00:00
Chris Lattner
12f9442dc3
Merge InstrTypes.cpp into this file
...
Adjust to changes in the User class, operand handling is very different.
PHI node and switch statements must handle explicit resizing of operand
lists.
llvm-svn: 19891
2005-01-29 00:35:16 +00:00
Chris Lattner
5244a770c3
Adjust to changes in User class. Aggregate constants now must explicitly
...
manage their operands.
llvm-svn: 19890
2005-01-29 00:34:39 +00:00
Chris Lattner
a0498b9190
This file is now merged into Instructions.cpp
...
llvm-svn: 19889
2005-01-29 00:33:32 +00:00
Chris Lattner
f893f17907
Fix a nasty thinko in my previous commit.
...
llvm-svn: 19881
2005-01-28 23:17:27 +00:00
Chris Lattner
f24ea9cf5e
Fix ConstProp/2005-01-28-SetCCGEP.ll: indexing over zero sized elements does
...
not change the address.
llvm-svn: 19874
2005-01-28 19:09:51 +00:00
Misha Brukman
b0fce1668a
Fix grammar
...
llvm-svn: 19854
2005-01-27 06:46:38 +00:00
Jeff Cohen
7311de2af2
Use binary mode for reading/writing bytecode files
...
llvm-svn: 19751
2005-01-22 17:36:17 +00:00
Chris Lattner
1e5620dfe1
Make this compatible with the HP/intel compiler. Fix by Duraid, thanks!
...
llvm-svn: 19548
2005-01-14 15:53:26 +00:00
Chris Lattner
9dc8275f47
Allow arrays to have more than 4G elements.
...
llvm-svn: 19395
2005-01-08 20:19:51 +00:00
Chris Lattner
83deb67391
Add convenience method.
...
llvm-svn: 19321
2005-01-07 07:40:32 +00:00
Chris Lattner
97d3bf5049
No need to pessimize current code for future possibilities.
...
llvm-svn: 19311
2005-01-06 16:26:38 +00:00
Chris Lattner
6446c6fb34
To not break TBAA rules, use a union.
...
llvm-svn: 19280
2005-01-04 01:56:57 +00:00
Chris Lattner
043ec8bb61
Allow getZeroExtend and getSignExtend to work with boolean inputs.
...
llvm-svn: 19210
2005-01-01 15:59:57 +00:00
Chris Lattner
4faf86336e
Add a verifier assertion
...
llvm-svn: 18965
2004-12-15 20:23:49 +00:00
Chris Lattner
79c3a57af7
Change this method to return ulong, not uint, for 64-bit targets.
...
llvm-svn: 18906
2004-12-13 19:48:51 +00:00
Chris Lattner
5ba315dbbe
Check in the file I forgot last night, to solve all of the crashes in every
...
test in the suite. :(
llvm-svn: 18804
2004-12-11 22:10:29 +00:00
Alkis Evlogimenos
9b02192468
Fix writer to properly quote label names when they don't contain
...
simple characters.
llvm-svn: 18744
2004-12-10 05:41:10 +00:00
Chris Lattner
a7a804efdb
Work correctly with MSVC and ICC, patch contributed by Bjørn Wennberg
...
llvm-svn: 18631
2004-12-08 16:22:48 +00:00
Reid Spencer
657b3137a9
Revert the recent patches to "fix" ConstantFP::isValueValidForType. None
...
of them seem to work everywhere.
llvm-svn: 18598
2004-12-07 07:38:08 +00:00
Reid Spencer
66a5217325
Provide a missing header file.
...
llvm-svn: 18597
2004-12-07 07:08:08 +00:00
Reid Spencer
0db7313146
Fix some comments.
...
llvm-svn: 18596
2004-12-07 07:06:47 +00:00
Alkis Evlogimenos
3bcde892c3
Fix check for valid floats. Also use and HUGE_VALF instead
...
of std::numeric_limits, because they work in more platforms.
llvm-svn: 18593
2004-12-07 06:46:50 +00:00
Reid Spencer
d50c86f078
For PR387:\
...
Make only one print method to avoid overloaded virtual warnings when \
compiled with -Woverloaded-virtual
llvm-svn: 18589
2004-12-07 04:03:45 +00:00
Reid Spencer
25b1f95558
For PR409: \
...
Test the range of float constants to ensure we are not attempting to create a \
float constant using a double value that is out of range for a float
llvm-svn: 18585
2004-12-06 22:18:37 +00:00
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