1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-21 03:53:04 +02:00
Commit Graph

72 Commits

Author SHA1 Message Date
Bill Wendling
8fb166bf6c Rename PrintableName to Name.
llvm-svn: 47629
2008-02-26 21:47:57 +00:00
Bill Wendling
50f5c4be14 Change "Name" to "AsmName" in the target register info. Gee, a refactoring tool
would have been a Godsend here!

llvm-svn: 47625
2008-02-26 21:11:01 +00:00
Anton Korobeynikov
7dd00942cc Update gcc 4.3 warnings fix patch with recent head changes
llvm-svn: 47368
2008-02-20 11:10:28 +00:00
Evan Cheng
bb357cd8a6 - Removing the infamous r2rMap_ and rep() method. Now the coalescer will update
register defs and uses after each successful coalescing.
- Also removed a number of hacks and fixed some subtle kill information bugs.

llvm-svn: 47167
2008-02-15 18:24:29 +00:00
Evan Cheng
da24989368 - Added removeValNo() to remove all live ranges of a particular value#.
- removeRange() can now update value# information.

llvm-svn: 47044
2008-02-13 02:48:26 +00:00
Dan Gohman
cabaec582f Rename MRegisterInfo to TargetRegisterInfo.
llvm-svn: 46930
2008-02-10 18:45:23 +00:00
Evan Cheng
66a9ea3aa8 Fixed a bug in MergeValueInAsValue() pointed out by David Greene. Replace val# with previous liverange's.
llvm-svn: 46579
2008-01-30 22:44:55 +00:00
Chris Lattner
a6559b0047 remove dead #include
llvm-svn: 45971
2008-01-14 18:45:28 +00:00
Chris Lattner
ad9a6ccb83 Remove attribution from file headers, per discussion on llvmdev.
llvm-svn: 45418
2007-12-29 20:36:04 +00:00
Evan Cheng
72fe4454e6 Replace the odd kill# hack with something less fragile.
llvm-svn: 44434
2007-11-29 09:49:23 +00:00
Evan Cheng
c7959fd80b Kill info update bug.
llvm-svn: 44427
2007-11-29 01:05:47 +00:00
Evan Cheng
0899e1e26c Fix MergeValueInAsValue(). It allows overlapping live ranges but should replace
their value numbers with the specified value number.

llvm-svn: 43062
2007-10-17 02:13:29 +00:00
Evan Cheng
62ee7cd439 When coalescing an EXTRACT_SUBREG and the dst register is a physical register,
the source register will be coalesced to the super register of the LHS. Properly
merge in the live ranges of the resulting coalesced interval that were part of
the original source interval to the live interval of the super-register.

llvm-svn: 42961
2007-10-14 10:08:34 +00:00
Evan Cheng
d11cd4a095 EXTRACT_SUBREG coalescing support. The coalescer now treats EXTRACT_SUBREG like
(almost) a register copy. However, it always coalesced to the register of the
RHS (the super-register). All uses of the result of a EXTRACT_SUBREG are sub-
register uses which adds subtle complications to load folding, spiller rewrite,
etc.

llvm-svn: 42899
2007-10-12 08:50:34 +00:00
David Greene
04a132ad5f Constify to catch bugs.
llvm-svn: 41751
2007-09-06 19:46:46 +00:00
Evan Cheng
15c07fb194 Fix a memory leak.
llvm-svn: 41739
2007-09-06 01:07:24 +00:00
Evan Cheng
3bda699975 Use pool allocator for all the VNInfo's to improve memory access locality. This reduces coalescing time on siod Mac OS X PPC by 35%. Also remove the back ptr from VNInfo to LiveInterval and other tweaks.
llvm-svn: 41729
2007-09-05 21:46:51 +00:00
Evan Cheng
25c46702da More tweaks to improve compile time.
llvm-svn: 41669
2007-09-01 02:03:17 +00:00
Evan Cheng
3157d0991b Remove an unnecessary element, saving 4 bytes per LiveInterval.
llvm-svn: 41641
2007-08-31 08:26:44 +00:00
Evan Cheng
5a5046b83f Change LiveRange so it keeps a pointer to the VNInfo rather than an index.
Changes related modules so VNInfo's are not copied. This decrease
copy coalescing time by 45% and overall compilation time by 10% on siod.

llvm-svn: 41579
2007-08-29 20:45:00 +00:00
Evan Cheng
1f3724ee2d Recover most of the compile time regression due to recent live interval changes.
1. Eliminate the costly live interval "swapping".
2. Change ValueNumberInfo container from SmallVector to std::vector. The former
   performs slowly when the vector size is very large.

llvm-svn: 41536
2007-08-28 08:28:51 +00:00
Evan Cheng
5b64e19e06 Kill info update bugs.
llvm-svn: 41064
2007-08-14 01:56:58 +00:00
Evan Cheng
54b799dc76 Kill info update bugs.
llvm-svn: 41043
2007-08-13 07:12:23 +00:00
Evan Cheng
8968affb6d Code to maintain kill information during register coalescing.
llvm-svn: 41016
2007-08-11 00:59:19 +00:00
Evan Cheng
02e7fbd7c8 Clean up and bug fix.
llvm-svn: 40921
2007-08-08 05:56:18 +00:00
Evan Cheng
12d72cc1a0 - Each val# can have multiple kills.
- Fix some minor bugs related to special markers on val# def. ~0U means
  undefined, ~1U means dead val#.

llvm-svn: 40916
2007-08-08 03:00:28 +00:00
Evan Cheng
b4135e3825 Remove a dead assertion.
llvm-svn: 40914
2007-08-08 01:00:21 +00:00
Evan Cheng
0182b495fd - LiveInterval value#'s now have 3 components: def instruction #,
kill instruction #, and source register number (iff the value# is defined by a
copy).
- Now def instruction # is set for every value#, not just for copy defined ones.
- Update some outdated code related inactive live ranges.
- Kill info not yet set. That's next patch.

