Chris Lattner
cfd07c0971
Add some comments, add new getGlobalVariable method
...
llvm-svn: 10671
2003-12-31 08:43:01 +00:00
Chris Lattner
3f6af8506e
* Make Module::getTypeName const
...
* Add new Module::getTypeByName method
* Group methods in Module.cpp better
llvm-svn: 10668
2003-12-31 07:09:33 +00:00
Chris Lattner
24a9176b66
Make the lookup method const.
...
llvm-svn: 10667
2003-12-31 07:08:19 +00:00
Chris Lattner
df22b39818
Fix PR198
...
llvm-svn: 10659
2003-12-31 03:19:37 +00:00
Chris Lattner
726d13c4d1
Add comments
...
llvm-svn: 10658
2003-12-31 02:50:02 +00:00
Chris Lattner
c37577eb9f
Clean up a lot of the code I added yesterday by exposing the IntrinsicLowering
...
implementation from the TargetMachine directly.
llvm-svn: 10636
2003-12-28 21:23:38 +00:00
Chris Lattner
068ac4236d
Move into the VMCore library
...
llvm-svn: 10623
2003-12-28 08:30:20 +00:00
Chris Lattner
d4abe8d28a
The recalclulate method was a nasty hack that was once used by the -cee pass,
...
which never worked itself. The cee pass still doesn't work, but it doesn't use
this method anymore anyway, so eliminate the method.
llvm-svn: 10302
2003-12-07 00:55:32 +00:00
Chris Lattner
9eeb35760f
Completely rewrite domset, idom, and domtree implementation. Now it is based
...
on the algorithm for directly computing immediate dominators presented in this
paper:
A Fast Algorithm for Finding Dominators in a Flowgraph
T. Lengauer & R. Tarjan, ACM TOPLAS July 1979, pgs 121-141.
This _substantially_ speeds up construction of all dominator related information.
Post-dominators to follow.
llvm-svn: 10301
2003-12-07 00:38:08 +00:00
Chris Lattner
626abbe58b
Fix const correctness
...
llvm-svn: 10229
2003-11-25 21:28:00 +00:00
Chris Lattner
96d8d9990b
Relax constrains on GEP type indexes
...
llvm-svn: 10228
2003-11-25 21:21:46 +00:00
Chris Lattner
f987c67a53
Check return types of functions
...
llvm-svn: 10146
2003-11-21 22:32:23 +00:00
Chris Lattner
1901b23d5d
Fix problem Reid was having with external globals and nonexternal linkage
...
llvm-svn: 10133
2003-11-21 20:33:27 +00:00
Chris Lattner
a1da49a55c
Finegrainify namespacification
...
llvm-svn: 10131
2003-11-21 20:23:48 +00:00
Chris Lattner
797e88aee9
Fix some problems with assertions printing
...
llvm-svn: 10129
2003-11-21 17:35:51 +00:00
Chris Lattner
acd028d92a
improve error message
...
llvm-svn: 10128
2003-11-21 17:06:29 +00:00
Chris Lattner
2b7309dd1c
Minor cleanups and simplifications
...
llvm-svn: 10127
2003-11-21 16:52:05 +00:00
Chris Lattner
feeb3261f2
Start using the nicer terminator auto-insertion API
...
llvm-svn: 10111
2003-11-20 18:25:24 +00:00
Chris Lattner
310dac2b01
Somehow I forgot poor little UnwindInst
...
*sniff*
llvm-svn: 10108
2003-11-20 18:11:56 +00:00
Chris Lattner
3aaa812969
* Finegrainify namespacification
...
* Add new constructors to allow insertion of terminator instructions at the
end of basic blocks.
* Move a ReturnInst method out-of-line, so that the vtable and type info don't
need to be emitted to every translation unit that uses the class.
llvm-svn: 10107
2003-11-20 17:45:12 +00:00
Chris Lattner
5ac68ed1bf
Don't crash if we are printing an orphaned basic block!
...
llvm-svn: 10100
2003-11-20 00:09:43 +00:00
Chris Lattner
072ae8be8f
Really, there was a reason for me factoring that out
...
llvm-svn: 10089
2003-11-19 19:20:20 +00:00
Chris Lattner
54a3f2b134
*** Significantly speed up type resultion
...
This change speeds up type resolution by checking to see if a type is
recursive, and if it's not, using a more efficient algorithm.
This dramatically reduces bytecode loading time of kc++, reducing time-to-jit
kc++ --version to 17s from 33s
llvm-svn: 10088
2003-11-19 19:10:23 +00:00
Chris Lattner
9ac58534a0
Finegrainify namespacification
...
llvm-svn: 10080
2003-11-19 06:14:38 +00:00
Chris Lattner
4bdd0d5d93
Fix PR130, and testcase test/Regression/Linker/2003-11-18-TypeResolution.ll
...
llvm-svn: 10075
2003-11-19 01:02:52 +00:00
Chris Lattner
7c9bfad92c
Implement == and != correctly. Before they would incorrectly return !=
...
for some constant exprs when they could really be the same value
llvm-svn: 10058
2003-11-17 20:19:35 +00:00
Chris Lattner
1f762c7571
The ConstantPointer class is now gone.
...
llvm-svn: 10057
2003-11-17 19:47:21 +00:00
Chris Lattner
3bbeca259c
No REALLY, get rid of ConstantPointer references
...
llvm-svn: 10054
2003-11-17 19:21:04 +00:00
Chris Lattner
dc40851a23
Eliminate use of the ConstantPointer class
...
llvm-svn: 10053
2003-11-17 19:19:32 +00:00
Chris Lattner
daee0fa51f
Constant folding shalt not be built on annotations
...
llvm-svn: 10052
2003-11-17 19:05:17 +00:00
Chris Lattner
31a03e3207
Be a bit more tolerant of broken code
...
llvm-svn: 10050
2003-11-17 01:17:04 +00:00
Brian Gaeke
675cab8d52
When you hand WriteAsOperand a type, it now prints out its symbolic name.
...
llvm-svn: 10042
2003-11-16 23:08:27 +00:00
Brian Gaeke
5db96ead48
When failing a Verifier assertion, use WriteAsOperand to print out the
...
offending types and/or values.
llvm-svn: 10041
2003-11-16 23:07:42 +00:00
Chris Lattner
21c40d8641
Don't print 'No predecessors!' on the entry block
...
llvm-svn: 10038
2003-11-16 22:59:57 +00:00
Chris Lattner
34b44fd809
Expose the verifier to opt
...
llvm-svn: 9984
2003-11-13 19:47:29 +00:00
Chris Lattner
e72202b5b8
Detect problems with PHI node operands!
...
llvm-svn: 9916
2003-11-12 07:13:37 +00:00
Brian Gaeke
d25f86d683
Put all LLVM code into the llvm namespace, as per bug 109.
...
llvm-svn: 9903
2003-11-11 22:41:34 +00:00
Chris Lattner
f40566184d
Fix PR95. I'm checking this patch in for Reid Spencer, who figured it out
...
and wrote it up. Thanks!!
llvm-svn: 9832
2003-11-09 19:39:48 +00:00
Chris Lattner
95e79d0097
Add an assertion
...
llvm-svn: 9831
2003-11-09 15:51:07 +00:00
Chris Lattner
352ad83271
Add support for constant expr shifts
...
llvm-svn: 9735
2003-11-05 19:53:03 +00:00
Chris Lattner
530eb1ffb5
If we're not checking, don't check!
...
llvm-svn: 9732
2003-11-05 19:09:40 +00:00
Chris Lattner
e0249593df
Make code gcc 3.4 clean
...
llvm-svn: 9719
2003-11-05 05:15:42 +00:00
Chris Lattner
8a01e11594
Fix InstCombine/2003-11-03-VarargsCallBug.ll
...
llvm-svn: 9681
2003-11-03 18:44:58 +00:00
Chris Lattner
78b09155e1
Did I mention that I _HATE_ CPRs?
...
llvm-svn: 9639
2003-10-31 18:38:06 +00:00
Chris Lattner
18283ea9f0
Constant pointer refs are causing these to fail unnecessarily, which is causing
...
a lot of code to be pessimized. I hate CPRs. :(
llvm-svn: 9635
2003-10-31 17:51:16 +00:00
Alkis Evlogimenos
006108d3b6
Use already existing classes for post order iterator.
...
llvm-svn: 9629
2003-10-31 03:02:34 +00:00
Chris Lattner
c49a7fd37d
Make use of the new AssemblyAnnotationWriter interface
...
llvm-svn: 9619
2003-10-30 23:41:03 +00:00
Alkis Evlogimenos
30f4eb0dc0
Output types in reverse postorder. This will allow the ByteCode/Reader
...
to create the minimum number of opaque types for each type with a
cycle in its type graph.
llvm-svn: 9615
2003-10-30 21:04:44 +00:00
Chris Lattner
f24ae5a0ed
Print the names of more opaque types
...
llvm-svn: 9598
2003-10-30 00:22:33 +00:00
Chris Lattner
a2fcab56e3
Make sure to print opaque types names if they are available.
...
llvm-svn: 9597
2003-10-30 00:12:51 +00:00
Alkis Evlogimenos
81ad09e0ab
Add more debugging info to help tracing the SlotCalculator.
...
llvm-svn: 9575
2003-10-29 03:12:12 +00:00
Chris Lattner
4347464e2a
Fix bug: instcombine/2003-10-23-InstcombineNullFail.ll
...
llvm-svn: 9403
2003-10-23 05:21:48 +00:00
Chris Lattner
5f4ed13cb9
Make sure to add a type for va_next operands, which may not other wise
...
occur in the module
llvm-svn: 9336
2003-10-21 17:40:54 +00:00
Chris Lattner
53d92d23b0
Fix problem which effected linking apache
...
llvm-svn: 9335
2003-10-21 17:39:59 +00:00
John Criswell
de34542f41
Added LLVM copyright header.
...
llvm-svn: 9321
2003-10-21 15:17:13 +00:00
John Criswell
71d2894956
Added LLVM copyright notice to Makefiles.
...
llvm-svn: 9312
2003-10-20 22:26:57 +00:00
John Criswell
b402729b30
Added LLVM project notice to the top of every C++ source file.
...
Header files will be on the way.
llvm-svn: 9298
2003-10-20 19:43:21 +00:00
Chris Lattner
d26c1d63f6
"Function"[0] == 'F', not 'M'
...
llvm-svn: 9297
2003-10-20 19:10:06 +00:00
Chris Lattner
87843f87b8
Change the Opcode enum for PHI nodes from "Instruction::PHINode" to "Instruction::PHI" to be more consistent with the other instructions.
...
llvm-svn: 9269
2003-10-19 21:34:28 +00:00
Chris Lattner
29825508f0
Add support for the new varargs intrinsics and instructions
...
llvm-svn: 9226
2003-10-18 05:57:43 +00:00
Misha Brukman
a35a69da97
Chris says it's better to assert that TheModule is valid than silently return 0.
...
llvm-svn: 9212
2003-10-17 21:59:57 +00:00
Misha Brukman
d32cfacbc7
Return the Module that we just materialized.
...
llvm-svn: 9201
2003-10-17 18:27:13 +00:00
Alkis Evlogimenos
5a1f705c88
Eliminate some extraneous code in SlotCalculator::insertVal().
...
Rename SlotCalculator::getValSlot() to SlotCalculator::getSlot(),
SlotCalculator::insertValue() to SlotCalculator::getOrCreateSlot(),
SlotCalculator::insertVal() to SlotCalculator::insertValue(), and
SlotCalculator::doInsertVal() to SlotCalculator::doInsertValue().
llvm-svn: 9190
2003-10-17 02:02:40 +00:00
Chris Lattner
f46c45682a
Add support for 'weak' linkage.
...
llvm-svn: 9171
2003-10-16 18:29:00 +00:00
Chris Lattner
09ef1749f7
Completely rewrite support for the Value::use_* list. Now, all operations on
...
this list (except use_size()) are constant time. Before the killUse method
(used whenever something stopped using a value) was linear time, and thus
very very slow for large programs.
This speeds GCCAS up _substantially_ on large programs: almost 2x for 176.gcc:
176.gcc: 77.07s -> 37.38s
177.mesa: 7.59s -> 5.57s
252.eon: 21.02s -> 19.52s (*)
253.perlbmk: 11.40s -> 13.05s
254.gap: 7.25s -> 7.42s
252.eon would speed up a whole lot more, but optimization time is being
dominated by the inlining pass, which needs to be fixed.
llvm-svn: 9160
2003-10-16 16:53:07 +00:00
Misha Brukman
1d9479ba78
Enabling incremental bytecode loading in the JIT:
...
* FunctionPassManager ctor now takes in a ModuleProvider
* run() materializes function before running passes on it
llvm-svn: 9126
2003-10-14 21:38:42 +00:00
Chris Lattner
c39d256841
Stop using "reverse depth first" order
...
llvm-svn: 9081
2003-10-13 15:21:58 +00:00
Chris Lattner
20cebd6ccb
Speed up TypesEqual by specializing it for all of the derived types, avoiding
...
a lot of virtual method dispatch overhead.
llvm-svn: 9078
2003-10-13 14:55:56 +00:00
Chris Lattner
bc7c13c803
Avoid creating lots of pointless opaque types, with short lifetimes
...
llvm-svn: 9076
2003-10-13 14:03:36 +00:00
Chris Lattner
1a43c990a8
This is a header file, hear me roar
...
llvm-svn: 9075
2003-10-13 05:34:24 +00:00
Chris Lattner
34b8bc6716
* Remove extraneous #includes
...
* Fix a nasty initializer ordering bug. Any only-CFG passes which registered
themselves before the CFGOnlyAnalysis vector initialized got forgotten and
thus got invalidated and recomputed.
In particular, in my compiled version of gccas, the Loop information pass was
being recomputed unnecessarily.
llvm-svn: 9074
2003-10-13 05:33:01 +00:00
Chris Lattner
b6c8569f05
Regularize header file comments
...
llvm-svn: 9071
2003-10-13 03:32:08 +00:00
Chris Lattner
bfffd3052d
Rename method
...
llvm-svn: 9055
2003-10-12 18:52:12 +00:00
Brian Gaeke
a3f850a182
Don't include Config/stdio.h or <stdio.h>.
...
llvm-svn: 9031
2003-10-10 18:46:29 +00:00
Misha Brukman
c59161ff84
Fix spelling/grammar.
...
llvm-svn: 9023
2003-10-10 17:54:14 +00:00
Chris Lattner
bd123c6e51
Add a sanity check for constant expression casts
...
llvm-svn: 8951
2003-10-07 22:19:19 +00:00
Chris Lattner
6f939cc824
Users can never be null
...
llvm-svn: 8895
2003-10-06 17:33:39 +00:00
Chris Lattner
e2a7875d26
Be more careful handling PHI nodes, which might be of potentially high degree.
...
This reduces the time to verify a function from eon with a large number of
large PHI nodes from 22996s (6.38 hours) to 10.5499s
llvm-svn: 8866
2003-10-05 17:44:18 +00:00
Chris Lattner
b5f0d32b91
Type tables are now AbstractTypeUsers. This allows them to merge together
...
constants as necessary due to type resolution. With this change, the
following spec benchmarks now link: 176.gcc, 177.mesa, 252.eon,
253.perlbmk, & 300.twolf. IOW, all SPEC INT and FP benchmarks now link.
llvm-svn: 8853
2003-10-05 00:17:43 +00:00
Chris Lattner
def80d731a
Rename AbstractModuleProvider -> ModuleProvider, to match the header file name,
...
and because, while the class used by the interface is abstract, the actual
concept is not.
llvm-svn: 8850
2003-10-04 20:14:59 +00:00
Chris Lattner
06dbcc0540
Minor random speedup: make Constant::getNullValue only call ConstantFOO::get
...
once!
llvm-svn: 8845
2003-10-03 19:34:51 +00:00
Chris Lattner
f66ac75a94
Explicit copy ctors are no longer needed
...
llvm-svn: 8844
2003-10-03 19:02:41 +00:00
Chris Lattner
a2c1509b21
Minor cleanups
...
llvm-svn: 8843
2003-10-03 18:57:54 +00:00
Chris Lattner
18c3f42894
This checkin basically amounts to a complete rewrite of the type-resolution
...
machinery. This dramatically simplifies how things works, removes irritating
little corner cases, and overall improves speed and reliability.
Highlights of this change are:
1. The exponential algorithm built into the code is now gone. For example
the time to disassemble one bytecode file from the mesa benchmark went
from taking 12.5s to taking 0.16s.
2. The linker bugs should be dramatically reduced. The one remaining bug
has to do with constant handling, which I actually introduced in
"union-find" checkins.
3. The code is much easier to follow, as a result of fewer special cases.
It's probably also smaller. yaay.
llvm-svn: 8842
2003-10-03 18:46:24 +00:00
Chris Lattner
101d5058cb
These methods are dead, remove them. Because the bodies will soon be
...
ressurected, just ifdef them out for now.
llvm-svn: 8840
2003-10-03 18:39:57 +00:00
Chris Lattner
85444d1dbd
Dramatically simplify DerivedType::refineAbstractTypeToInternal
...
This makes use of the new PATypeHolder's to keep types from being deleted
prematurely, instead of the wierd "self reference" garbage. This is easier
to understand and more efficient as well.
llvm-svn: 8834
2003-10-03 04:48:21 +00:00
Chris Lattner
b217f24289
Make the PATypeHolder use a simple union-find implementation to handle
...
merging of types. This makes it MUCH more efficient than before, also
making things simpler.
llvm-svn: 8833
2003-10-02 23:35:57 +00:00
Chris Lattner
83856d0df1
There is no reason for Value to be an AbstractTypeUser. This just makes things
...
significantly more complete. Instead, just make DerivedType's AbstractTypeUser's,
and make Value contain a PATypeHolder.
llvm-svn: 8828
2003-10-02 19:44:40 +00:00
Chris Lattner
d950f19834
Do not use BasicBlock::succ_iterator
...
llvm-svn: 8700
2003-09-24 22:03:22 +00:00
Misha Brukman
78cf1f07b6
* No longer initialize the module, a subclass is more suitable to do this
...
because it can add a module ID which we do not have at this time.
* Check to see if the module has been initialized when materializing it.
llvm-svn: 8674
2003-09-22 23:44:13 +00:00
Chris Lattner
d4de2760aa
Rename Function::getEntryNode -> getEntryBlock
...
llvm-svn: 8625
2003-09-20 14:39:18 +00:00
Chris Lattner
92030f5a29
Reject "llvm." as a function name
...
llvm-svn: 8608
2003-09-19 19:31:41 +00:00
Misha Brukman
7d55b875eb
Minimal implementation of the abstract ModuleProvider interface.
...
llvm-svn: 8594
2003-09-18 16:17:06 +00:00
Chris Lattner
3df1f4b6a5
Change the semancics of the dropallrefs method
...
llvm-svn: 8572
2003-09-17 04:58:59 +00:00
Chris Lattner
3d39abeeb7
Renamed DominatorTree::Node::getNode() -> getBlock()
...
llvm-svn: 8469
2003-09-11 16:26:13 +00:00
Chris Lattner
ebf6d5c622
Rework dominator interfaces to handle changes in the post-dominance
...
construction. Now there may be multiple root blocks, and null is a
special node used to mark the "virtual" exit node of a CFG.
llvm-svn: 8461
2003-09-10 20:37:51 +00:00
Brian Gaeke
7eaecc239a
Make createVerifierPass return a FunctionPass *.
...
llvm-svn: 8449
2003-09-10 19:37:04 +00:00
Chris Lattner
58d4183a25
Fix spell-o's
...
llvm-svn: 8431
2003-09-10 05:29:43 +00:00
John Criswell
6b94d6a603
Reverting back to the previous revision.
...
We want to check for length 5 because we might get the "llvm." string as the
name. That string is in the LLVM namespace and should be checked as such.
We also don't have to worry about garbage data because (I believe) the string
class will return a valid value. So, the switch statement will work and we
don't have to worry about the code wandering into segfault land.
llvm-svn: 8419
2003-09-09 16:58:41 +00:00
John Criswell
0641f1fad7
Modified the check for intrinsic functions. All intrinsic functions have to
...
be at least 6 characters, since something must follow the "llvm." string in the
function name.
This seems to fix an assertion failure with the SingleSource tests, too.
llvm-svn: 8418
2003-09-09 16:36:09 +00:00
Chris Lattner
e8ae7bf114
Eliminate support for the llvm.unwind intrinisic, using the Unwind instruction instead
...
llvm-svn: 8411
2003-09-08 19:44:26 +00:00
Chris Lattner
c3c2809235
Add support for unwind
...
llvm-svn: 8407
2003-09-08 18:54:36 +00:00
Chris Lattner
2916eafa42
Add support for volatile loads/stores
...
llvm-svn: 8393
2003-09-08 17:45:59 +00:00
Misha Brukman
993b605832
Spell `occurrence' correctly.
...
llvm-svn: 8388
2003-09-08 03:08:43 +00:00
Chris Lattner
67dfb06d9c
Add asserts, move code around. This gets the dropAllTypeUses partially implemented
...
llvm-svn: 8361
2003-09-05 05:10:04 +00:00
Chris Lattner
71ed17fe2e
Move functionality preserving changes.
...
Inline containsEquivalent
Remove some //'s
llvm-svn: 8358
2003-09-05 02:39:52 +00:00
Chris Lattner
6a4cb9b0e9
Refactor what has effectively become copy-and-pasted code
...
llvm-svn: 8357
2003-09-05 02:30:47 +00:00
Chris Lattner
d62bda202e
Check in a bunch of minor fixes, plus a whole lot of #if 0'd out code, which will hopefully be enabled in the near future
...
This does not make any functionality changes
llvm-svn: 8355
2003-09-05 02:21:39 +00:00
Chris Lattner
a0c99153e0
containsEquivalent never returns its argument
...
llvm-svn: 8353
2003-09-04 23:49:53 +00:00
Chris Lattner
652d585600
Remove needless usage of getDescription()
...
llvm-svn: 8351
2003-09-04 23:46:03 +00:00
Chris Lattner
706576a0cc
Inline method
...
llvm-svn: 8350
2003-09-04 23:43:40 +00:00
Chris Lattner
3835c2fdd1
Don't try to be sneaky, breaking recursive types in the process
...
llvm-svn: 8348
2003-09-04 23:41:03 +00:00
Chris Lattner
0382bf2e98
This is now unnecessary
...
llvm-svn: 8347
2003-09-04 23:38:22 +00:00
Chris Lattner
2fe8fac4e0
Fix bug where we couldn't print a function without a name
...
llvm-svn: 8341
2003-09-03 17:56:43 +00:00
Chris Lattner
2c028515e6
No need to rescan types when they are created.
...
llvm-svn: 8339
2003-09-03 14:44:53 +00:00
Chris Lattner
4a96f4593e
Another small speedup, this one to: 2.42s
...
llvm-svn: 8335
2003-09-02 22:52:49 +00:00
Chris Lattner
0cfd2b85b8
Don't return bogus references, and don't add an entry to the Concrete map
...
unless it's not empty!
llvm-svn: 8334
2003-09-02 22:50:02 +00:00
Chris Lattner
398d8a539c
Another optimization, speed up the testcase to 2.7s
...
llvm-svn: 8333
2003-09-02 22:15:15 +00:00
Chris Lattner
e4adff8157
Removal of explicit stack, which requires the method to be a member (so it can
...
call setAbstract). Now that we just compute abstractness we can also return
the computed value by value instead of as an argument.
llvm-svn: 8332
2003-09-02 21:56:34 +00:00
Chris Lattner
05eecdb7de
Remove the "recursive bit", not only is it unused by anyone, it was also
...
not correctly calculated, and calculating it wrong for fun seems rather
pointless. This also speeds up my favorite testcase by .25 seconds.
llvm-svn: 8330
2003-09-02 21:41:05 +00:00
Chris Lattner
590606e4c4
Don't bother doing an exhaustive recursive walk if we are at the limit of what
...
we need to know anyway. This reduces the 2002-07-08-HugePerformanceProblem.llx
down to 3.210u:0.010s, which is back in the acceptable range again
llvm-svn: 8323
2003-09-02 20:06:29 +00:00
Chris Lattner
06d8aac065
Ugh, fix bugs. Ok, so the last fix wasn't as great as I thought it was.
...
Now we're back to: 131.730u, 0.330s, which is still quite an improvement,
but still quite unacceptable
llvm-svn: 8322
2003-09-02 19:14:12 +00:00
Chris Lattner
fb0b83a27b
Further simplifications
...
llvm-svn: 8321
2003-09-02 16:46:41 +00:00
Chris Lattner
dda7669997
Change the code to no longer compute the "type description" immediately when
...
the type is analyzed. Instead, only compute it when requested (with
getDescription), and cached for reuse later.
This dramatically speeds up LLVM in general because these descriptions almost
_never_ need to be constructed. The only time they are used is when a type is
<<'d. Printing of modules by themselves uses other code to print symbolic
types when possible, so these descriptions are really only used for debugging.
Also, this fixes the particularly bad case when lots of types get resolved to
each other, such as during linking of large programs. In these cases, the type
descriptions would be repeatedly recomputed and discarded even though: A. noone
reads the description before it gets resolved, and B. many many resolutions
happen at intermediate steps, causing a HUGE waste of time.
Overall, this makes the getTypeDesc function much more light-weight, and fixes
bug: Assembler/2002-07-08-HugePerformanceProblem.llx, which went from taking
1048.770u/19.150s (which is 17.5 MINUTES, on apoc), to taking 0.020u/0.000s,
which is a nice little speedup. :)
llvm-svn: 8320
2003-09-02 16:35:17 +00:00
Brian Gaeke
5a8d15dfa1
Remove assertion which is never reached.
...
llvm-svn: 8318
2003-09-02 06:45:34 +00:00
Chris Lattner
d7b6cc98db
Implement new method
...
llvm-svn: 8238
2003-08-31 00:19:28 +00:00
Chris Lattner
b60bfd904c
Fix bug: Linker/2003-08-28-TypeResolvesGlobal3.ll
...
Use new replaceAllUsesWith stuff in a way that works even though types have not yet been propagated
llvm-svn: 8210
2003-08-29 05:37:22 +00:00
Chris Lattner
286e92a9ef
Implement "unsafe" replaceAllUsesWWith stuff for use during type resolution.
...
llvm-svn: 8209
2003-08-29 05:36:46 +00:00
Chris Lattner
055944e9d3
Fix bug: Linker/2003-08-28-TypeResolvesGlobal2.ll
...
llvm-svn: 8206
2003-08-29 05:11:34 +00:00
Chris Lattner
a2a7b891e5
Refactor code to make it useful outside of Constants.cpp
...
llvm-svn: 8205
2003-08-29 05:09:37 +00:00
Chris Lattner
f104b6e6ad
Fix bug: Linker/2003-08-28-TypeResolvesGlobal.ll
...
llvm-svn: 8202
2003-08-29 04:49:54 +00:00
Chris Lattner
e7a3a51c77
As it turns out, things will be simpler than I first expected. We no longer
...
need any exception handling intrinsics beyond llvm.unwind. (yaay)
llvm-svn: 8145
2003-08-25 22:35:01 +00:00
Chris Lattner
91cdd5dbc9
Support new 'any' support for pointer size and endianness
...
llvm-svn: 8119
2003-08-24 13:48:48 +00:00
Chris Lattner
376a94de26
rethrow is really the language independent primitive here. "throw" can be written
...
in terms of it and llvm.exc.setcurrent.
Rework the intrinsics.
llvm-svn: 8110
2003-08-24 12:24:08 +00:00
Chris Lattner
b73f54b336
Fix copy-and-paste-o
...
llvm-svn: 8104
2003-08-24 06:57:53 +00:00
Chris Lattner
6fe728600d
Initial support for recognizing LLVM exception handling intrinsics
...
llvm-svn: 8102
2003-08-24 05:30:29 +00:00
Chris Lattner
851a6f8d37
Allow specifying the name for the newly split basic block
...
llvm-svn: 8097
2003-08-24 03:41:39 +00:00
Chris Lattner
367cef7b75
Rename SwitchInst::dest_push_back -> addCase
...
Add new removeCase method
llvm-svn: 8088
2003-08-23 23:14:37 +00:00
Chris Lattner
7cdcd38942
If an "LLVM name" has wierd characters in it, print it out in double quotes instead of prefixing it with %
...
llvm-svn: 8049
2003-08-22 05:40:38 +00:00
Misha Brukman
cda7f97dbb
The word dependent' has no
a'.
...
llvm-svn: 8030
2003-08-21 22:14:26 +00:00
Chris Lattner
fb677f7e87
Implement Assembler/2003-08-21-ConstantExprCast-Fold.llx
...
llvm-svn: 8015
2003-08-21 19:45:55 +00:00
Chris Lattner
6c9f00c920
Implement testcase: Assembler/2003-08-20-ConstantExprGEP-Fold.llx
...
llvm-svn: 7983
2003-08-20 16:11:27 +00:00
Chris Lattner
9f1ec93145
Do not even attempt to compute dominator information for unreachable blocks
...
llvm-svn: 7963
2003-08-18 22:11:16 +00:00
Chris Lattner
9fed232059
Fix linking bug in xboard
...
llvm-svn: 7952
2003-08-18 16:54:48 +00:00
Chris Lattner
2c6666efc6
Add intrinsics for the llvm.sig(set|long)jmp functions
...
llvm-svn: 7949
2003-08-18 15:41:24 +00:00
Misha Brukman
56f7db4178
Spell `necessary' correctly.
...
llvm-svn: 7944
2003-08-18 14:43:39 +00:00
Brian Gaeke
4d260a9317
Add new method to FunctionPassManager to add ImmutablePasses.
...
llvm-svn: 7838
2003-08-14 06:07:57 +00:00
Chris Lattner
23b5b5026b
Dramatically simplify how -time-passes works.
...
This also enables -time-passes for FunctionPassManagers, which allows it to
be used for the JIT
llvm-svn: 7834
2003-08-14 05:20:28 +00:00
Chris Lattner
97efe70e65
Implement constant folding of casts from boolean constants to other values
...
llvm-svn: 7812
2003-08-13 15:52:25 +00:00
Brian Gaeke
4243c7aa6a
Add FunctionPassManager - it's like a PassManager, but it only deals in
...
FunctionPasses.
llvm-svn: 7778
2003-08-12 17:22:39 +00:00
Chris Lattner
9d58af6fcf
Add a bunch of new Alpha Intrinsics for Rahul Joshi
...
llvm-svn: 7646
2003-08-06 20:08:25 +00:00
Chris Lattner
b44a9376d1
Implement TODO: print out short form of Invoke if possible
...
llvm-svn: 7595
2003-08-05 15:34:45 +00:00
Tanya Lattner
26f6e3b353
*** empty log message ***
...
llvm-svn: 7447
2003-07-31 05:06:09 +00:00
Tanya Lattner
8c2ac118ce
Added function to determine if an Instruction may trap.
...
llvm-svn: 7442
2003-07-31 04:05:50 +00:00
Chris Lattner
6457a808f0
Fix a bug that brian reported
...
llvm-svn: 7428
2003-07-30 19:04:37 +00:00
Chris Lattner
b6db3e9a88
Add support for Alpha intrinsics, contributed by Rahul Joshi
...
llvm-svn: 7373
2003-07-28 21:20:57 +00:00
Chris Lattner
d285263cd3
Make Module::getNamedFunction prefer non-external functions if there is more than
...
one function of the same name
llvm-svn: 7274
2003-07-23 20:21:30 +00:00
Chris Lattner
1351c304dc
Remove redundant const qualifiers from cast<> expressions
...
llvm-svn: 7253
2003-07-23 15:30:06 +00:00
Chris Lattner
6ad460b336
Simplify code by using ConstantInt::getRawValue instead of checking to see
...
whether the constant is signed or unsigned, then casting
llvm-svn: 7252
2003-07-23 15:22:26 +00:00
Misha Brukman
5de3e14206
The word separate' only has one
e'.
...
llvm-svn: 7173
2003-07-14 17:20:40 +00:00
John Criswell
258dfc0319
Merged in autoconf branch. This provides configuration via the autoconf
...
system.
llvm-svn: 7014
2003-06-30 21:59:07 +00:00
Chris Lattner
b94fc3e392
Avoid printing out huge structures or arrays if they are just filled with zeros
...
llvm-svn: 6938
2003-06-28 20:08:24 +00:00
Chris Lattner
44730af626
Implement more aggressive folding of constant GEP instructions
...
llvm-svn: 6913
2003-06-26 05:22:45 +00:00
Chris Lattner
ade75cea50
Make assertion more descriptive
...
llvm-svn: 6889
2003-06-24 22:20:19 +00:00
Chris Lattner
afa7d2f7ec
Add support for GCC 3.3
...
llvm-svn: 6865
2003-06-23 19:16:20 +00:00
Chris Lattner
b40f50e3d1
Fix bug: InstCombine/2003-06-22-ConstantExprCrash.ll
...
llvm-svn: 6857
2003-06-22 20:48:30 +00:00
Chris Lattner
ef97ca721a
Remove usage of sys/unistd.h
...
llvm-svn: 6788
2003-06-19 18:42:09 +00:00
Chris Lattner
75e1e892a6
Detemplatize the PATypeHandle class, which was only really instantiated on 'Type'.
...
llvm-svn: 6774
2003-06-18 19:22:36 +00:00
Brian Gaeke
d51afb3000
lib/CWriter/Writer.cpp: Copy AsmWriter's ConstantFP checking code here
...
into a new function FPCSafeToPrint(), and use it in printConstant()
and printFunction() to decide whether we should output ConstantFPs as
floating-point constants or as references to stack-allocated variables.
lib/VMCore/AsmWriter.cpp: Fix an apparent typo in the code mentioned above.
llvm-svn: 6762
2003-06-17 23:55:35 +00:00
Chris Lattner
343c4d4987
Fix bug: Linker/2003-06-02-TypeResolveProblem2.ll
...
llvm-svn: 6699
2003-06-16 12:11:33 +00:00
Chris Lattner
6366fa53e5
Fix (bogus) possibly uninitialized warning
...
llvm-svn: 6634
2003-06-05 21:01:26 +00:00
Chris Lattner
37b01d74e4
* Make assertion message useful
...
* Kill dead conditional
llvm-svn: 6544
2003-06-02 17:42:47 +00:00
Chris Lattner
c17deffb2b
Fix bug: Linker/2003-06-02-TypeResolveProblem.ll
...
llvm-svn: 6542
2003-06-02 17:25:46 +00:00
Chris Lattner
a108915211
Don't print out unique identifier for opaque types
...
llvm-svn: 6511
2003-06-01 03:45:51 +00:00
Chris Lattner
66432896b4
Fix constant folding to ALWAYS work.
...
llvm-svn: 6355
2003-05-27 19:16:07 +00:00
Chris Lattner
fbb45c1b92
Fix problem with last checkin.
...
llvm-svn: 6328
2003-05-25 16:15:32 +00:00
Chris Lattner
500984b918
Fix Bug: Linker/2003-04-26-NullPtrLinkProblem.ll
...
This was a problem with constants having their types resolved to some new type,
but there was already a constant of the new type created. Before, these types
were never merged together, now they are.
llvm-svn: 6314
2003-05-23 20:03:32 +00:00
Chris Lattner
1cab8ed666
Remove using declarations and extraneous #includes
...
llvm-svn: 6303
2003-05-22 21:47:17 +00:00
Chris Lattner
2fb982f365
Fix static constructor ordering problem
...
llvm-svn: 6302
2003-05-22 21:31:52 +00:00
Chris Lattner
20c876a592
Remove using declarations
...
llvm-svn: 6300
2003-05-22 21:21:43 +00:00
Chris Lattner
0462d7b16d
Add support for shift constant expressions
...
llvm-svn: 6260
2003-05-21 17:49:25 +00:00
Misha Brukman
74cf3f5246
s/convertable/convertible/g
...
llvm-svn: 6248
2003-05-20 18:45:36 +00:00
Chris Lattner
435e5592a9
Add support for setjmp/longjmp primitives
...
Patch checked in for Bill Wendling :)
llvm-svn: 6241
2003-05-17 22:26:33 +00:00
Chris Lattner
872fe63520
Fix bug: Assembler/2003-05-15-AssemblerProblem.llx
...
llvm-svn: 6234
2003-05-15 19:37:21 +00:00
Chris Lattner
e02634b9aa
Remove unnecessary casts
...
llvm-svn: 6201
2003-05-14 17:51:05 +00:00
Chris Lattner
cb3df29c52
Print opaque types
...
llvm-svn: 6200
2003-05-14 17:50:47 +00:00
Chris Lattner
722c3ee6c5
Fix bug
...
llvm-svn: 6184
2003-05-14 02:47:13 +00:00
Chris Lattner
90bd5a8004
Implement another getelementptr folding opportunity that arises when
...
linking stuff with appending linkage
llvm-svn: 6180
2003-05-13 21:50:52 +00:00
Chris Lattner
a33d9882ce
Eliminate using declarations
...
llvm-svn: 6179
2003-05-13 21:37:02 +00:00
Chris Lattner
6a0cf6f937
Fix bug: Dominators/2003-05-12-UnreachableCode.ll
...
llvm-svn: 6158
2003-05-12 22:35:13 +00:00
Chris Lattner
fe799356fd
Fix Bug: ConstProp/2003-05-12-DivideError.ll
...
llvm-svn: 6125
2003-05-12 15:26:25 +00:00
Chris Lattner
746e408dd9
llvm.va_start only takes on argument now
...
Verify that va_start doesn't occur in functions with no varargs
llvm-svn: 6038
2003-05-08 15:55:31 +00:00
Chris Lattner
5dd2913d57
Add more support for intrinsic functions and for varargs stuff
...
llvm-svn: 6035
2003-05-08 03:47:33 +00:00
Chris Lattner
e1faff42f4
Add support for the new va_arg instruction
...
llvm-svn: 6029
2003-05-08 02:44:12 +00:00
Chris Lattner
c412b950d2
Remove using declarations
...
llvm-svn: 6022
2003-05-08 02:08:14 +00:00
Chris Lattner
f5dce6b6f1
Fix a bug that occurred when removing the last predecessor INTO an
...
infinite loop
llvm-svn: 5953
2003-04-25 23:14:19 +00:00
Chris Lattner
dac0d4bafb
** CORRECTLY, conservatively handle constant expressions
...
llvm-svn: 5924
2003-04-25 02:52:06 +00:00
Chris Lattner
6e2ea5ccff
Fix a nasty bug where the ConstantMerge pass was invalidating the TargetData pass
...
even though it was immutable. Immutable passes should never end up in CurrentAnalyses!
llvm-svn: 5906
2003-04-24 20:07:38 +00:00
Chris Lattner
db6b7ba364
Remove unnecesary &*'s
...
llvm-svn: 5872
2003-04-23 16:37:45 +00:00
Chris Lattner
fcad09d3c1
Emit information about target
...
llvm-svn: 5844
2003-04-22 19:07:19 +00:00
Chris Lattner
b5fc5522fb
Add support for tracking whether a module is 64/32 bit and big/little endian
...
Also add a moduleID field which can be used for diagnostics
llvm-svn: 5834
2003-04-22 18:02:04 +00:00
Chris Lattner
869d67b885
Remove arbitrary limitation
...
llvm-svn: 5818
2003-04-19 00:50:37 +00:00
Chris Lattner
eacb88d2e9
Don't build constantexprs that could be folded
...
llvm-svn: 5801
2003-04-17 19:24:48 +00:00
Chris Lattner
719fd86bdc
Allow constant folding of GEP instructions, even if we don't do a whole lot yet.
...
Fold ConstExpr casts better
castToPointer shouldn't be forced to return a constantpointer
llvm-svn: 5800
2003-04-17 19:24:18 +00:00
Chris Lattner
bb00f755ed
Change the interface to constant expressions to allow automatic folding
...
llvm-svn: 5793
2003-04-16 22:40:51 +00:00
Chris Lattner
a9a0e4e780
Add code to verify correctly linkages
...
llvm-svn: 5788
2003-04-16 20:42:40 +00:00
Chris Lattner
fa4f750f3e
Add new linkage types to support a real frontend
...
llvm-svn: 5786
2003-04-16 20:28:45 +00:00
Chris Lattner
343a212f2b
Improve the efficiency and cleanup writing a bit
...
llvm-svn: 5782
2003-04-16 20:20:02 +00:00
Chris Lattner
8696069d85
Add helper method
...
llvm-svn: 5753
2003-03-21 21:41:02 +00:00
Chris Lattner
03fab572fb
* Change the order that globals and constants are processed in
...
* Add support for implicit zero initializers
llvm-svn: 5750
2003-03-19 20:57:22 +00:00
Chris Lattner
5e5950b7e0
Fix ConstantUInt::isAllOnesValue
...
llvm-svn: 5734
2003-03-10 22:39:02 +00:00
Chris Lattner
0509f2bb59
Clean up cruft
...
llvm-svn: 5720
2003-03-06 23:23:32 +00:00
Chris Lattner
90932ffc26
Remove #include
...
Extend getNullValue to work with struct and array types
llvm-svn: 5718
2003-03-06 21:02:18 +00:00
Chris Lattner
92a316864d
Simplify some of the PHI node interfaces
...
llvm-svn: 5700
2003-03-05 21:15:12 +00:00
Chris Lattner
b7d52c4fa8
Allow ImmutablePass's to require other immutable passes and to be initialized
...
llvm-svn: 5630
2003-02-26 19:10:57 +00:00
Chris Lattner
8de17c9baf
Fix a misunderstanding of the standard associative containers
...
llvm-svn: 5565
2003-02-14 05:34:36 +00:00
Chris Lattner
c4affd76ec
This speeds up processing LLVM a _lot_, 17% in the case of loading and destroying "vortex"
...
llvm-svn: 5553
2003-02-13 19:46:22 +00:00
Chris Lattner
f5c4b08e31
Simplify assertions
...
llvm-svn: 5455
2003-02-01 03:33:22 +00:00
Joel Stanley
dd27536820
Added implementation of alternate CallInst constructors (one ctor is
...
for no actual parameters, and one ctor is for one actual parameter).
llvm-svn: 5452
2003-02-01 00:39:58 +00:00
Chris Lattner
e914281bf0
Fix bug Regression/Verifier/2002-11-05-GetelementptrPointers.ll
...
llvm-svn: 5273
2003-01-14 22:19:44 +00:00
Chris Lattner
02bb00104f
Make type resolution a bit more efficient
...
llvm-svn: 5265
2003-01-14 19:42:39 +00:00
Chris Lattner
7a43d882e2
Fix bug: Assembler/2002-12-15-GlobalResolve.ll
...
llvm-svn: 5039
2002-12-15 16:41:52 +00:00
Chris Lattner
05eed92679
planes is not spelled with an O
...
llvm-svn: 5037
2002-12-15 16:20:23 +00:00
Chris Lattner
5a5648e935
User defined operators are not supposed to live beyond the lifetime of the
...
pass. Detect and flag them.
llvm-svn: 4801
2002-11-21 16:54:22 +00:00
Chris Lattner
b5027095e5
- Eliminated the deferred symbol table stuff in Module & Function, it really
...
wasn't an optimization and it was causing lots of bugs.
llvm-svn: 4779
2002-11-20 18:36:02 +00:00
Chris Lattner
46b6e30fef
Eliminate the concept of a deferred symbol table. The optimization really isn't,
...
and it causes obscure bugs to show up in passes.
llvm-svn: 4777
2002-11-20 18:07:48 +00:00
Chris Lattner
bd2cbecb05
Add a new Module::getNamedFunction method
...
llvm-svn: 4758
2002-11-19 18:41:44 +00:00
Chris Lattner
2698f71007
Add a method "getMainFunction()" that efficiently locates 'main' in a module
...
llvm-svn: 4629
2002-11-08 20:34:02 +00:00
Chris Lattner
31bbb65ef8
Fix nasty bug in ::isNeg()
...
llvm-svn: 4470
2002-10-31 17:09:06 +00:00
Chris Lattner
c084f3ab67
Can simplify code now with the isCommutative() method.
...
llvm-svn: 4461
2002-10-31 04:24:23 +00:00
Chris Lattner
2ce9a55285
New isAssociative/isCommutative inspection methods, graciously contributed by
...
Casey Carter.
llvm-svn: 4459
2002-10-31 04:14:01 +00:00
Misha Brukman
c9c721edf0
Fix spelling of `propagate'.
...
llvm-svn: 4423
2002-10-29 23:06:16 +00:00
Chris Lattner
b565d3ac5b
- Rename AnalysisUsage::preservesAll to getPreservesAll & preservesCFG to
...
setPreservesCFG to be less confusing.
llvm-svn: 4255
2002-10-21 20:00:28 +00:00
Chris Lattner
7be670ef4b
- Eliminate SymbolTable::ParentSymTab, ST::localLookup, and
...
Function::ParentSymTab. These aren't needed at all.
llvm-svn: 4186
2002-10-15 21:26:29 +00:00
Chris Lattner
5b41b28fb6
- Dramatically simplify the Constant::mutateReferences implementation,
...
allowing it to be called on all constant types (structures/arrays)
llvm-svn: 4160
2002-10-14 03:30:23 +00:00
Chris Lattner
1492e49a49
Minor cleanups, no changes to functionality
...
llvm-svn: 4157
2002-10-14 00:48:57 +00:00
Chris Lattner
82f54dca49
- Change Function's so that their argument list is populated when they are
...
constructed. Before, external functions would have an empty argument list,
now a Function ALWAYS has a populated argument list.
llvm-svn: 4149
2002-10-13 20:57:00 +00:00
Chris Lattner
fdf2ca9468
- Rename Instruction::First*Op to *OpsBegin, and Num*Ops to *OpsEnd to
...
reflect the fact that it's a range being defined.
llvm-svn: 4147
2002-10-13 19:39:16 +00:00
Chris Lattner
266bacb650
- Make Value::replaceAllUsesWith work with constants correctly. This fixes
...
bug FuncResolve/2002-08-19-ResolveGlobalVars.ll and gzip looks better.
llvm-svn: 4103
2002-10-09 23:12:59 +00:00
Chris Lattner
0acdba0025
- Add new Constant::replaceUsesOfWithOnConstant which has an end result
...
similar to User::replaceUsesOfWith but actually does the right thing for
constants.
llvm-svn: 4102
2002-10-09 23:12:25 +00:00
Chris Lattner
a8dd29787b
- Remove Value::use_remove
...
llvm-svn: 4090
2002-10-09 00:25:05 +00:00
Chris Lattner
88de60dd26
Fix NASTY N^2 behavior that was causing the gzip benchmark to take forever to
...
assemble. Now we scan the use-list from the back when removing users instead
of from the front.
llvm-svn: 4086
2002-10-08 23:46:55 +00:00
Chris Lattner
4a72e094f9
Fix bug: Assembler/2002-10-08-LargeArrayPerformance.ll by using
...
std::vector::reserve when possible
llvm-svn: 4085
2002-10-08 23:33:52 +00:00
Chris Lattner
c35f54df86
Changes to support PHINode::removeIncoming changes
...
llvm-svn: 4080
2002-10-08 21:36:34 +00:00
Chris Lattner
f868df40b9
- Change PHINode::removeIncomingValue to delete the phi node if the last
...
incoming value is removed!
llvm-svn: 4078
2002-10-08 21:34:58 +00:00
Chris Lattner
b9f59f1533
Expose new "recalculate" method from dominatorset
...
llvm-svn: 4074
2002-10-08 19:12:08 +00:00
Chris Lattner
4e19009255
Global variables are now external if they don't have initializers, not
...
"uninitialized"
llvm-svn: 4052
2002-10-06 22:48:09 +00:00
Chris Lattner
d8244f43d4
Check that we don't have external varaibles with internal linkage
...
llvm-svn: 4051
2002-10-06 22:47:32 +00:00
Chris Lattner
53a414c3c4
PHI nodes are not allowed to exist with zero incoming values, check that
...
there aren't any like this.
llvm-svn: 4044
2002-10-06 21:00:31 +00:00
Chris Lattner
85ba0832e5
Fix a nasty problem with dominance calculation for unreachable blocks.
...
If we had a CFG that look like Entry -> B, Unreachable -> B, then we would
not correctly determine that Entry dominated B, because Entry did not
apparently dominate "unreachable". This patch fixes this by making the entry
node dominate all blocks, including unreachable ones.
llvm-svn: 4037
2002-10-04 14:45:48 +00:00
Chris Lattner
94a5211b6a
- Print the predecessors of a basic block instead of the number of uses of
...
the block in the AsmWriter
llvm-svn: 4019
2002-10-02 19:38:55 +00:00
Chris Lattner
9a8022871b
Make sure to use the TimerGroup that we created!
...
llvm-svn: 3995
2002-10-01 20:12:06 +00:00
Chris Lattner
10fd9ad81e
Make sure not to count the PassManager wrapers
...
llvm-svn: 3994
2002-10-01 20:08:11 +00:00
Chris Lattner
b7a507eb31
Factor timer code out of PassManager implementation, into a generic interface
...
exposed by Support/Timer.h.
llvm-svn: 3993
2002-10-01 19:54:07 +00:00
Chris Lattner
e3eaa16375
Fix a problem that was caused by stale analyses being in CurrentAnalyses
...
llvm-svn: 3981
2002-09-29 22:50:22 +00:00
Chris Lattner
2a7dd8373f
Improve printing of dominator sets
...
llvm-svn: 3976
2002-09-29 21:42:42 +00:00
Chris Lattner
8752bb1cfc
- Add methods to ImmediateDominators & DominatorTree to allow updates
...
- Make DominatorTree::Node not inherit from std::vector
llvm-svn: 3939
2002-09-26 16:14:41 +00:00
Chris Lattner
989b743c33
- Add new ctor to BasicBlock to allow insertion before any BB, not just at
...
the end of the function.
llvm-svn: 3934
2002-09-26 05:03:22 +00:00
Chris Lattner
37ae98efd1
* Fix ugly bug in previous checkin where I reused the name 'i' one too many times
...
* Print out immutable passes in the -debug-pass=Structure report.
llvm-svn: 3923
2002-09-25 22:26:52 +00:00
Chris Lattner
e7d8ee84e7
Add support for ImmutablePasses, which are not run, and cannot be
...
invalidated.
llvm-svn: 3921
2002-09-25 21:59:11 +00:00
Chris Lattner
c86c7ecdb5
Make sure that we abort if an error happens as early as neccesary. Before
...
it was possible for the passmanager to continue running passes after the
verifier even if the module was not well formed.
llvm-svn: 3820
2002-09-19 16:12:19 +00:00
Vikram S. Adve
ee3caccf5c
Remove specification of argument default from cpp file.
...
llvm-svn: 3772
2002-09-17 01:17:57 +00:00
Chris Lattner
547be87c13
Change the MallocInst & AllocaInst ctors to take the allocated type, not the
...
pointer type returned.
llvm-svn: 3711
2002-09-13 22:28:50 +00:00
Chris Lattner
ad291457ef
include/llvm/DataTypes.h includes this #define so we don't need it anymore
...
llvm-svn: 3708
2002-09-13 22:24:57 +00:00
Chris Lattner
dfd0d44c99
Another portability fix provided via Casey Carter:
...
ISSUE: getTimeRecord in lib/VMCore/Pass.cpp uses timeval and
gettimeofday() without including sys/time.h.
ACTION: Include sys/time.h.
llvm-svn: 3699
2002-09-13 14:47:12 +00:00
Chris Lattner
9b5fa33b42
Add a new BasicBlockPass::doInitialization/Finalization(Function &) pair of
...
methods that may be useful for BasicBlockPasses.
llvm-svn: 3688
2002-09-12 17:06:40 +00:00
Chris Lattner
596aa597a6
Give better assertion message for error conditions
...
llvm-svn: 3680
2002-09-11 01:21:04 +00:00
Chris Lattner
1a91b112b7
Allocation insts always have one operand
...
llvm-svn: 3677
2002-09-11 00:22:39 +00:00
Chris Lattner
c882973bf7
Add convenience ctor to BranchInst
...
llvm-svn: 3676
2002-09-10 23:54:58 +00:00
Chris Lattner
00fd7c012d
Tighten up assertion checking for binary operators, not allowing invalid
...
instructions to _even be created_.
llvm-svn: 3661
2002-09-10 19:57:53 +00:00
Chris Lattner
a63519afc8
Add support for printing constpointerrefs more nicely
...
llvm-svn: 3654
2002-09-10 15:53:49 +00:00
Chris Lattner
59efee4bf0
Add capability to insert an instruction into a basic block immediately after
...
it is created, as part of the ctor call.
Eliminate the GenericBinaryInst class
llvm-svn: 3653
2002-09-10 15:45:53 +00:00
Chris Lattner
a88aeefa30
Fix typeo in assertion message
...
llvm-svn: 3641
2002-09-10 04:52:59 +00:00
Chris Lattner
aac1fc4581
Do not allow adds of pointer types, or many other operations on pointer types.
...
llvm-svn: 3638
2002-09-09 20:26:04 +00:00
Chris Lattner
ba447dd0a3
Enable "garbage detection" of LLVM objects. Check for leaks after running
...
every pass.
llvm-svn: 3621
2002-09-08 19:00:07 +00:00
Chris Lattner
3d630b954f
Enable "garbage detection" of LLVM objects. Now users should be obnoxious
...
warnings. If they accidentally leak LLVM Value's.
llvm-svn: 3620
2002-09-08 18:59:35 +00:00
Chris Lattner
c1e61532a0
Move code out of header files into .cpp files to make future changes easier
...
llvm-svn: 3605
2002-09-06 21:33:15 +00:00
Chris Lattner
01f30bf2a0
* Remove extraneous #includes
...
* Add extra argument to Function ctor to allow automatic insertion into module
llvm-svn: 3600
2002-09-06 20:46:32 +00:00
Chris Lattner
c78ae565ef
Implement setcc for booleans. Fixes bug:
...
test/Regression/Transforms/ConstProp/2002-09-03-SetCC-Bools.ll
llvm-svn: 3576
2002-09-03 20:09:49 +00:00
Chris Lattner
3ce5b343c5
- Renamed Type::isIntegral() to Type::isInteger()
...
- Added new method Type::isIntegral() that is the same as isInteger, but
also accepts bool.
llvm-svn: 3574
2002-09-03 01:08:28 +00:00
Chris Lattner
5775f64365
- Exposed SetCondInst::getInverseCondition & ::getSwappedCondition better
...
llvm-svn: 3562
2002-09-01 19:46:40 +00:00
Chris Lattner
67f9108e98
- Use Pass::AnalysisImpls instead of findAnalysisGroupMemeber
...
- -debug-pass=Details now prints implementation class names for analysis
groups
- Rework how AnalysisGroups are resolved to be simpler and better.
llvm-svn: 3535
2002-08-30 20:25:01 +00:00
Chris Lattner
f743017498
- PassManager prints analysis sets nicer
...
- Use Pass::AnalysisImpls instead of findAnalysisGroupMemeber
llvm-svn: 3534
2002-08-30 20:23:45 +00:00
Chris Lattner
cc9d7e01c9
Add support for turning an array of characters into a string.
...
llvm-svn: 3509
2002-08-26 17:53:56 +00:00
Chris Lattner
20b85d96e4
Eliminated the MemAccessInst class, folding contents into GEP class.
...
llvm-svn: 3487
2002-08-22 23:37:20 +00:00
Chris Lattner
969c616d51
Load & StoreInst no longer derive from MemAccessInst, so we don't have
...
to handle indexing anymore
llvm-svn: 3485
2002-08-22 22:49:05 +00:00
Chris Lattner
d123fc1e41
Load and Store now no longer derive from MemAccessInst. Indexing a load or
...
store is not possible anymore.
llvm-svn: 3482
2002-08-22 22:47:47 +00:00
Chris Lattner
e6cf772ddd
Fix bug: test/Regression/Assembler/2002-08-22-DominanceProblem.ll
...
llvm-svn: 3474
2002-08-22 20:39:29 +00:00
Chris Lattner
1ae38466e6
- Fighting with linking problem due to removing the ::ID elements. Now the
...
implementation .cpp files for analyses are not being included into gccas
and friends because it is linking to the .a file and there is no explicit
symbol reference to bring in the .o file. The new IncludeFile hack is the
result.
llvm-svn: 3436
2002-08-21 23:51:51 +00:00
Chris Lattner
3597405d6d
Remove debugging code accidentally checked in.
...
llvm-svn: 3430
2002-08-21 22:49:31 +00:00
Chris Lattner
02221dc679
- Implement the new AnalysisGroup feature, neccesary for Value#ing and pointer analysis
...
llvm-svn: 3426
2002-08-21 22:17:09 +00:00
Chris Lattner
ae2d7ffd42
- Do not expose ::ID from any of the analyses anymore.
...
llvm-svn: 3415
2002-08-21 17:09:15 +00:00
Chris Lattner
a63cce4e99
- Eliminate the need for analyses to expose an ::ID member.
...
llvm-svn: 3414
2002-08-21 17:08:37 +00:00
Chris Lattner
6c2d688d20
Sort -time-passes report first by user+system, then by Wall clock time.
...
llvm-svn: 3407
2002-08-20 18:47:53 +00:00
Chris Lattner
0d58102c1c
Add new SetCondInst::getInverseCondition() method.
...
llvm-svn: 3405
2002-08-20 18:17:12 +00:00
Chris Lattner
85290b6ab3
Add missing space
...
llvm-svn: 3387
2002-08-19 20:42:12 +00:00
Chris Lattner
fe91f23c6d
Fix the -time-passes option to not print NaN when there is zero execution time
...
llvm-svn: 3382
2002-08-19 15:43:33 +00:00
Chris Lattner
45aae6cd96
- ConstantPointerRefs are now automatically removed from the module table
...
when they are destroyed, which makes Constant::destroyConstant an actually
useful external interface. Expose these methods publicly.
- Implement destroyConstant on ConstPointerNull so that destroyConstant can
be used on any derived type constant safely.
llvm-svn: 3379
2002-08-18 00:40:04 +00:00
Chris Lattner
143e810ca9
Add Module::dump() method
...
llvm-svn: 3375
2002-08-17 23:32:47 +00:00
Chris Lattner
e63ef1c3ab
Changed parser to always use parenthesis on ConstExprs to be consistent
...
llvm-svn: 3363
2002-08-16 21:17:11 +00:00
Chris Lattner
0d1bc11665
Write constexpr casts using the cast X to Y notation, not using the implicit
...
type result
llvm-svn: 3354
2002-08-15 19:37:43 +00:00
Chris Lattner
4a542aeb38
Simplify the code
...
llvm-svn: 3348
2002-08-15 16:15:36 +00:00
Vikram S. Adve
c66b996e40
Added more helper functions for binary instructions emulating
...
unary Neg and Not: isNeg, isNot, getNegArgument, and getNotArgument.
llvm-svn: 3341
2002-08-15 14:15:48 +00:00
Chris Lattner
6a9d88347a
Remove support for Not ConstantExpr. This simplifies the unary case to only
...
have to support the cast instruction, so the function is renamed to getCast.
llvm-svn: 3328
2002-08-14 18:24:09 +00:00
Chris Lattner
d909e03b2e
Remove support for unary operators.
...
llvm-svn: 3326
2002-08-14 18:19:46 +00:00
Chris Lattner
980bf4b44d
Remove support for NOT instruction
...
llvm-svn: 3323
2002-08-14 18:18:02 +00:00
Chris Lattner
794511bf40
Implement two constructor functions for "unary" instructions
...
llvm-svn: 3317
2002-08-14 17:52:27 +00:00
Chris Lattner
9f528df0ad
Remove support forNOT instruction
...
llvm-svn: 3316
2002-08-14 17:52:06 +00:00
Chris Lattner
26186786e1
Return null on failure, instead of aborting.
...
llvm-svn: 3308
2002-08-14 17:12:13 +00:00
Chris Lattner
b639abc322
- Rename ConstantGenericIntegral -> ConstantIntegral
...
- Add new methods to ConstantIntegral: getMaxValue, getMinValue,
getAllOnesValue
llvm-svn: 3299
2002-08-13 17:50:20 +00:00
Chris Lattner
4fbca59155
- Added a new superclass of ConstantBool/ConstantInt: ConstantGenericIntegral
...
- Moved InstCombine: isMaxValue, isMinValue, isAllOnesValue to Constants.h
llvm-svn: 3293
2002-08-12 21:21:21 +00:00
Chris Lattner
ba82fa7aeb
Remove some extraneous #includes
...
llvm-svn: 3289
2002-08-12 20:24:46 +00:00
Chris Lattner
f439d24c89
Changes to make GlobalValueRefMap not derive from std::map.
...
llvm-svn: 3288
2002-08-12 20:23:29 +00:00
Chris Lattner
d2d8928f1b
UnaryOperator::create should take a name just like BinaryOperator::create
...
llvm-svn: 3279
2002-08-09 21:39:38 +00:00
Chris Lattner
91d4742562
- Cleaned up the interface to AnalysisUsage to take analysis class names
...
instead of ::ID's.
- Pass::getAnalysis<> now no longer takes an optional argument
llvm-svn: 3264
2002-08-08 19:01:28 +00:00
Chris Lattner
e980c93ebc
Implement dominator checking in the verifier, so that we check that all
...
defintiions dominate their uses
llvm-svn: 3214
2002-08-02 17:37:08 +00:00
Chris Lattner
7c8f92eacc
Fix bug: test/Regression/Other/2002-08-02-DomSetProblem.ll
...
llvm-svn: 3213
2002-08-02 16:51:27 +00:00
Chris Lattner
829a3f1c3a
Split dominance calculation and post dominance calculation stuff
...
Dominance calculation goes to VMCore library to be used by Verifier.
llvm-svn: 3210
2002-08-02 16:43:03 +00:00
Chris Lattner
41280182a6
Enhance -time-passes to be more detailed and useful
...
llvm-svn: 3199
2002-08-01 19:33:09 +00:00
Chris Lattner
8adb533609
Fix bug: test/Regression/Assembler/2002-07-31-SlashInString.llx
...
llvm-svn: 3195
2002-07-31 23:56:44 +00:00
Chris Lattner
24f5355b1f
*** empty log message ***
...
llvm-svn: 3185
2002-07-31 19:32:01 +00:00
Chris Lattner
ed762542ec
We need iostream in PassManagerT.h to use cerr
...
llvm-svn: 3183
2002-07-31 18:04:17 +00:00
Chris Lattner
5e3350bca8
Implement new -debug-pass=Arguments option that causes PassManager to
...
print out the command line options for the optimizations it is running.
llvm-svn: 3165
2002-07-30 19:51:02 +00:00
Chris Lattner
1720a4c0b7
Cleanup ConstantExpr handling:
...
* Correctly delete TypeHandles in AsmParser. In addition to not leaking
memory, this prevents a bug that could have occurred when a type got
resolved that the constexpr was using
* Check for errors in the AsmParser instead of hitting assertion failures
deep in the code
* Simplify the interface to the ConstantExpr class, removing unneccesary
parameters to the ::get* methods.
* Rename the 'getelementptr' version of ConstantExpr::get to
ConstantExpr::getGetElementPtr
llvm-svn: 3161
2002-07-30 18:54:25 +00:00
Chris Lattner
57c110ce62
Declare that these passes only depend on the CFG of the function
...
llvm-svn: 3157
2002-07-30 16:27:52 +00:00
Chris Lattner
a7bcc10581
* Move some code from Pass.cpp to PassManagerT.h
...
* Implement stuff so that code can declare that they only depend on the CFG of
a function, not on anything else. This speeds up GCCAS a lot.
llvm-svn: 3155
2002-07-30 16:27:02 +00:00
Chris Lattner
a7780b88ae
Implement constant propogation of logical (and, or, xor) expressions.
...
Fixes testcase: test/Regression/Transforms/ConstProp/logicaltest.ll
llvm-svn: 3154
2002-07-30 16:24:28 +00:00
Chris Lattner
ef6729c9ca
* Eliminate the Provided set. All Passes now finally just automatically
...
provide themselves.
llvm-svn: 3125
2002-07-29 21:03:38 +00:00
Chris Lattner
b202b77aab
* Eliminate the Provided set. All Passes now finally just automatically
...
provide themselves.
llvm-svn: 3124
2002-07-29 21:03:33 +00:00
Chris Lattner
fd9fefa8f6
* PassInfo is allowed to be missing now (ie, not all passes need be registered)
...
* getPassName uses PassInfo if it's available
* PassInfo is now cached in the pass so that it is only looked up once, maximum
llvm-svn: 3123
2002-07-29 21:02:31 +00:00
Chris Lattner
ec2780457d
* Standardize how analysis results/passes as printed with the print() virtual
...
methods
* Eliminate AnalysisID: Now it is just a typedef for const PassInfo*
* Simplify how AnalysisID's are initialized
* Eliminate Analysis/Writer.cpp/.h: incorporate printing functionality into
the analyses themselves.
llvm-svn: 3116
2002-07-27 01:12:17 +00:00
Chris Lattner
7a9eb848cd
* Add support for different "PassType's"
...
* Add new RegisterOpt/RegisterAnalysis templates for registering passes that
are to show up in opt or analyze
* Register Analyses now
* Change optimizations to use RegisterOpt instead of RegisterPass
* Add support for different "PassType's"
* Add new RegisterOpt/RegisterAnalysis templates for registering passes that
are to show up in opt or analyze
* Register Analyses now
* Change optimizations to use RegisterOpt instead of RegisterPass
* Remove getPassName implementations from various subclasses
llvm-svn: 3113
2002-07-26 21:12:46 +00:00
Chris Lattner
b934722f1b
* Add support for different "PassType's"
...
* Add new RegisterOpt/RegisterAnalysis templates for registering passes that
are to show up in opt or analyze
* Register Analyses now
* Change optimizations to use RegisterOpt instead of RegisterPass
* Add support for different "PassType's"
* Add new RegisterOpt/RegisterAnalysis templates for registering passes that
are to show up in opt or analyze
* Register Analyses now
* Change optimizations to use RegisterOpt instead of RegisterPass
* Remove getPassName implementations from various subclasses
llvm-svn: 3112
2002-07-26 21:12:44 +00:00
Chris Lattner
ec1a192b16
*** empty log message ***
...
llvm-svn: 3105
2002-07-26 18:40:14 +00:00
Chris Lattner
32f5f52f92
Fix typeo that caused bug:
...
test/Regression/Assembler/2002-07-25-ReturnPtrFunction.llx
llvm-svn: 3103
2002-07-25 20:58:51 +00:00
Chris Lattner
2aa4420d83
Fix bug: test/Regression/Assembler/2002-07-25-QuoteInString.llx
...
llvm-svn: 3099
2002-07-25 20:32:37 +00:00
Chris Lattner
236035cb2f
Avoid warning: control reaches end of non-void function
...
llvm-svn: 3081
2002-07-25 15:39:05 +00:00
Chris Lattner
5f11498859
*** empty log message ***
...
llvm-svn: 3065
2002-07-24 22:08:53 +00:00
Chris Lattner
f6ee6b24da
Register Verifier pass
...
llvm-svn: 3019
2002-07-23 18:08:17 +00:00
Chris Lattner
5bd073503d
Add support for pass registration
...
llvm-svn: 3018
2002-07-23 18:08:00 +00:00
Chris Lattner
cc707df01a
Register Writer passes
...
llvm-svn: 3017
2002-07-23 18:07:49 +00:00
Chris Lattner
24bcbdd155
*** empty log message ***
...
llvm-svn: 3002
2002-07-23 17:52:38 +00:00
Chris Lattner
99ad379582
*** empty log message ***
...
llvm-svn: 2985
2002-07-22 02:10:13 +00:00
Chris Lattner
6be9ee3029
* ConstExpr::getelementptr now takes a vector of Constants not Values
...
* Assert things instead of printing an error and returning null.
llvm-svn: 2949
2002-07-18 00:14:50 +00:00
Chris Lattner
9b1f5682b5
Add a hack to check for a subset of true dominance properties
...
llvm-svn: 2947
2002-07-18 00:13:42 +00:00
Anand Shukla
a8a95f234b
added std:: to cerr and endl
...
llvm-svn: 2914
2002-07-16 00:02:17 +00:00
Vikram S. Adve
45eeb8e738
Ensure ConstExpr constants are unique using a
...
map of <opcode, operands> to ConstExpr.
llvm-svn: 2909
2002-07-15 18:19:33 +00:00
Vikram S. Adve
ca1f1c58e1
Added support to write out ConstantExpr nodes.
...
Also, avoid asserting out when writing out an invalid tree
since the assembly writer is used when debugging.
llvm-svn: 2902
2002-07-14 23:14:45 +00:00
Vikram S. Adve
d670638ee6
Added subclass ConstantExpr to represent expressions consructed from
...
constants using operators such as cast, getelementptr, add, shl, etc.
Note that a ConstantExpr can be of any type, so classof() in most
other subclasses (that discriminate by type) have to check that it
is also not a ConstantExpr.
llvm-svn: 2901
2002-07-14 23:13:17 +00:00
Vikram S. Adve
846a1514c8
Create a static version of Instruction::getOpcodeName(opCode) that
...
can be invoked with only an opcode (i.e., without an instruction).
Move all opCode->opCodeName translations there.
llvm-svn: 2900
2002-07-14 23:09:40 +00:00
Chris Lattner
c27a459095
*** empty log message ***
...
llvm-svn: 2852
2002-07-10 16:48:17 +00:00
Vikram S. Adve
da5e272403
Moved MachineCodeForBB to be an annotation on BasicBlock.
...
llvm-svn: 2818
2002-07-08 22:31:11 +00:00
Chris Lattner
a590093513
*** empty log message ***
...
llvm-svn: 2813
2002-06-30 16:25:25 +00:00
Anand Shukla
62f8f85b50
changes for 64bit gcc
...
llvm-svn: 2801
2002-06-25 22:07:38 +00:00
Anand Shukla
5dbf11fc92
added include<iostream> for cerr
...
llvm-svn: 2800
2002-06-25 22:04:00 +00:00
Chris Lattner
dfd421a7df
MEGAPATCH checkin.
...
For details, See: docs/2002-06-25-MegaPatchInfo.txt
llvm-svn: 2779
2002-06-25 16:13:24 +00:00
Chris Lattner
12075bfedd
* Update to work with Megapatch
...
* Add two new checks:
* PHI nodes must be the first thing in a basic block, all grouped together
* All basic blocks should only end with terminator insts, not contain them
llvm-svn: 2773
2002-06-25 15:56:27 +00:00
Chris Lattner
365806ddf7
Support opaque type printing a little bit at least
...
llvm-svn: 2748
2002-05-26 20:17:54 +00:00
Chris Lattner
2cf3917aae
Fix bug: test/Regression/Transforms/ADCE/2002-05-23-ZeroArgPHITest.ll
...
Which contains a description of why this is neccesary.
llvm-svn: 2733
2002-05-23 16:52:34 +00:00
Chris Lattner
9c56a9e21b
Avoid creating the symbol table if we don't need it.
...
llvm-svn: 2728
2002-05-22 22:53:05 +00:00
Chris Lattner
37107da53e
Print out function name with % style instead of "" style
...
llvm-svn: 2726
2002-05-22 22:29:26 +00:00
Chris Lattner
e628d8b2b9
Fix bug: test/Regression/Transforms/CFGSimplify/2002-05-21-PHIElimination.ll
...
llvm-svn: 2694
2002-05-21 19:52:49 +00:00
Chris Lattner
f7333e31a1
Avoid emitting a useless comment for a basic block with no uses (which
...
often happens for the entry basic block of a function)
llvm-svn: 2624
2002-05-14 16:02:05 +00:00
Chris Lattner
2735171cf5
Add method to check to see if two _Instructions_ dominate each other
...
llvm-svn: 2616
2002-05-13 22:03:16 +00:00
Chris Lattner
590bcc9629
We actually need this code for the release build to prevent link errors,
...
un#ifdef it.
llvm-svn: 2606
2002-05-10 18:54:35 +00:00
Chris Lattner
6453305616
Verify that function call arguments match the function signature
...
llvm-svn: 2553
2002-05-08 19:49:50 +00:00
Chris Lattner
c636f5427b
Implement constant propogation of PHI instructions like this:
...
X = phi(0, 0, 0)
llvm-svn: 2543
2002-05-07 20:44:59 +00:00
Chris Lattner
f7806b0212
Move UnifyFunctionExitNodes to Utils library: final resting place this time
...
llvm-svn: 2531
2002-05-07 19:18:48 +00:00
Chris Lattner
9e1c79995e
Updates to move some header files out of include/llvm/Transforms into
...
the Scalar and Utils subdirectories
llvm-svn: 2523
2002-05-07 18:36:35 +00:00
Chris Lattner
44c4a3f18f
Mark analyses that only depend on the CFG of a function
...
llvm-svn: 2507
2002-05-06 19:32:07 +00:00
Chris Lattner
06c3ae573f
Make functions that preserve the CFG not invalidate analyses that only depend
...
on the CFG of a function
llvm-svn: 2506
2002-05-06 19:31:52 +00:00
Chris Lattner
e2242ebf8e
Move code out of header file
...
llvm-svn: 2498
2002-05-06 17:54:27 +00:00
Chris Lattner
fd8d5b852c
Replace all usages of Type::isPointerType with isa<PointerType>
...
llvm-svn: 2486
2002-05-06 16:15:30 +00:00
Chris Lattner
17ac289374
Implement getPrimitiveSize()
...
don't use isPointerType()
llvm-svn: 2485
2002-05-06 16:14:39 +00:00
Chris Lattner
5b5663b806
Implement constant propogation of shifts
...
llvm-svn: 2470
2002-05-06 03:00:54 +00:00
Chris Lattner
dfb7d63b15
Print functions with curly braces instead of begin/end
...
llvm-svn: 2469
2002-05-06 03:00:40 +00:00
Chris Lattner
1d4e297a65
Implement two iterator remove method
...
llvm-svn: 2467
2002-05-06 02:59:34 +00:00
Chris Lattner
7c3c3eefcc
Implement remainder
...
Fix implementation of Not
llvm-svn: 2464
2002-05-03 21:41:07 +00:00
Chris Lattner
0c91866478
Fix bug: test/Regression/Transforms/SCCP/2002-05-03-NotOperator.ll
...
by using the ~ operator instead of !
llvm-svn: 2458
2002-05-03 20:09:52 +00:00
Chris Lattner
bbd002a9ca
The implementation keyword is no longer neccesary
...
llvm-svn: 2434
2002-05-02 19:11:29 +00:00
Chris Lattner
8eb37c77d6
Fix problem where subpasses would invalidate all analyses outstanding
...
llvm-svn: 2418
2002-04-30 18:50:17 +00:00
Chris Lattner
2716e9868c
Make the range insert operation return an iterator, even though the STL
...
range insert doesn't
llvm-svn: 2413
2002-04-29 21:23:30 +00:00
Chris Lattner
a2c59f1302
Changes so that iMemory.h doesn't include DerivedTypes.h
...
llvm-svn: 2404
2002-04-29 18:46:50 +00:00
Chris Lattner
96e0c48175
Eliminate duplicate or unneccesary #include's
...
llvm-svn: 2397
2002-04-29 17:42:12 +00:00
Chris Lattner
589debc4ba
Add new optional getPassName() virtual function that a Pass can override
...
to make debugging output a lot nicer.
llvm-svn: 2395
2002-04-29 14:57:45 +00:00
Chris Lattner
6285ebca7d
Add a new command line option for PassManager using utilities.
...
Now for llc, gccas, analyze, opt, etc you can specify the -time-passes
command line option that outputs a timing summary report that indicates
how long each pass takes to execute.
llvm-svn: 2394
2002-04-29 04:04:29 +00:00
Chris Lattner
c760a6a4f4
Todo has been implemented, remove it
...
llvm-svn: 2387
2002-04-28 21:45:02 +00:00
Chris Lattner
ec70d92221
Tighten up the AnalysisUsage of lots of passes, primarily to correctly indicate whether or not they invalidate the CFGA
...
llvm-svn: 2386
2002-04-28 21:27:06 +00:00
Chris Lattner
c74c58800a
Move FunctionPass::doesNotModifyCFG to AnalysisUsage::preservesCFG()
...
llvm-svn: 2384
2002-04-28 21:25:41 +00:00
Chris Lattner
c64ef6740a
* Add a stub to FunctionPass so that subclasses can declare that they do not
...
modify the CFG. It currently does nothing, but will in the future.
* Changes to make the public PassManager.h be MUCH smaller, and devoid of
implementation details. Now PassManager is just a Pimpl class that wraps
PassManagerT<Module>, but lib/VMCore/Pass.cpp is now the only class that
has to #include PassManagerT.h
llvm-svn: 2383
2002-04-28 20:46:05 +00:00
Chris Lattner
f6c808bc29
Move include/llvm/PassManager.h to lib/VMCore/PassManagerT.h
...
llvm-svn: 2382
2002-04-28 20:42:50 +00:00
Chris Lattner
321a8cf4ba
Split ConstantVals.h into Constant.h and Constants.h
...
llvm-svn: 2378
2002-04-28 19:55:58 +00:00
Chris Lattner
07fe96ca98
Eliminate the cfg namespace, moving LoopInfo, Dominators, Interval* classes
...
to the global namespace
llvm-svn: 2370
2002-04-28 16:21:30 +00:00
Chris Lattner
0431ac1783
Remove extra unused argument from CheckFailed method
...
Remove extraneous \n's from assert strings
llvm-svn: 2367
2002-04-28 16:06:24 +00:00
Chris Lattner
600135a049
The check to see if an external function was marked internal was not reachable!
...
llvm-svn: 2366
2002-04-28 16:04:26 +00:00
Chris Lattner
514c7b752e
Minor changes to allow Modules (which are no longer Values) to work
...
llvm-svn: 2361
2002-04-28 05:14:06 +00:00
Chris Lattner
38e114c016
The contents of the SymTabValue class have been incorporated into the
...
Module and Function classes directly.
llvm-svn: 2356
2002-04-28 04:52:28 +00:00
Chris Lattner
602655926c
* Incorporate the contents of SymTabValue into Function and Module
...
* Module no longer subclasses Value
llvm-svn: 2355
2002-04-28 04:51:51 +00:00
Chris Lattner
07da09cd34
Module's are no longer values
...
llvm-svn: 2354
2002-04-28 04:51:09 +00:00
Chris Lattner
741453dd60
Change the Dominator info and LoopInfo classes to keep track of BasicBlock's, not
...
const BasicBlocks
llvm-svn: 2337
2002-04-28 00:15:57 +00:00
Chris Lattner
2f0ee1833d
s/Method/Function
...
llvm-svn: 2336
2002-04-27 07:27:19 +00:00
Chris Lattner
536cf1b13f
* Rename MethodPass class to FunctionPass
...
- Rename runOnMethod to runOnFunction
* Transform getAnalysisUsageInfo into getAnalysisUsage
- Method is now const
- It now takes one AnalysisUsage object to fill in instead of 3 vectors
to fill in
- Pass's now specify which other passes they _preserve_ not which ones
they modify (be conservative!)
- A pass can specify that it preserves all analyses (because it never
modifies the underlying program)
* s/Method/Function/g in other random places as well
llvm-svn: 2333
2002-04-27 06:56:12 +00:00
Chris Lattner
543ab06854
Trivial simplification of code
...
llvm-svn: 2325
2002-04-27 02:26:03 +00:00
Chris Lattner
83819833b1
* Change Constant::getNullConstant to Constant::getNullValue
...
* Remove some unused code
llvm-svn: 2324
2002-04-27 02:25:43 +00:00
Chris Lattner
73791c9610
* Abort program on verification errors
...
* Verify that load, store, and GEP instructions indices are correct, because
they _continually_ bite me on this pool allocations stuff
llvm-svn: 2309
2002-04-24 19:12:21 +00:00
Chris Lattner
bffa0990cf
Add some basic checks of CallInst's.
...
Assert now returns from the current function on error.
llvm-svn: 2308
2002-04-18 22:11:52 +00:00
Chris Lattner
60f426703d
* Convert the verifier to use an InstVisitor to be better structured
...
* Implement checking that a binary operator's two sides are the same type
* Actually check that an instruction does not have a name if it has a void
return type.
llvm-svn: 2305
2002-04-18 20:37:37 +00:00
Chris Lattner
8f81cd7da6
Move asmwriter/getStrValue cruft into AsmWriter.cpp file.
...
llvm-svn: 2300
2002-04-18 18:53:33 +00:00
Chris Lattner
f1dee31d23
Pull all of the getStrValue implementation cruft out of Constants.cpp and
...
put it into the AsmWriter. This code is kinda gross and could probably be
cleaned up, but not now.
llvm-svn: 2299
2002-04-18 18:53:13 +00:00
Chris Lattner
e2f1e01fc1
Remove gep::isStructSelector
...
CTor's do not allow names anymore for StoreInst objects
llvm-svn: 2285
2002-04-18 14:44:53 +00:00
Chris Lattner
f1dd584bbe
Remove old frivolous uses of getStrValue in a debugging statement
...
llvm-svn: 2270
2002-04-16 21:36:59 +00:00
Chris Lattner
c43b279e94
Remove unneccesary cast
...
llvm-svn: 2269
2002-04-16 21:36:29 +00:00
Chris Lattner
10c22c6970
Changes to:
...
* Fix bug printing method types (oops when converting previous code)
* Move some of the code from Constant::getStrValue implementations here.
This allows us to do a MUCH MUCH better job printing out complex constant
values (think an array of structure pointers), because we print symbolic
type names instead of structural. The assistance when debugging is immense
Eventually, Constant::getStrValue should be removed (it existed before because
the asmwriter file was not in VMCore), and everyone should go through the
asmwriter that want's equivalent functionality.
llvm-svn: 2268
2002-04-16 21:36:08 +00:00
Chris Lattner
0bc26610af
* Fix bug: test/Regression/Verifier/2002-04-13-RetTypes.ll
...
* Check that arguments match the method types of the method they live in
llvm-svn: 2243
2002-04-13 22:48:46 +00:00
Chris Lattner
c0505e8d4e
Minor bugfix for previous checkin
...
llvm-svn: 2241
2002-04-13 21:11:04 +00:00
Chris Lattner
5496a44cc2
* Remove obselete code for unsized arrays
...
* Add new function printTypeAtLeastOneLevel used to...
* Print the symbol table *WITH SYMBOLIC TYPES*. Now we get:
%tree = type { int, %tree*, %tree* }
in the type definition section of the disassembled output instead of
%tree = type { int, \2*, \2* }
the different for the health benchmark and power are simply amazing.
llvm-svn: 2240
2002-04-13 20:53:41 +00:00
Chris Lattner
92b32c82bf
Add Module::getTypeName
...
llvm-svn: 2237
2002-04-13 18:58:33 +00:00
Chris Lattner
a4bce481d6
* Clean up code to use isa & dyncast instead of poking directly into instructions
...
* Do not print the allocation size for a non array allocation (this used to work,
but was broken).
llvm-svn: 2235
2002-04-13 18:34:38 +00:00
Chris Lattner
d1d6edad49
* Add comment
...
* Do not print a space before the * in a pointer type.
llvm-svn: 2232
2002-04-12 18:21:53 +00:00
Chris Lattner
ed2a2c0c57
Add new check of return value type matching ret instruction values types
...
llvm-svn: 2230
2002-04-12 18:20:49 +00:00
Chris Lattner
8584e40a86
Fix pure virtual function called exception!
...
llvm-svn: 2229
2002-04-12 18:19:45 +00:00
Chris Lattner
5e12c7caf5
Move FunctionArgument out of iOther.h into Argument.h and rename class to
...
be 'Argument' instead of FunctionArgument.
llvm-svn: 2216
2002-04-09 19:48:49 +00:00
Chris Lattner
37a1b36f0a
Move FunctionArgument out of iOther.h into Argument.h and rename class to
...
be 'Argument' instead of FunctionArgument.
Move implementation to Function.cpp
llvm-svn: 2212
2002-04-09 19:39:58 +00:00
Chris Lattner
0eb1e7c044
Move FunctionArgument out of iOther.h into Argument.h and rename class to
...
be 'Argument' instead of FunctionArgument.
Move Argument implementation to Function.cpp
llvm-svn: 2211
2002-04-09 19:39:35 +00:00
Chris Lattner
bcca3f108e
Add a couple of extra casts to avoid extra #include
...
llvm-svn: 2206
2002-04-09 18:37:08 +00:00
Chris Lattner
b579d93f7f
Add a couple of extra casts to avoid having to add #include
...
llvm-svn: 2205
2002-04-09 18:36:52 +00:00
Chris Lattner
9a2cf06433
*blush* somehow this debugging code got checked in...
...
llvm-svn: 2187
2002-04-09 05:10:39 +00:00
Chris Lattner
c8166cec07
s/Method/Function
...
llvm-svn: 2180
2002-04-08 22:03:57 +00:00
Chris Lattner
5046c084ec
* Narrow AsmWriter interface
...
* Implement Value::print methods here instead of WriteToAssembly
llvm-svn: 2179
2002-04-08 22:03:40 +00:00
Chris Lattner
44f14449c4
ConstantHandling moved into VMCore library
...
llvm-svn: 2165
2002-04-08 20:18:09 +00:00
Chris Lattner
7083f2bcf0
Move include/llvm/ValueHolderImpl.h to lib/VMCore/ValueHolderImpl.h
...
llvm-svn: 2156
2002-04-08 00:15:29 +00:00
Chris Lattner
137fa92dce
* Move include/llvm/Analysis/SlotCalculator.h to include/llvm/SlotCalculator.h
...
because the slot calculator is already part of the VMCore library.
* Rename incorporateMethod and purgeMethod to *Function
llvm-svn: 2154
2002-04-07 22:49:37 +00:00
Chris Lattner
0b712a046b
Remove some gross code by using the Value::dump method to do debug dumps
...
llvm-svn: 2150
2002-04-07 22:33:13 +00:00
Chris Lattner
47f1f0e588
Remove some gross code by using the VAlue::dump method to do debug dumps
...
llvm-svn: 2149
2002-04-07 22:32:25 +00:00
Chris Lattner
c994519230
Update comments
...
Implement Value::dump here.
llvm-svn: 2148
2002-04-07 22:31:46 +00:00
Chris Lattner
bc15ae64dd
Change references to the Method class to be references to the Function
...
class. The Method class is obsolete (renamed) and all references to it
are being converted over to Function.
llvm-svn: 2144
2002-04-07 20:49:59 +00:00
Chris Lattner
96135c924f
Fix Bug: test/Regression/Other/2002-04-07-InfConstant.ll
...
llvm-svn: 2142
2002-04-07 08:42:53 +00:00
Chris Lattner
1c83a4a20c
Fix bug: test/Regression/Other/2002-04-07-HexFloatConstants.ll
...
llvm-svn: 2141
2002-04-07 08:37:11 +00:00
Chris Lattner
e7b5d159c5
Implement constant propogation of multiply and divide instructions!!
...
llvm-svn: 2134
2002-04-07 08:10:14 +00:00
Chris Lattner
d81ca8a752
* Make all of the refineAbstractType functions work identically
...
* Remove ambiguous code that caused problems with understanding how stuff
worked.
* Implement DerivedType::typeIsRefined right. Add a big comment talking
about it.
* The removeUserFromConcrete method already checks to see if the type is
not abstract, so no need to duplicate the test all over this code
This checkin makes all of the type parsing related failures work. All
Assembler Regression tests now pass!
llvm-svn: 2127
2002-04-07 06:14:56 +00:00
Chris Lattner
35c1a4347b
* Reenable apparently neccesary code, that breaks testcases when enabled,
...
but causes MANY FUNDAMENTAL PROBLEMS when not enabled. :(
* Add debugging function
llvm-svn: 2125
2002-04-06 00:21:11 +00:00
Chris Lattner
83b6eecc84
* FIX: test/Regression/Assembler/2002-02-19-TypeParsing.ll
...
That was due to the StructType object not getting called multiple times
to remove itself from the ATU list for an object, because it stopped
getting queried due to this wrong test
* Improve debug output when DEBUG_MERGE_TYPES is on
llvm-svn: 2124
2002-04-05 23:02:46 +00:00
Chris Lattner
68857bb2bf
* Move DerivedType::addAbstractTypeUser from DerivedType.h
...
* Refactor a bunch of code. Types now only remove one subelement at a time
when they are told that they have changed
* Improve debugging output, add more assertions...
* FIX Bugs:
* test/Regression/Assembler/2002-04-04-PureVirtMethCall.ll
* test/Regression/Assembler/2002-04-04-PureVirtMethCall2.ll
* The change to fix these bugs was the to ValTypeBase::refineAbstractType
method. Basically we #if 0'd out the chunk of code there and make the
table get reorganized EVEN IF the type has the same pointer. Merging
opportunities were being missed!
llvm-svn: 2121
2002-04-05 22:25:26 +00:00
Chris Lattner
3b80438423
Clean up debugging code
...
llvm-svn: 2119
2002-04-05 19:53:06 +00:00
Chris Lattner
e105f97672
* Refactor loop in removeAbstractTypeUser to be more clear
...
* Fix a bug in DerivedType::refineAbstractTypeTo that caused
test/Regression/Assembler/2002-04-05-TypeParsing.ll to fail.
The added comment describes the fix
llvm-svn: 2118
2002-04-05 19:44:07 +00:00
Chris Lattner
8afff0c29a
s/MethodType/FunctionType
...
llvm-svn: 2115
2002-04-04 22:19:18 +00:00
Chris Lattner
39d7d981ed
Make build work in release mode
...
llvm-svn: 2113
2002-04-04 19:35:24 +00:00
Chris Lattner
ffc9ef8be9
Make the release build work
...
llvm-svn: 2109
2002-04-04 19:26:26 +00:00
Chris Lattner
87cabdd757
* Add debug support for PATypeHolder
...
* PATypeHolder is now not a template
llvm-svn: 2108
2002-04-04 19:26:02 +00:00
Chris Lattner
a0a6c8d4a2
Make the release build compile
...
llvm-svn: 2107
2002-04-04 19:24:48 +00:00