summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/RegAllocBasic.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Store (priority,regnum) pairs in the priority queue instead of providing anJakob Stoklund Olesen2010-12-081-46/+17
| | | | | | | | | | | | | | | | | | | | | | | abstract priority queue interface in subclasses that want to override the priority calculations. Subclasses must provide a getPriority() implementation instead. This approach requires less code as long as priorities are expressable as simple floats, and it avoids the dangers of defining potentially expensive priority comparison functions. It also should speed up priority_queue operations since they no longer have to chase pointers when comparing registers. This is not measurable, though. Preferably, we shouldn't use floats to guide code generation. The use of floats here is derived from the use of floats for spill weights. Spill weights have a dynamic range that doesn't lend itself easily to a fixpoint implementation. When someone invents a stable spill weight representation, it can be reused for allocation priorities. llvm-svn: 121294
* Move RABasic::addMBBLiveIns to the base class, it is generally useful.Jakob Stoklund Olesen2010-12-081-33/+31
| | | | | | | Minor optimization to the use of IntervalMap iterators. They are fairly heavyweight, so prefer SI.valid() over SI != end(). llvm-svn: 121217
* Switch LiveIntervalUnion from std::set to IntervalMap.Jakob Stoklund Olesen2010-12-071-9/+17
| | | | | | | This speeds up RegAllocBasic by 20%, not counting releaseMemory which becomes way faster. llvm-svn: 121201
* Simplify assertion.Jakob Stoklund Olesen2010-12-071-9/+2
| | | | llvm-svn: 121162
* Coding style. No significant functionality. Abandon linear scan styleAndrew Trick2010-11-301-238/+232
| | | | | | | | 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
* Namespacify.Benjamin Kramer2010-11-251-2/+2
| | | | llvm-svn: 120146
* RABasic fix. Regalloc is responsible for updating block live ins.Andrew Trick2010-11-201-0/+30
| | | | llvm-svn: 119896
* Whitespace.Andrew Trick2010-11-201-20/+20
| | | | llvm-svn: 119895
* Check TRI->getReservedRegs because other allocators do it. Even thoughAndrew Trick2010-11-111-35/+42
| | | | | | | | 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
* RABasic is nearly functionally complete. There are a few remainingAndrew Trick2010-11-101-61/+99
| | | | | | | | | benchmarks hitting an assertion. Adds LiveIntervalUnion::collectInterferingVRegs. Fixes "late spilling" by checking for any unspillable live vregs among all physReg aliases. llvm-svn: 118701
* Adds RABasic verification and tracing.Andrew Trick2010-11-091-9/+85
| | | | | | (retry now that the windows build is green) llvm-svn: 118630
* Reverting r118604. Windows build broke.Andrew Trick2010-11-091-85/+9
| | | | llvm-svn: 118613
* Adds RABasic verification and tracing.Andrew Trick2010-11-091-9/+85
| | | | llvm-svn: 118604
* Adds support for spilling previously allocated live intervals toAndrew Trick2010-11-081-33/+99
| | | | | | | | | 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
* Let RegAllocBasic require MachineDominators - they are already available andJakob Stoklund Olesen2010-11-031-0/+3
| | | | | | splitting needs them. llvm-svn: 118194
* Jakob's review of the basic register allocator.Andrew Trick2010-10-261-4/+91
| | | | llvm-svn: 117384
* This is a prototype of an experimental register allocationAndrew Trick2010-10-221-0/+259
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
OpenPOWER on IntegriCloud