llvm-svn: 40913
2007-08-07 23:49:57 +00:00
Evan Cheng
c5d2df366a Add a register allocation preference field; add a method to compute size of a live interval.
llvm-svn: 36216
2007-04-17 20:25:11 +00:00
Bill Wendling
7f6a73eb5c Added an automatic cast to "std::ostream*" etc. from OStream. We then can
rework the hacks that had us passing OStream in. We pass in std::ostream*
instead, check for null, and then dispatch to the correct print() method.

llvm-svn: 32636
2006-12-17 05:15:13 +00:00
Jeff Cohen
c396e18e8e The best unbreakage yet, addressing Bill's concerns.
llvm-svn: 32622
2006-12-16 02:15:42 +00:00
Jeff Cohen
03161dd132 An even better unbreakage...
llvm-svn: 32617
2006-12-15 22:57:14 +00:00
Bill Wendling
a3246c4272 Changed llvm_ostream et all to OStream. llvm_cerr, llvm_cout, llvm_null, are
now cerr, cout, and NullStream resp.

llvm-svn: 32298
2006-12-07 01:30:32 +00:00
Bill Wendling
a29e6c5ec9 Converted to using llvm streams instead of <iostream>s
llvm-svn: 31992
2006-11-29 00:39:47 +00:00
Bill Wendling
a80e3dc0c0 Put the #include for a module first.
llvm-svn: 31958
2006-11-28 03:31:29 +00:00
Bill Wendling
7e9cea955c Changed to using llvm streams.
llvm-svn: 31954
2006-11-28 02:08:17 +00:00
Reid Spencer
4bafa71dc1 For PR786:
Turn on -Wunused and -Wno-unused-parameter. Clean up most of the resulting
fall out by removing unused variables. Remaining warnings have to do with
unused functions (I didn't want to delete code without review) and unused
variables in generated code. Maintainers should clean up the remaining
issues when they see them. All changes pass DejaGnu tests and Olden.

llvm-svn: 31380
2006-11-02 20:25:50 +00:00
Chris Lattner
382e699e59 When joining two intervals where the RHS is really simple, use a light-weight
method for joining the live ranges instead of the fully-general one.

llvm-svn: 30049
2006-09-02 05:26:59 +00:00
Chris Lattner
998dd9b42e avoid calling the virtual isMoveInstr method endlessly by caching its results.
llvm-svn: 29994
2006-08-31 05:54:43 +00:00
Chris Lattner
3a4d512930 Teach the coallescer to coallesce live intervals joined by an arbitrary
number of copies, potentially defining live ranges that appear to have
differing value numbers that become identical when coallsced.  Among other
things, this fixes CodeGen/X86/shift-coalesce.ll and PR687.

llvm-svn: 29968
2006-08-29 23:18:15 +00:00
Chris Lattner
86106b8ef4 Simplifications to liveinterval analysis, no functionality change.
llvm-svn: 29896
2006-08-26 01:28:16 +00:00
Chris Lattner
ec9c7fa089 Completely change the way that joining with physregs is implemented. This
paves the way for future changes, increases coallescing opportunities (in
theory, not witnessed in practice), and eliminates the really expensive
LiveIntervals::overlapsAliases method.

llvm-svn: 29890
2006-08-25 23:41:24 +00:00
Chris Lattner
25bd2cc1b9 When replacing value numbers, make sure to compactify the value # space.
llvm-svn: 29865
2006-08-24 23:22:59 +00:00
Chris Lattner
28645a15bd Take advantage of the recent improvements to the liveintervals set (tracking
instructions which define each value#) to simplify and improve the coallescer.
In particular, this patch:

1. Implements iterative coallescing.
2. Reverts an unsafe hack from handlePhysRegDef, superceeding it with a
   better solution.
3. Implements PR865, "coallescing" away the second copy in code like:

   A = B
   ...
   B = A

This also includes changes to symbolically print registers in intervals
when possible.

llvm-svn: 29862
2006-08-24 22:43:55 +00:00
Chris Lattner
410c49afd3 Improve the LiveInterval class to keep track of which machine instruction
defines each value# tracked by the interval.  This will be used to improve
coallescing.

llvm-svn: 29830
2006-08-22 18:19:46 +00:00
Chris Lattner
393200c3c6 Fix LiveInterval::getOverlapingRanges to take things in the right order
(an unused method).

Fix the merger so that it can merge ranges like this  [10:12)[16:40) with
[12:38) into [10:40) instead of bogus ranges.  This sort of input will be
possible for the merger coming shortly

llvm-svn: 23865
2005-10-21 06:41:30 +00:00
Chris Lattner
04c1fe840d Fix a conditional so we don't access past the end of the range. Thanks to
Andrew for bringing this to my attn.

llvm-svn: 23850
2005-10-20 22:50:10 +00:00
Chris Lattner
3c1570debb Fix order of eval problem from when I refactored this into a function.
llvm-svn: 23844
2005-10-20 16:56:40 +00:00
Chris Lattner
ad14e0db81 add a new method, play around with some code.
Fix a *bug* in the extendIntervalEndTo method.  In particular, if adding
[2:10) to an interval containing [0:2),[10:30), we produced [0:10),[10,30).
Which is not the most smart thing to do.  Now produce [0:30).

llvm-svn: 23841
2005-10-20 07:39:25 +00:00
Chris Lattner
13d804c465 Refactor some code, pulling it out into a function. No functionality change.
llvm-svn: 23839
2005-10-20 06:06:30 +00:00