1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-26 22:42:46 +02:00
Commit Graph

10012 Commits

Author SHA1 Message Date
Alkis Evlogimenos
9559cebebf Apply final part of Chris' patch.
llvm-svn: 11040
2004-01-31 23:48:47 +00:00
Alkis Evlogimenos
656870703f Be a little smarter on the way we handle physical register defs.
llvm-svn: 11038
2004-01-31 23:13:30 +00:00
Chris Lattner
0ea56952d4 Finegrainify namespacification, use new MRegisterInfo::isVirtualRegister
method

llvm-svn: 11037
2004-01-31 21:27:19 +00:00
Chris Lattner
bff56dc518 Fix, correctly this time, the computation of the return value
Fix a spello
Tighten up the assertion checking

No functionality changes.

llvm-svn: 11036
2004-01-31 21:21:43 +00:00
Chris Lattner
05b7fef02f * Fix incorrect computation of the runOnMachineFunction return value
* Turn a bunch of instance variables into automatic variables

llvm-svn: 11035
2004-01-31 21:14:04 +00:00
Chris Lattner
b0addcc1b0 Remove unneeded #includes
Move Passes.h (which defines the interface to this file) to the top.
Move statistics to the top of the file.
Add a comment

llvm-svn: 11034
2004-01-31 21:07:15 +00:00
Chris Lattner
89f03df701 Avoid referencing deleted DSgraphs when merging an SCC into a larger SCC. This
fixes the crash in 176.gcc.

llvm-svn: 11033
2004-01-31 21:02:18 +00:00
Alkis Evlogimenos
d1ec5f36ee Merge safe parts from last night's buggy commit. These do not break
any test cases :-)

llvm-svn: 11032
2004-01-31 19:59:32 +00:00
Chris Lattner
dadbb4da4d Add two static methods to avoid having client code explicitly compare against
FirstVirtualRegister

llvm-svn: 11031
2004-01-31 19:57:11 +00:00
Alkis Evlogimenos
ef63827238 Optimize liveAt() and overlaps(). We now use a binary search instead
of a linear search to find the first range for comparisons. This cuts
down the linear scan register allocator running time by a factor of 3
in 254.perlbmk and by a factor of 2.2 in 176.gcc.

llvm-svn: 11030
2004-01-31 16:54:54 +00:00
Alkis Evlogimenos
b9df133d67 Revert last night's changes as they broke some tests. Will remerge parts of the patch.
llvm-svn: 11029
2004-01-31 14:37:41 +00:00
Alkis Evlogimenos
c0db519832 Several performance enhancements and cleanups from Chris.
Simplification of LiveIntervals::Interval::overlaps() and addition of
examples to overlaps() and liveAt() to make them clearer.

llvm-svn: 11028
2004-01-31 04:56:07 +00:00
Chris Lattner
a497e3d6e1 Fix thinko
llvm-svn: 11027
2004-01-30 22:48:02 +00:00
Chris Lattner
f5b5d1f2f8 Add some comments sketching out how this is to work eventually.
llvm-svn: 11026
2004-01-30 22:25:18 +00:00
Chris Lattner
543fbaa973 Add a new flag, which is only used for symmetry.
llvm-svn: 11025
2004-01-30 22:24:18 +00:00
Chris Lattner
0127841d4e Forward method request to chained aa implementation
llvm-svn: 11024
2004-01-30 22:20:55 +00:00
Chris Lattner
ddf07e7fb4 New testcase for better mod/ref information that basicaa can provide
llvm-svn: 11023
2004-01-30 22:18:47 +00:00
Chris Lattner
8bcdaf9b5d Implement the pointsToConstantMemory() method.
llvm-svn: 11022
2004-01-30 22:17:24 +00:00
Chris Lattner
71d05cef5e Improve mod/ref information based on the pointsToConstantMemory method.
llvm-svn: 11021
2004-01-30 22:16:42 +00:00
Chris Lattner
bb4d6f00f9 Add a new pointsToConstantMemory method to the AliasAnalysis interface
which can be implemented to improve the quality of mod-ref information.

llvm-svn: 11020
2004-01-30 22:15:41 +00:00
Chris Lattner
6f4945b965 Add (currently disabled) support to the instruction selector to only insert
FP_REG_KILL instructions at the end of blocks involved with critical edges.

