Commit Graph

9975 Commits

Author SHA1 Message Date
Chris Lattner 0c0e0d8d6c Keep track of all of the globals inserted into the scalar map
llvm-svn: 10995
2004-01-28 03:01:22 +00:00
Chris Lattner 779ed4f1de Pull the ScalarMap out into something that is more structured than what we had
before.  This allows us to have a place to implement optimizations in a
structured way.

llvm-svn: 10994
2004-01-28 02:42:12 +00:00
Chris Lattner 06a40fc140 Minor tweaks, eliminate useless integer pruning optimziation, turn on
timers by default

llvm-svn: 10993
2004-01-28 02:41:32 +00:00
Chris Lattner 9f0f7ca74e Further reduce the number of nodes cloned with getClonedNH, using merge instead.
This reduces the number of nodes allocated, then immediately merged and DNE'd
from 2193852 to 1298049.  unfortunately this only speeds DSA up by ~1.5s (of
53s), because it's spending most of its time waddling through the scalar map :(

llvm-svn: 10992
2004-01-28 02:11:49 +00:00
Chris Lattner 6ee2b154d4 Add a timer, fix a minor bug.
Also, use RC::merge when possible, reducing the number of nodes allocated, then immediately merged away from 2985444 to 2193852 on perlbmk.

llvm-svn: 10991
2004-01-28 02:05:05 +00:00
Chris Lattner f6f97f9f90 Another bugfix, disable "spurious" output.
You gotta love spurious

llvm-svn: 10990
2004-01-28 01:19:52 +00:00
Chris Lattner 26acc890f9 fix bug in previous checkin
llvm-svn: 10989
2004-01-27 22:54:56 +00:00
Chris Lattner 54a52e53f0 * Add a new commandline argument to control the "global roots hack". Default
it to be off.  If it looks like it's completely unnecessary after testing, I
  will remove it completely (which is the hope).
* Callers of the DSNode "copy ctor" can not choose to not copy links.
* Make node collapsing not create a garbage node in some cases, avoiding a
  memory allocation, and a subsequent DNE.
* When merging types, allow two functions of different types to be merged
  without collapsing.
* Use DSNodeHandle::isNull more often instead of DSNodeHandle::getNode() == 0,
  as it is much more efficient.
*** Implement the new, more efficient reachability cloner class
    In addition to only cloning nodes that are reachable from interesting
    roots, this also fixes the huge inefficiency we had where we cloned lots
    of nodes, only to merge them away immediately after they were cloned.
    Now we only actually allocate a node if there isn't one to merge it into.
* Eliminate the now-obsolete cloneReachable* and clonePartiallyInto methods
* Rewrite updateFromGlobalsGraph to use the reachability cloner
* Rewrite mergeInGraph to use the reachability cloner
* Disable the scalar map scanning code in removeTriviallyDeadNodes.  In large
  SCC's, this is extremely expensive.  We need a better data structure for the
  scalar map, because we really want to scan the unique node handles, not ALL
  of the scalars.
* Remove the incorrect SANER_CODE_FOR_CHECKING_IF_ALL_REFERRERS_ARE_FROM_SCALARMAP code.
* Move the code for eliminating integer nodes from the trivially dead
  eliminator to the dead node eliminator.
* removeDeadNodes no longer uses removeTriviallyDeadNodes, as it contains a
  superset of the node removal power.
* Only futz around with the globals graph in removeDeadNodes if it is modified

llvm-svn: 10987
2004-01-27 22:03:40 +00:00
Chris Lattner 070afeb77b Rewrite to use the reachability cloner interface. Also, make this much more
efficient in the case where a function calls into the same graph multiple times
(ie, it either contains multiple calls to the same function, or multiple calls
to functions in the same SCC graph)

llvm-svn: 10986
2004-01-27 21:53:14 +00:00
Chris Lattner 0e43b44c31 minor cleanups
llvm-svn: 10985
2004-01-27 21:51:19 +00:00
Chris Lattner b529730af0 Get clone flags right, so we don't build InlinedGlobals only to clear them
llvm-svn: 10984
2004-01-27 21:50:41 +00:00
Chris Lattner 91c33446ca Minor tweaks
llvm-svn: 10983
2004-01-27 21:49:42 +00:00
Chris Lattner e11e9b9e15 Add comments, allow DSNode "copy ctor" to ignore outgoing links, add more
structured access to the globals list, add a couple helper methods.

