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

94 Commits

Author SHA1 Message Date
Devang Patel
cd45427a87 Drop 'const'
llvm-svn: 36662
2007-05-03 01:11:54 +00:00
Devang Patel
8ee9065162 Use 'static const char' instead of 'static const int'.
Due to darwin gcc bug, one version of darwin linker coalesces
static const int, which defauts PassID based pass identification.

llvm-svn: 36652
2007-05-02 21:39:20 +00:00
Devang Patel
38a66bc82e Do not use typeinfo to identify pass in pass manager.
llvm-svn: 36632
2007-05-01 21:15:47 +00:00
Evan Cheng
cfa2a787f7 Be careful when to add implicit kill / dead operands. Don't add them during / post reg-allocation.
llvm-svn: 36458
2007-04-26 01:40:09 +00:00
Evan Cheng
e464e596a6 Data structure change to improve compile time (especially in debug mode).
llvm-svn: 36447
2007-04-25 19:34:00 +00:00
Evan Cheng
e884f9cb2a Fix for PR1306.
- A register def / use now implicitly affects sub-register liveness but does
not affect liveness information of super-registers.
- Def of a larger register (if followed by a use later) is treated as
read/mod/write of a smaller register.

llvm-svn: 36434
2007-04-25 07:30:23 +00:00
Evan Cheng
fbbdb92c9d VarInfo::UsedBlocks is no longer used. Remove.
llvm-svn: 36250
2007-04-18 05:04:38 +00:00
Evan Cheng
94e0223e55 Keep track of number of uses within the function per virtual register.
llvm-svn: 36214
2007-04-17 20:22:11 +00:00
Evan Cheng
5be8544e8a Track the BB's where each virtual register is used.
llvm-svn: 35135
2007-03-17 09:29:54 +00:00
Evan Cheng
e4ab9c032b Re-apply my liveintervalanalysis changes. Now with PR1207 fixes.
llvm-svn: 34428
2007-02-19 21:49:54 +00:00
Reid Spencer
b27fcf3482 For PR1207:
Revert patches that caused the problem. Evan, please investigate and reapply
when you've discovered the problem.

llvm-svn: 34399
2007-02-19 03:20:00 +00:00
Evan Cheng
ad05c398b1 Allow LiveVariables to track liveness of more registers.
llvm-svn: 34377
2007-02-17 11:07:08 +00:00
Evan Cheng
28eaad250f Use BitVector instead of vector<bool> which can be extremely slow.
llvm-svn: 34302
2007-02-15 05:59:24 +00:00
Evan Cheng
d79427b22c Do away with kill / dead maps. Move kill / dead info onto MI's.
llvm-svn: 31759
2006-11-15 20:51:59 +00:00
Bill Wendling
9b15198af4 Fix for PR929. The PHI nodes were being gone through for each instruction
in a successor block for every block...resulting in some O(N^k) algorithm
which wasn't very good for performance. Calculating this information up
front and keeping it in a map made it much faster.

llvm-svn: 30697
2006-10-03 07:20:20 +00:00
Chris Lattner
cc5b4bff8f Move two methods out of line, make them work when the record for a machine
instruction includes physregs.

llvm-svn: 30061
2006-09-03 00:05:09 +00:00
Chris Lattner
3e65439986 add a comment that I should have written a long time ago
llvm-svn: 25084
2006-01-04 07:29:33 +00:00
Chris Lattner
16d652bfff add a dump method to help debugging
llvm-svn: 25079
2006-01-04 05:39:51 +00:00
Chris Lattner
165fcbcd64 Fix a problem Duraid noticed, where we weren't removing values from the kills
list when doing two-address and phi node lowering during register allocation.

llvm-svn: 23043
2005-08-25 05:45:31 +00:00
Chris Lattner
180f2050d0 Keep the killed/dead sets sorted, so that "KillsRegister" can do a quick
binary search to test for membership.  This speeds up LLC a bit more on KC++,
e.g. on itanium from 16.6974s to 14.8272s, PPC from 11.4926s to 10.7089s and
X86 from 10.8128s to 9.7943s, with no difference in generated code (like all
of the RA patches).

With these changes, isel is the slowest pass for PPC/X86, but linscan+live
intervals is still > 50% of the compile time for itanium.  More work could
be done, but this is the last for now.

llvm-svn: 22993
2005-08-24 00:09:02 +00:00
Chris Lattner
3bb878f134 Change live variables from using multimaps to using maps of vectors and
rearrange some of the accessors to be more efficient.

