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

14 Commits

Author SHA1 Message Date
Jakob Stoklund Olesen
77e7ad803a Move RABasic::addMBBLiveIns to the base class, it is generally useful.
Minor optimization to the use of IntervalMap iterators. They are fairly
heavyweight, so prefer SI.valid() over SI != end().

llvm-svn: 121217
2010-12-08 01:06:06 +00:00
Jakob Stoklund Olesen
9d6472e894 Switch LiveIntervalUnion from std::set to IntervalMap.
This speeds up RegAllocBasic by 20%, not counting releaseMemory which becomes
way faster.

llvm-svn: 121201
2010-12-07 23:18:47 +00:00
Jakob Stoklund Olesen
48ba44334f Remove unused member.
llvm-svn: 121098
2010-12-07 01:32:45 +00:00
Andrew Trick
89dd5f7eac Coding style. No significant functionality. Abandon linear scan style
in favor of the widespread llvm style. Capitalize variables and add
newlines for visual parsing. Rename variables for readability.
And other cleanup.

llvm-svn: 120490
2010-11-30 23:18:47 +00:00
Andrew Trick
5e77065d78 Check TRI->getReservedRegs because other allocators do it. Even though
it makes no sense for allocation_order iterators to visit reserved regs.
The inline spiller depends on AliasAnalysis.
Manage the Query state to avoid uninitialized or stale results.

llvm-svn: 118800
2010-11-11 17:46:29 +00:00
Andrew Trick
9d60f59b55 RABasic is nearly functionally complete. There are a few remaining
benchmarks hitting an assertion.
Adds LiveIntervalUnion::collectInterferingVRegs.
Fixes "late spilling" by checking for any unspillable live vregs among
all physReg aliases.

llvm-svn: 118701
2010-11-10 19:18:47 +00:00
Andrew Trick
374490bf92 Adds RABasic verification and tracing.
(retry now that the windows build is green)

llvm-svn: 118630
2010-11-09 21:04:34 +00:00
Matt Beaumont-Gay
0f262ff853 Add a trivial virtual dtor to AbstractRegisterDescription to appease
-Wnon-virtual-dtor.

llvm-svn: 118616
2010-11-09 19:56:25 +00:00
Andrew Trick
6b9d6df8c3 Reverting r118604. Windows build broke.
llvm-svn: 118613
2010-11-09 19:47:51 +00:00
Andrew Trick
ce7b5df15e Adds RABasic verification and tracing.
llvm-svn: 118604
2010-11-09 19:01:17 +00:00
Andrew Trick
45ec210e3c Adds support for spilling previously allocated live intervals to
handle cases in which a register is unavailable for spill code.
Adds LiveIntervalUnion::extract. While processing interferences on a
live virtual register, reuses the same Query object for each
physcial reg.

llvm-svn: 118423
2010-11-08 18:02:08 +00:00
Andrew Trick
6363e80ded Remove the vector of live vregs. I thought we would need to track
them, but hopefully we won't. And this is not the right data structure
to do it anyway.

llvm-svn: 117412
2010-10-26 22:58:24 +00:00
Andrew Trick
06fb7ed472 Jakob's review of the basic register allocator.
llvm-svn: 117384
2010-10-26 18:34:01 +00:00
Andrew Trick
7a1dadd47d This is a prototype of an experimental register allocation
framework. It's purpose is not to improve register allocation per se,
but to make it easier to develop powerful live range splitting. I call
it the basic allocator because it is as simple as a global allocator
can be but provides the building blocks for sophisticated register
allocation with live range splitting. 

A minimal implementation is provided that trivially spills whenever it
runs out of registers. I'm checking in now to get high-level design
and style feedback. I've only done minimal testing. The next step is
implementing a "greedy" allocation algorithm that does some register
reassignment and makes better splitting decisions.

llvm-svn: 117174
2010-10-22 23:09:15 +00:00