llvm-svn: 10982
2004-01-27 21:49:25 +00:00
Chris Lattner 748b56f76b * cloneReachable* and clonePartiallyInto are not obsolete
* Make AssertNodeInGraph not be HORRIBLY time consuming
* Eliminate the dead mergeInGlobalsGraph method
*** Add the definition for the new ReachabilityCloner class

llvm-svn: 10981
2004-01-27 21:48:35 +00:00
Chris Lattner 7cd8061230 Start counting projects
llvm-svn: 10980
2004-01-27 21:46:23 +00:00
John Criswell 36eebb51f2 Fixed PR#197. The libcrtend library is removed from the library linking list
when creating native executables.

llvm-svn: 10979
2004-01-26 23:51:10 +00:00
John Criswell 2edea847fc Clarified the extension to shared library objects.
llvm-svn: 10978
2004-01-26 21:26:54 +00:00
John Criswell 47b48bf951 Updating release notes for PR214.
llvm-svn: 10977
2004-01-26 21:03:54 +00:00
John Criswell e6a41815f3 Fixes for PR214. Use the SHLIBEXT variable instead of hardcoding .so into
every file.

llvm-svn: 10976
2004-01-26 20:59:41 +00:00
Brian Gaeke 666aaf715f Fix a couple of places I noticed where "X86" was hard-coded.
llvm-svn: 10974
2004-01-24 09:23:46 +00:00
Alkis Evlogimenos 59e3325c26 Fix failing test cases with joined live intervals. It turns out that
when joining we need to check if we overlap with the second interval
or any of its aliases.

Also make joining intervals the default.

llvm-svn: 10973
2004-01-23 13:37:51 +00:00
Brian Gaeke f0cc848602 Add the JITInfo object, accessor & initializer.
llvm-svn: 10972
2004-01-23 06:39:30 +00:00
Brian Gaeke 4880432af8 Add CodeEmitter and JITInfo stubs. Dump the old
PowerPCTargetMachine::addPassesToJITCompile() method, in favor of the
TargetJITInfo interface.

llvm-svn: 10971
2004-01-23 06:35:43 +00:00
Chris Lattner 78c36d2112 Initial support for implementing clonePartiallyInto in terms of cloneReachableSubgraph, though this support is currently disabled.
llvm-svn: 10970
2004-01-23 01:44:53 +00:00
Chris Lattner 7fd9f4ecdc Add new flag, other minor modifications
llvm-svn: 10969
2004-01-23 01:42:32 +00:00
Chris Lattner f0406a9739 Fix grammar
llvm-svn: 10968
2004-01-23 01:42:16 +00:00
Chris Lattner 241ed4c500 Fix a problem brian ran into with the bytecode reader asserting. It turns
out that the problem was actually the writer writing out a 'null' value
because it didn't normalize it.  This fixes:
test/Regression/Assembler/2004-01-22-FloatNormalization.ll

llvm-svn: 10967
2004-01-23 00:55:21 +00:00
Chris Lattner 6fd5e2bdaf New testcase for problem brian ran into
llvm-svn: 10966
2004-01-23 00:54:26 +00:00
Alkis Evlogimenos 73df113676 Add option to join live intervals. Two intervals are joined if there
is a move between two registers, at least one of the registers is
virtual and the two live intervals do not overlap.

This results in about 40% reduction in intervals, 30% decrease in the
register allocators running time and a 20% increase in peephole
optimizations (mainly move eliminations).

The option can be enabled by passing -join-liveintervals where
appropriate.

llvm-svn: 10965
2004-01-22 23:08:45 +00:00
Brian Gaeke ecc92bfe6e Move bytecode_libdir def'n to Makefile.config.in from Makefile.rules, so it
lives near the other installation dirs (like libdir, bindir, etc.).

Move the rule for making bytecode_libdir out of the ifdef LIBRARYNAME...endif.

llvm-svn: 10964
2004-01-22 22:53:48 +00:00
Brian Gaeke 3f58a875f1 Add autoconf check for the version of etags we have detected, and select
appropriate "force C++" command-line option.