This makes it much more efficient to iterate over all of the things with the
same value.  This speeds up liveintervals analysis from 8.63s to 3.79s with
a release build of llc on kc++ with -march=ia64.  This also speeds up live
var from 1.66s -> 0.87s as well, reducing total llc time from 20.1s->15.2s.

This also speeds up other targets slightly, e.g. llc time on X86 from 16.84
-> 16.45s, and PPC from 17.64->17.03s.

llvm-svn: 22990
2005-08-23 23:40:41 +00:00
Chris Lattner
f91a79a306 Add RegisterDefIsDead to correspond to KillsRegister, mark both const
llvm-svn: 22987
2005-08-23 22:43:24 +00:00
Misha Brukman
5e38b1e17e Convert tabs to spaces
llvm-svn: 21438
2005-04-22 03:46:24 +00:00
Misha Brukman
4ad5efd1a9 Remove trailing whitespace
llvm-svn: 21409
2005-04-21 20:39:54 +00:00
Chris Lattner
70d0a6155b Add a useful accessor
llvm-svn: 19209
2005-01-01 15:58:55 +00:00
Alkis Evlogimenos
03913413da Use newly added API in MRegisterInfo and don't expose the allocatable
register set anymore. Its users now use the MRegisterInfo API.

llvm-svn: 16061
2004-08-26 22:23:32 +00:00
Chris Lattner
22728e2f27 There is no need to store the MBB along with the MI any more, we can now
ask instructions for their parent.

llvm-svn: 14998
2004-07-19 07:04:55 +00:00
Chris Lattner
6c34920110 Simplify the interface to LiveVariables::addVirtualRegister(Killed|Dead)
llvm-svn: 14997
2004-07-19 06:55:21 +00:00
Chris Lattner
53fa752649 Remove the DefBlock element of VarInfo. DefBlock is always DefInst->getParent()
llvm-svn: 14996
2004-07-19 06:26:50 +00:00
Chris Lattner
08fb05fe14 Now that we have happy mappings from MBBs->numbers, use them instead of keeping
a LV private map

llvm-svn: 14522
2004-07-01 06:14:57 +00:00
Chris Lattner
dd7eb23ccf Stop LiveVariables from using BasicBlocks as part of the mapping, instead
use MachineBasicBlocks.

llvm-svn: 13300
2004-05-01 21:23:35 +00:00
Chris Lattner
6c338f7627 ADd a method for when an instruction moves
llvm-svn: 11626
2004-02-19 18:28:22 +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
Alkis Evlogimenos
ef7c077e63 Make LiveVariables::HandlePhysRegUse and
LiveVariables::HandlePhysRegDef private they use information that is
not in memory when LiveVariables finishes the analysis.

Also update the TwoAddressInstructionPass to not use this interface.

llvm-svn: 10755
2004-01-11 09:18:45 +00:00
Alkis Evlogimenos
90aeecae42 Add TwoAddressInstructionPass to handle instructions that have two or
more operands and the two first operands are constrained to be the
same. The pass takes an instruction of the form:

        a = b op c

and transforms it into:

        a = b
        a = a op c

and also preserves live variables.

llvm-svn: 10512
2003-12-18 13:06:04 +00:00
Alkis Evlogimenos
f84f86137b Ignore non-allocatable physical registers in live interval analysis.
llvm-svn: 10449
2003-12-13 11:11:02 +00:00
Brian Gaeke
d25f86d683 Put all LLVM code into the llvm namespace, as per bug 109.
llvm-svn: 9903
2003-11-11 22:41:34 +00:00
John Criswell
16c6cda9d5 Added LLVM copyright header (for lack of a better term).
llvm-svn: 9304
2003-10-20 20:19:47 +00:00
Chris Lattner
6c12776232 Remove a ton of extraneous #includes
llvm-svn: 6842
2003-06-22 03:08:05 +00:00
John Criswell
4781723de6 Included assert.h so that the code compiles under newer versions of GCC.
llvm-svn: 6682
2003-06-11 14:01:36 +00:00
Chris Lattner
afc685b278 Beef up interface, move getVarInfo out-of-line.
llvm-svn: 6114
2003-05-12 14:23:04 +00:00
Chris Lattner
d06c47110a Expand API for updating live var info.
Expose iterators, not const-iterators.
Rename method that was VERY misleading

llvm-svn: 6108
2003-05-12 03:51:30 +00:00
Chris Lattner
d2fae9f27c Add comments, add a vector to keep track of which registers are allocatable
llvm-svn: 6014
2003-05-07 20:07:58 +00:00
Chris Lattner
fb1bfc8cde Add new files
llvm-svn: 5259
2003-01-13 01:01:31 +00:00