summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/RegAllocLinearScan.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Change all self assignments X=X to (void)X, so that we can turn on aJeffrey Yasskin2010-12-231-1/+1
| | | | | | | new gcc warning that complains on self-assignments and self-initializations. llvm-svn: 122458
* Emit DBG_VALUE instructions from LiveDebugVariables.Jakob Stoklund Olesen2010-12-031-0/+7
| | | | llvm-svn: 120842
* Don't attempt trivial coalescing for sub-register copies.Jakob Stoklund Olesen2010-11-191-0/+4
| | | | | | Patch by Krister Wombell! llvm-svn: 119791
* Print out the register class of the current interval.Jakob Stoklund Olesen2010-11-161-2/+3
| | | | llvm-svn: 119374
* Hook up AliasAnalysis in InlineSpiller. This is used for rematerializingJakob Stoklund Olesen2010-11-101-0/+4
| | | | | | constant loads. llvm-svn: 118741
* Make MachineDominators available for SplitEditor. We are going to need it forJakob Stoklund Olesen2010-10-281-0/+2
| | | | | | | | | proper SSA updating. This doesn't cause MachineDominators to be recomputed since we are already requiring MachineLoopInfo which uses dominators as well. llvm-svn: 117598
* Make the spiller responsible for updating the LiveStacks analysis.Jakob Stoklund Olesen2010-10-261-33/+2
| | | | llvm-svn: 117337
* Get rid of static constructors for pass registration. Instead, every pass ↵Owen Anderson2010-10-191-0/+11
| | | | | | | | | | | | | | | | | exposes an initializeMyPassFunction(), which must be called in the pass's constructor. This function uses static dependency declarations to recursively initialize the pass's dependencies. Clients that only create passes through the createFooPass() APIs will require no changes. Clients that want to use the CommandLine options for passes will need to manually call the appropriate initialization functions in PassInitialization.h before parsing commandline arguments. I have tested this with all standard configurations of clang and llvm-gcc on Darwin. It is possible that there are problems with the static dependencies that will only be visible with non-standard options. If you encounter any crash in pass registration/creation, please send the testcase to me directly. llvm-svn: 116820
* Begin adding static dependence information to passes, which will allow us toOwen Anderson2010-10-121-1/+11
| | | | | | | | | perform initialization without static constructors AND without explicit initialization by the client. For the moment, passes are required to initialize both their (potential) dependencies and any passes they preserve. I hope to be able to relax the latter requirement in the future. llvm-svn: 116334
* Now with fewer extraneous semicolons!Owen Anderson2010-10-071-1/+1
| | | | llvm-svn: 115996
* Removed VNInfo::isDefAccurate(). Def "accuracy" can be checked by testing ↵Lang Hames2010-09-251-5/+3
| | | | | | whether LiveIntervals::getInstructionFromIndex(def) returns NULL. llvm-svn: 114791
* Tweak to ignoring reserved regs. The allocator was occasionally still lookingJim Grosbach2010-09-011-2/+4
| | | | | | | at them since they'd end up in the register weights list. Tell it to stop doing that. llvm-svn: 112756
* tidy up trailing whitespace and an 80 column violation.Jim Grosbach2010-09-011-24/+25
| | | | llvm-svn: 112746
* cleanup per feedback. use a helper function for getting the first non-reservedJim Grosbach2010-09-011-17/+14
| | | | | | | physical register in a register class. Make sure to assert if the register class is empty. llvm-svn: 112743
* The register allocator shouldn't consider allocating reserved registers.Jim Grosbach2010-09-011-5/+30
| | | | | | r112728 did this for fast regalloc. llvm-svn: 112741
* Clean up the Spiller.h interface.Jakob Stoklund Olesen2010-08-131-6/+11
| | | | | | | | | The earliestStart argument is entirely specific to linear scan allocation, and can be easily calculated by RegAllocLinearScan. Replace std::vector with SmallVector. llvm-svn: 111055
* Reapply r110396, with fixes to appease the Linux buildbot gods.Owen Anderson2010-08-061-1/+1
| | | | llvm-svn: 110460
* Revert r110396 to fix buildbots.Owen Anderson2010-08-061-1/+1
| | | | llvm-svn: 110410
* Don't use PassInfo* as a type identifier for passes. Instead, use the ↵Owen Anderson2010-08-051-1/+1
| | | | | | | | address of the static ID member as the sole unique type identifier. Clean up APIs related to this change. llvm-svn: 110396
* GrammarJim Grosbach2010-07-271-3/+3
| | | | llvm-svn: 109525
* Fix batch of converting RegisterPass<> to INTIALIZE_PASS().Owen Anderson2010-07-211-2/+2
| | | | llvm-svn: 109045
* Change the createSpiller interface to take a MachineFunctionPass argument.Jakob Stoklund Olesen2010-07-201-1/+1
| | | | | | | | The spillers can pluck the analyses they need from the pass reference. Switch some never-null pointers to references. llvm-svn: 108969
* Spillers may alter MachineLoopInfo when breaking critical edges, so make itJakob Stoklund Olesen2010-07-191-2/+2
| | | | | | non-const. llvm-svn: 108734
* Remove many calls to TII::isMoveInstr. Targets should be producing COPY anyway.Jakob Stoklund Olesen2010-07-161-31/+9
| | | | | | TII::isMoveInstr is going tobe completely removed. llvm-svn: 108507
* Convert EXTRACT_SUBREG to COPY when emitting machine instrs.Jakob Stoklund Olesen2010-07-081-2/+21
| | | | | | | | | EXTRACT_SUBREG no longer appears as a machine instruction. Use COPY instead. Add isCopy() checks in many places using isMoveInstr() and isExtractSubreg(). The isMoveInstr hook will be removed later. llvm-svn: 107879
* 80-col fixup.Eric Christopher2010-07-021-1/+2
| | | | llvm-svn: 107537
* Don't return a std::vector in the Spiller interface, but take a reference to aJakob Stoklund Olesen2010-06-241-5/+2
| | | | | | | | vector instead. This avoids needless copying and allocation. Add documentation. llvm-svn: 106788
* improve portability to systems that don't have powf/modf (e.g. solaris 9)Chris Lattner2010-05-151-1/+1
| | | | | | patch by Evzen Muller! llvm-svn: 103876
* rename llvm::llvm_report_error -> llvm::report_fatal_errorChris Lattner2010-04-071-1/+1
| | | | llvm-svn: 100709
* Remove dead codeJakob Stoklund Olesen2010-02-261-4/+0
| | | | llvm-svn: 97261
* Change errs() to dbgs().David Greene2010-01-051-32/+32
| | | | llvm-svn: 92583
* Fix a bunch of little errors that Clang complains about when its being pedanticDouglas Gregor2009-12-191-1/+1
| | | | llvm-svn: 91764
* Moved spill weight calculation out of SimpleRegisterCoalescing and into its ↵Lang Hames2009-12-141-0/+2
| | | | | | own pass: CalculateSpillWeights. llvm-svn: 91273
* Also attempt trivial coalescing for live intervals that end in a copy.Jakob Stoklund Olesen2009-12-101-44/+54
| | | | | | | | | | | | | | | The coalescer is supposed to clean these up, but when setting up parameters for a function call, there may be copies to physregs. If the defining instruction has been LICM'ed far away, the coalescer won't touch it. The register allocation hint does not always work - when the register allocator is backtracking, it clears the hints. This patch is more conservative than r90502, and does not break 483.xalancbmk/i686. It still breaks the PowerPC bootstrap, so it is disabled by default, and can be enabled with the -trivial-coalesce-ends option. llvm-svn: 91049
* Added a new "splitting" spiller.Lang Hames2009-12-091-9/+6
| | | | | | | | | | | | | When a call is placed to spill an interval this spiller will first try to break the interval up into its component values. Single value intervals and intervals which have already been split (or are the result of previous splits) are spilled by the default spiller. Splitting intervals as described above may improve the performance of generated code in some circumstances. This work is experimental however, and it still miscompiles many benchmarks. It's not recommended for general use yet. llvm-svn: 90951
* Temporarily revert r90502. It was causing the llvm-gcc bootstrap on PPC to fail.Bill Wendling2009-12-051-48/+44
| | | | llvm-svn: 90653
* Also attempt trivial coalescing for live intervals that end in a copy.Jakob Stoklund Olesen2009-12-041-44/+48
| | | | | | | | | | | | | The coalescer is supposed to clean these up, but when setting up parameters for a function call, there may be copies to physregs. If the defining instruction has been LICM'ed far away, the coalescer won't touch it. The register allocation hint does not always work - when the register allocator is backtracking, it clears the hints. This patch takes care of a few more cases that r90163 missed. llvm-svn: 90502
* Cleanups.David Greene2009-11-201-3/+6
| | | | | | Make things a little more efficient as suggested by Evan. llvm-svn: 89489
* Removed references to LiveStacks from Spiller.* . They're no longer needed.Lang Hames2009-11-201-1/+1
| | | | llvm-svn: 89422
* Fix a small bug.David Greene2009-11-191-1/+1
| | | | | | | Fix one case we missed to make sure we reserve registers from allocation. llvm-svn: 89376
* Add support for spreading register allocation.David Greene2009-11-191-7/+60
| | | | | | | | | | | | | Add a -linearscan-skip-count argument (default to 0) that tells the allocator to remember the last N registers it allocated and skip them when looking for a register candidate. This tends to spread out register usage and free up post-allocation scheduling at the cost of slightly more register pressure. The primary benefit is the ability to backschedule reloads. This is turned off by default. llvm-svn: 89356
* Added a new Spiller implementation which wraps ↵Lang Hames2009-11-191-18/+3
| | | | | | | | | | LiveIntervals::addIntervalsForSpills. All spiller calls in RegAllocLinearScan now go through the new Spiller interface. The "-new-spill-framework" command line option has been removed. To use the trivial in-place spiller you should now pass "-spiller=trivial -rewriter=trivial". (Note the trivial spiller/rewriter are only meant to serve as examples of the new in-place modification work. Enabling them will yield terrible, though hopefully functional, code). llvm-svn: 89311
* The Indexes Patch.Lang Hames2009-11-031-23/+32
| | | | | | | | | | | | | | | | This introduces a new pass, SlotIndexes, which is responsible for numbering instructions for register allocation (and other clients). SlotIndexes numbering is designed to match the existing scheme, so this patch should not cause any changes in the generated code. For consistency, and to avoid naming confusion, LiveIndex has been renamed SlotIndex. The processImplicitDefs method of the LiveIntervals analysis has been moved into its own pass so that it can be run prior to SlotIndexes. This was necessary to match the existing numbering scheme. llvm-svn: 85979
* Remove includes of Support/Compiler.h that are no longer needed after theNick Lewycky2009-10-251-1/+0
| | | | | | VISIBILITY_HIDDEN removal. llvm-svn: 85043
* Remove VISIBILITY_HIDDEN from class/struct found inside anonymous namespaces.Nick Lewycky2009-10-251-1/+1
| | | | | | | Chris claims we should never have visibility_hidden inside any .cpp file but that's still not true even after this commit. llvm-svn: 85042
* Renamed MachineInstrIndex to LiveIndex.Lang Hames2009-10-031-12/+12
| | | | llvm-svn: 83254
* Simplify a few more uses of reg_iterator.Dan Gohman2009-09-251-3/+3
| | | | llvm-svn: 82812
* Replaces uses of unsigned for indexes in LiveInterval and VNInfo withLang Hames2009-09-041-22/+25
| | | | | | | | a new class, MachineInstrIndex, which hides arithmetic details from most clients. This is a step towards allowing the register allocator to update/insert code during allocation. llvm-svn: 81040
* Kill off more cerr/cout uses and prune includes a bit.Benjamin Kramer2009-08-231-1/+1
| | | | llvm-svn: 79852
* Convert DOUT to DEBUG(errs()...).Bill Wendling2009-08-221-55/+67
| | | | llvm-svn: 79756
OpenPOWER on IntegriCloud