Commit Graph

675 Commits

Author SHA1 Message Date
Chris Lattner
72ac148d49 Add support for 'weak' linkage.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9171 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-16 18:29:00 +00:00
Chris Lattner
c3cc71abbc 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9160 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-16 16:53:07 +00:00
Misha Brukman
69c856aa6d Enabling incremental bytecode loading in the JIT:
* FunctionPassManager ctor now takes in a ModuleProvider
* run() materializes function before running passes on it


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9126 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-14 21:38:42 +00:00
Chris Lattner
cb18d181d1 Stop using "reverse depth first" order
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9081 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-13 15:21:58 +00:00
Chris Lattner
5af41974c3 Speed up TypesEqual by specializing it for all of the derived types, avoiding
a lot of virtual method dispatch overhead.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9078 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-13 14:55:56 +00:00
Chris Lattner
1825009ba8 Avoid creating lots of pointless opaque types, with short lifetimes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9076 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-13 14:03:36 +00:00
Chris Lattner
236f646371 This is a header file, hear me roar
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9075 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-13 05:34:24 +00:00
Chris Lattner
3e58d9bb32 * 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9074 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-13 05:33:01 +00:00
Chris Lattner
cf3056db0f Regularize header file comments
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9071 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-13 03:32:08 +00:00
Chris Lattner
5b62cdcf4a Rename method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9055 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-12 18:52:12 +00:00
Brian Gaeke
e24b616faa Don't include Config/stdio.h or <stdio.h>.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9031 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-10 18:46:29 +00:00
Misha Brukman
cf00c4ab3b Fix spelling.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9027 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-10 17:57:28 +00:00
Misha Brukman
6b63452c3a Fix spelling/grammar.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9023 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-10 17:54:14 +00:00
Chris Lattner
9eacf8aac8 Add a sanity check for constant expression casts
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8951 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-07 22:19:19 +00:00
Chris Lattner
4e84e7720c Users can never be null
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8895 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-06 17:33:39 +00:00
Chris Lattner
bede31ff3a 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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8866 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-05 17:44:18 +00:00
Chris Lattner
ed468e37a1 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8853 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-05 00:17:43 +00:00
Chris Lattner
00413e3d63 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8850 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-04 20:14:59 +00:00
Chris Lattner
70b06fc717 Minor random speedup: make Constant::getNullValue only call ConstantFOO::get
once!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8845 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-03 19:34:51 +00:00
Chris Lattner
23c3288ce9 Explicit copy ctors are no longer needed
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8844 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-03 19:02:41 +00:00
Chris Lattner
af6f93ce35 Minor cleanups
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8843 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-03 18:57:54 +00:00
Chris Lattner
7685ac8d35 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8842 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-03 18:46:24 +00:00
Chris Lattner
9ad4dac582 These methods are dead, remove them. Because the bodies will soon be
ressurected, just ifdef them out for now.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8840 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-03 18:39:57 +00:00
Chris Lattner
8ef852f4ea 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8834 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-03 04:48:21 +00:00
Chris Lattner
1c5164e9cf 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8833 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-02 23:35:57 +00:00
Chris Lattner
3200219843 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8828 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-02 19:44:40 +00:00
Chris Lattner
48486893f4 Standardize header file comments
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8782 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-30 18:37:50 +00:00
Chris Lattner
1c9ab515de Do not use BasicBlock::succ_iterator
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8700 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-24 22:03:22 +00:00
Misha Brukman
238fb25004 * 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8674 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-22 23:44:13 +00:00
Chris Lattner
02a3be020a Rename Function::getEntryNode -> getEntryBlock
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8625 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-20 14:39:18 +00:00
Chris Lattner
095e907125 Reject "llvm." as a function name
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8608 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-19 19:31:41 +00:00
Misha Brukman
521f1feb11 Minimal implementation of the abstract ModuleProvider interface.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8594 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-18 16:17:06 +00:00
Chris Lattner
0981b62eec Change the semancics of the dropallrefs method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8572 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-17 04:58:59 +00:00
Chris Lattner
c444a4228f Renamed DominatorTree::Node::getNode() -> getBlock()
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8469 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-11 16:26:13 +00:00
Chris Lattner
b884f597d6 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8461 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-10 20:37:51 +00:00
Brian Gaeke
053134a1ee Make createVerifierPass return a FunctionPass *.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8449 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-10 19:37:04 +00:00
Chris Lattner
065a616ada Fix spell-o's
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8431 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-10 05:29:43 +00:00
John Criswell
531922aaca 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8419 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-09 16:58:41 +00:00
John Criswell
21ca6ee7cd 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8418 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-09 16:36:09 +00:00
Chris Lattner
ee5457cbe8 Eliminate support for the llvm.unwind intrinisic, using the Unwind instruction instead
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8411 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-08 19:44:26 +00:00
Chris Lattner
a6ce898dad Add support for unwind
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8407 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-08 18:54:36 +00:00
Chris Lattner
e5e475e09d Add support for volatile loads/stores
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8393 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-08 17:45:59 +00:00
Misha Brukman
c6315d9b27 Spell `occurrence' correctly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8388 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-08 03:08:43 +00:00
Chris Lattner
c9b24a3bad Add asserts, move code around. This gets the dropAllTypeUses partially implemented
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8361 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-05 05:10:04 +00:00
Chris Lattner
8df956ccf2 Move functionality preserving changes.
Inline containsEquivalent
Remove some //'s


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8358 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-05 02:39:52 +00:00
Chris Lattner
266caa2c3d Refactor what has effectively become copy-and-pasted code
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8357 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-05 02:30:47 +00:00
Chris Lattner
169726b113 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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8355 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-05 02:21:39 +00:00
Chris Lattner
663b479004 containsEquivalent never returns its argument
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8353 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-04 23:49:53 +00:00
Chris Lattner
a5112c768d Remove needless usage of getDescription()
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8351 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-04 23:46:03 +00:00
Chris Lattner
e09a128df0 Inline method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8350 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-04 23:43:40 +00:00