llvm-svn: 10963
2004-01-22 21:55:15 +00:00
Brian Gaeke 740515afa2 Regenerated using autoconf-2.57.
llvm-svn: 10962
2004-01-22 21:55:02 +00:00
Brian Gaeke 14197679b4 Get autoconf'd ETAGSFLAGS value from configure.
llvm-svn: 10961
2004-01-22 21:55:01 +00:00
Brian Gaeke 83d485cfed Move support for building tags database from Makefile.rules to Makefile, because
it's only used in the top-level directory.

llvm-svn: 10960
2004-01-22 21:54:51 +00:00
Alkis Evlogimenos e1c24c06f9 Remove unneeded check. An interval in active, by definition overlaps
with the current one.

llvm-svn: 10959
2004-01-22 20:07:18 +00:00
Alkis Evlogimenos 4716d76d22 Improve debugging output. Remove unneeded virtReg->0 mapping when
virtReg lives on the stack. Now a virtual register has an entry in the
virtual->physical map or the virtual->stack slot map but never in
both.

llvm-svn: 10958
2004-01-22 19:24:43 +00:00
Alkis Evlogimenos 19638ab2bd Revert previous change. The code was correct...
llvm-svn: 10957
2004-01-22 19:17:52 +00:00
Alkis Evlogimenos 0aa9d0278d Fix incorrect negatives in LiveIntervals::Interval::liveAt().
llvm-svn: 10956
2004-01-22 18:33:50 +00:00
Chris Lattner 80f89ea522 Eliminated the CompletedNodes argument to the cloneReachable* methods. This
map was only used to implement a marginal GlobalsGraph optimization, and it
actually slows the analysis down (due to the overhead of keeping it), so just
eliminate it entirely.

llvm-svn: 10955
2004-01-22 16:56:13 +00:00
Chris Lattner 5750d46ccd Ok, I'm tired of pulling out all my timers to check stuff in, just do it.
llvm-svn: 10954
2004-01-22 16:36:28 +00:00
Chris Lattner 2a0bc1224d Bug fix: X.mergeWith(Y) was not updating Y if Y was a null node handle!
llvm-svn: 10953
2004-01-22 16:31:08 +00:00
Chris Lattner 94f4b2a78b It doesn't make sense for one side to be const, but not the other.
llvm-svn: 10952
2004-01-22 16:08:51 +00:00
Chris Lattner e75ae61b47 Start implementing DSGraph::clonePartiallyInto and implement mergeInGraph
in terms of it.

Though clonePartiallyInto is not cloning partial graphs yet, this change
dramatically speeds up inlining of graphs with many scalars.  For example,
this change speeds up the BU pass on 253.perlbmk from 69s to 36s, because
it avoids iteration over the scalar map, which can get pretty large.

llvm-svn: 10951
2004-01-22 15:30:58 +00:00
Chris Lattner c47cf33346 Remove const qualifier (all Value*'s are nonconst in DSA, so it's not clear
why this one was)

Add new method proto

llvm-svn: 10950
2004-01-22 15:26:52 +00:00
Chris Lattner 11d773f8f8 Specialize std::swap correctly
llvm-svn: 10949
2004-01-22 15:26:15 +00:00
Chris Lattner 45fd9d59c0 Allow disabling of ALL printing overhead when performing timings
llvm-svn: 10948
2004-01-22 13:42:43 +00:00
Brian Gaeke 4f4cf4b01c Add DESTDIR support for installing. Use (and depend on) $(bytecode_libdir).
llvm-svn: 10947
2004-01-21 23:57:46 +00:00
Brian Gaeke 96deb7dd86 Give the ".../llvm-gcc/bytecode-libs" directory a variable of its own,
called bytecode_libdir.  Make install-bytecode-library depend on
the existence of that directory, and add a rule for creating it if
it does not exist by calling mkinstalldirs.

llvm-svn: 10946
2004-01-21 23:57:21 +00:00
Brian Gaeke adfa73d0cf Part 2 of DESTDIR support
llvm-svn: 10945
2004-01-21 23:28:03 +00:00
Misha Brukman ba3c670292 Implement ModuleProvider::materializeModule() by only materializing functions
that are still left in the lazy reader map.

llvm-svn: 10944
2004-01-21 22:55:34 +00:00