Commit Graph

603 Commits

Author SHA1 Message Date
Misha Brukman de360f88c8 Return the Module that we just materialized.
llvm-svn: 9201
2003-10-17 18:27:13 +00:00
Alkis Evlogimenos 8faf8d93d5 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 068ad84038 Add support for 'weak' linkage.
llvm-svn: 9171
2003-10-16 18:29:00 +00:00
Chris Lattner 079edeb919 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 56a8642a42 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 0c068c097a Stop using "reverse depth first" order
llvm-svn: 9081
2003-10-13 15:21:58 +00:00
Chris Lattner e859403772 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 1dc3f3fdc0 Avoid creating lots of pointless opaque types, with short lifetimes
llvm-svn: 9076
2003-10-13 14:03:36 +00:00
Chris Lattner c7bc3bb503 This is a header file, hear me roar
llvm-svn: 9075
2003-10-13 05:34:24 +00:00
Chris Lattner ab16a659d7 * 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 44d2c3514a Regularize header file comments
llvm-svn: 9071
2003-10-13 03:32:08 +00:00
Chris Lattner dd99f5bf8f Rename method
llvm-svn: 9055
2003-10-12 18:52:12 +00:00
Brian Gaeke cc31fddf13 Don't include Config/stdio.h or <stdio.h>.
llvm-svn: 9031
2003-10-10 18:46:29 +00:00
Misha Brukman fa100531e1 Fix spelling/grammar.
llvm-svn: 9023
2003-10-10 17:54:14 +00:00
Chris Lattner 815ae2bfe3 Add a sanity check for constant expression casts
llvm-svn: 8951
2003-10-07 22:19:19 +00:00
Chris Lattner 794a7490f8 Users can never be null
llvm-svn: 8895
2003-10-06 17:33:39 +00:00
Chris Lattner df9779c5c2 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 b50d135710 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 cc593fb6c6 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 3e88ef9f93 Minor random speedup: make Constant::getNullValue only call ConstantFOO::get
once!

llvm-svn: 8845
2003-10-03 19:34:51 +00:00
Chris Lattner 2c6cecf321 Explicit copy ctors are no longer needed
llvm-svn: 8844
2003-10-03 19:02:41 +00:00
Chris Lattner 7f4cfda3ba Minor cleanups
llvm-svn: 8843
2003-10-03 18:57:54 +00:00
Chris Lattner 0f21ab75fa 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 29dc65a324 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 a72b78967f 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 016418b8c2 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 22e4ca8863 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 64d88bc788 Do not use BasicBlock::succ_iterator
llvm-svn: 8700
2003-09-24 22:03:22 +00:00
Misha Brukman cd1d0e31f5 * 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 5dac64f629 Rename Function::getEntryNode -> getEntryBlock
llvm-svn: 8625
2003-09-20 14:39:18 +00:00
Chris Lattner 3284ed725a Reject "llvm." as a function name
llvm-svn: 8608
2003-09-19 19:31:41 +00:00
Misha Brukman 3d72faddeb Minimal implementation of the abstract ModuleProvider interface.
llvm-svn: 8594
2003-09-18 16:17:06 +00:00
Chris Lattner c1b1651210 Change the semancics of the dropallrefs method
llvm-svn: 8572
2003-09-17 04:58:59 +00:00
Chris Lattner bb9d03b9c0 Renamed DominatorTree::Node::getNode() -> getBlock()
llvm-svn: 8469
2003-09-11 16:26:13 +00:00
Chris Lattner 630d2954be 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 ff713ae819 Make createVerifierPass return a FunctionPass *.
llvm-svn: 8449
2003-09-10 19:37:04 +00:00
Chris Lattner 216c7b8aed Fix spell-o's
llvm-svn: 8431
2003-09-10 05:29:43 +00:00
John Criswell f711d34e98 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 8d575cb2e1 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 04ecefe232 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 66d5f575ba Add support for unwind
llvm-svn: 8407
2003-09-08 18:54:36 +00:00
Chris Lattner 504f9242c3 Add support for volatile loads/stores
llvm-svn: 8393
2003-09-08 17:45:59 +00:00
Misha Brukman 730e047678 Spell `occurrence' correctly.
llvm-svn: 8388
2003-09-08 03:08:43 +00:00
Chris Lattner 20b98d2c93 Add asserts, move code around. This gets the dropAllTypeUses partially implemented
llvm-svn: 8361
2003-09-05 05:10:04 +00:00
Chris Lattner d15598bfe0 Move functionality preserving changes.
Inline containsEquivalent
Remove some //'s

llvm-svn: 8358
2003-09-05 02:39:52 +00:00
Chris Lattner 5ac07d2221 Refactor what has effectively become copy-and-pasted code
llvm-svn: 8357
2003-09-05 02:30:47 +00:00
Chris Lattner 3f695ff02e 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 e4fdce4235 containsEquivalent never returns its argument
llvm-svn: 8353
2003-09-04 23:49:53 +00:00
Chris Lattner cd27235b23 Remove needless usage of getDescription()
llvm-svn: 8351
2003-09-04 23:46:03 +00:00
Chris Lattner 59be7695ef Inline method
llvm-svn: 8350
2003-09-04 23:43:40 +00:00