Fix a bug where FP_REG_KILL instructions weren't inserted in fall through
unconditional branches.  Perhaps this will fix some linscan problems?

llvm-svn: 11019
2004-01-30 22:13:44 +00:00
Chris Lattner
32ec75c4ef Finegrainify namespacification
Implement LiveVariables::getIndexMachineBasicBlock

llvm-svn: 11018
2004-01-30 22:08:53 +00:00
Chris Lattner
8671a315d5 Add a new lazily constructed mapping from Idx's the MBB they represent
llvm-svn: 11017
2004-01-30 22:08:09 +00:00
Brian Gaeke
9cf840250b Give clients of MachineFunctionPrinter the ability to specify a banner and
choose an ostream.

llvm-svn: 11016
2004-01-30 21:53:46 +00:00
Misha Brukman
440d62207c Order #includes alphabetically, per style guide.
llvm-svn: 11015
2004-01-30 17:26:24 +00:00
Misha Brukman
64f7595915 Doxygenify comments.
llvm-svn: 11014
2004-01-30 17:22:50 +00:00
Chris Lattner
dfa4f14e34 Fix a bug aflicting 265.gap
llvm-svn: 11006
2004-01-29 08:36:22 +00:00
Chris Lattner
caecd769c4 Minor bugfixes
llvm-svn: 11005
2004-01-29 03:32:15 +00:00
Brian Gaeke
48246597ef I think this is a more robust fix for the Solaris wchar problems (PR206).
llvm-svn: 11004
2004-01-28 20:54:41 +00:00
Misha Brukman
6d62b1ee69 Hyphenate `target-dependent'
llvm-svn: 11003
2004-01-28 20:43:01 +00:00
Brian Gaeke
923ff046c0 Add a new (static inline) std::ostream& << AllocInfo& method. Use it.
llvm-svn: 11002
2004-01-28 19:05:43 +00:00
Chris Lattner
7ab2349541 Rename DSGraph::ScalarMapTy -> DSScalarMap
llvm-svn: 11001
2004-01-28 09:15:42 +00:00
Chris Lattner
9a79b1690c Fix a bug
llvm-svn: 11000
2004-01-28 03:31:34 +00:00
Chris Lattner
8324e48b84 Eliminate the call to removeTriviallyDeadNodes from updateFromGlobals graph,
moving it to the start of removeDeadNodes.  This speeds up DSA by 2s on perlbmk
from 41s

llvm-svn: 10999
2004-01-28 03:24:41 +00:00
Chris Lattner
92eb91ed70 In the TD pass, iterate over globals directly instead of through the whole scalar
map.  This saves 5s in the TD pass, from 22->17s on perlbmk

llvm-svn: 10998
2004-01-28 03:12:48 +00:00
Chris Lattner
c25a7dad97 In the TD pass, don't iterate over the scalar map to find the globals, iterate over
the globals directly.  This doesn't save any substantial time, however, because the
globals graph only contains globals!

llvm-svn: 10997
2004-01-28 03:07:30 +00:00
Chris Lattner
394c9343b4 In updateFromGlobalsGraph, instead of iterating over all of the scalars in the
function to find the globals, iterate over all of the globals directly.  This
speeds the function up from 14s to 6.3s on perlbmk, reducing DSA time from
53->46s.

llvm-svn: 10996
2004-01-28 03:03:06 +00:00
Chris Lattner
fc239578ad 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
268db40292 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
528f5842dd 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
18e0615a69 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
6d38674f7b 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
10881df6e2 Another bugfix, disable "spurious" output.
You gotta love spurious

llvm-svn: 10990
2004-01-28 01:19:52 +00:00
Chris Lattner
b0d7b564dd fix bug in previous checkin
llvm-svn: 10989
2004-01-27 22:54:56 +00:00
Chris Lattner
3bd20c5114 * 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
727e11ac33 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
25f95d2b7c minor cleanups
llvm-svn: 10985
2004-01-27 21:51:19 +00:00
Chris Lattner
9117f221b1 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
2ead39d5c8 Minor tweaks
llvm-svn: 10983
2004-01-27 21:49:42 +00:00
Chris Lattner
16a5e6bf33 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