summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/RegAllocLinearScan.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Eliminate static ctors from StatisticsChris Lattner2006-12-191-9/+6
| | | | llvm-svn: 32698
* Detemplatize the Statistic class. The only type it is instantiated withChris Lattner2006-12-061-2/+2
| | | | | | is 'unsigned'. llvm-svn: 32279
* eliminate fp statisticChris Lattner2006-12-061-3/+3
| | | | llvm-svn: 32251
* Unbreak VC++ build.Jeff Cohen2006-12-021-0/+1
| | | | llvm-svn: 32113
* Replace std::cerr uses of the "DEBUG" macro with "DOUT" instead. RemovesBill Wendling2006-11-171-29/+27
| | | | | | a #include of iostream. llvm-svn: 31800
* Remove redundant <cmath>.Jim Laskey2006-11-081-1/+0
| | | | llvm-svn: 31561
* Use correct value for float HUGH_VAL.Jim Laskey2006-11-071-2/+2
| | | | llvm-svn: 31500
* LinearScanner hotspot.Jim Laskey2006-10-241-3/+2
| | | | llvm-svn: 31153
* s|llvm/Support/Visibility.h|llvm/Support/Compiler.h|Chris Lattner2006-08-271-1/+1
| | | | llvm-svn: 29911
* Final polish on machine pass registries.Jim Laskey2006-08-021-1/+1
| | | | llvm-svn: 29471
* Introducing plugable register allocators and instruction schedulers.Jim Laskey2006-08-011-0/+5
| | | | llvm-svn: 29434
* Reduce number of exported symbolsAndrew Lenharth2006-07-201-2/+3
| | | | llvm-svn: 29220
* Shave another 27K off libllvmgcc.dylib with visibility hiddenChris Lattner2006-06-281-1/+2
| | | | llvm-svn: 28973
* If the register allocator cannot find a register to spill, try the aliases. IfEvan Cheng2006-05-121-2/+19
| | | | | | | that still fails (because all the register spill weights are inf), just grab one. llvm-svn: 28262
* Backing out previous check-in.Evan Cheng2006-05-111-16/+1
| | | | llvm-svn: 28219
* If the live interval legnth is essentially zero, i.e. in every live rangeEvan Cheng2006-05-101-1/+15
| | | | | | | the use follows def immediately, it doesn't make sense to spill it and hope it will be easier to allocate for this LI. llvm-svn: 28217
* Add some comments.Chris Lattner2006-03-251-0/+4
| | | | llvm-svn: 27133
* Code cleanups, no functionality changeChris Lattner2006-02-231-23/+10
| | | | llvm-svn: 26328
* Add explicit #includes of <iostream>Chris Lattner2006-01-221-0/+1
| | | | llvm-svn: 25515
* HB is *the* code janitor.Duraid Madina2005-12-281-0/+1
| | | | llvm-svn: 25031
* I think I know what you meant here, but just to be safe I'll let youDuraid Madina2005-11-211-1/+1
| | | | | | | | do it. :) <_sabre_> excuses excuses llvm-svn: 24471
* Add section switching to common code generator code. Add a couple ofChris Lattner2005-11-211-0/+1
| | | | | | asserts. llvm-svn: 24445
* Expose the LiveInterval interfaces as public headers.Chris Lattner2005-09-211-1/+1
| | | | llvm-svn: 23400
* When checking the fixed intervals, don't forget to check for register aliases.Chris Lattner2005-08-301-5/+11
| | | | | | This fixes PR621 and Regression/CodeGen/X86/2005-08-30-RegAllocAliasProblem.ll llvm-svn: 23158
* Keep track of which registers are related to which other registers.Chris Lattner2005-08-231-21/+86
| | | | | | | | | | | | | Use this information to avoid doing expensive interval intersections for registers that could not possible be interesting. This speeds up linscan on ia64 compiling kc++ in release mode from taking 7.82s to 4.8s(!), total itanium llc time on this program is 27.3s now. This marginally speeds up PPC and X86, but they appear to be limited by other parts of linscan, not this code. On this program, on itanium, live intervals now takes 41% of llc time. llvm-svn: 22986
* Try to avoid scanning the fixed list. On architectures with a non-stupidChris Lattner2005-08-221-20/+55
| | | | | | | | | | | | | number of regs (e.g. most riscs), many functions won't need to use callee clobbered registers. Do a speculative check to see if we can get a free register without processing the fixed list (which has all of these). This saves a lot of time on machines with lots of callee clobbered regs (e.g. ppc and itanium, also x86). This reduces ppc llc compile time from 184s -> 172s on kc++. This is probably worth FAR FAR more on itanium though. llvm-svn: 22972
* Move some code in the register assignment case that only needs to happen ifChris Lattner2005-08-221-17/+26
| | | | | | | | we spill out of the fast path. The scan of active_ and the calls to updateSpillWeights don't need to happen unless a spill occurs. This reduces debug llc time of kc++ with ppc from 187.3s to 183.2s. llvm-svn: 22971
* Speed up this loop a bit, based on some observations that Nate made, andChris Lattner2005-08-221-8/+34
| | | | | | add some comments. This loop really needs to be reevaluated! llvm-svn: 22966
* Remove trailing whitespaceMisha Brukman2005-04-211-4/+4
| | | | llvm-svn: 21420
* Update these register allocators to set the PhysRegUsed info in MachineFunction.Chris Lattner2005-01-231-2/+9
| | | | llvm-svn: 19791
* Silence VS warningsChris Lattner2005-01-081-1/+1
| | | | llvm-svn: 19385
* Move virtual method call out of loopChris Lattner2004-12-151-2/+2
| | | | llvm-svn: 18955
* Move virtual function call out of loop to speed up getFreePhysReg by aboutNate Begeman2004-12-071-2/+2
| | | | | | 20%, shaving 0.1s off hbd compile time on my g5. Yay. llvm-svn: 18592
* * There is no reason for SpillWeights to be an instance varChris Lattner2004-11-181-69/+71
| | | | | | | | * Do not put fixed registers into the unhandled set. This means they will never find their way into the inactive, active, or handled sets, so we can simplify a bunch of code. llvm-svn: 17945
* Fix a couple of bugs where we considered physregs past their range as possiblyChris Lattner2004-11-181-6/+11
| | | | | | intersecting an interval. llvm-svn: 17939
* Start using the iterators in the fixed_ intervals to avoid having to binaryChris Lattner2004-11-181-5/+12
| | | | | | | search physreg intervals every time we access it. This takes another half second off of linscan. llvm-svn: 17937
* Add a counter for the number of times linscan has to backtrack. Start usingChris Lattner2004-11-181-22/+36
| | | | | | | the iterator hints we have to speed up overlaps(). This speeds linscan up by about .2s (out of 8.7) on 175.vpr for PPC. llvm-svn: 17935
* * Improve comments/documentation substantiallyChris Lattner2004-11-181-128/+172
| | | | | | | | | | | | | | | | | | * Eliminate the releaseMemory method, this is not an analysis * Change the fixed, active, and inactive lists of intervals to maintain an iterator for the current position in the interval. This allows us to do constant time increments of the iterator instead of having to do a binary search to find our liverange in our liveinterval all of the time, which substantially speeds up cases where LiveIntervals have many LiveRanges - which is very common for physical registers. On targets with many physregs, this can make a noticable difference. With a release build of LLC for PPC, this halves the time in processInactiveIntervals and processActiveIntervals, from 1.5s to .75s. This also lays the ground for more to come. llvm-svn: 17933
* Rename some methods, use 'begin' instead of 'start', add new LiveIntervalChris Lattner2004-11-181-11/+13
| | | | | | iterator/begin/end members. llvm-svn: 17930
* Do not make i have bigger scope that we needChris Lattner2004-11-051-2/+2
| | | | llvm-svn: 17483
* Free the VirtRegMap at the end of MachineFunction processing instead of atChris Lattner2004-09-301-1/+1
| | | | | | the beginning of processing the next one. llvm-svn: 16605
* Fixes to make LLVM compile with vc7.1.Alkis Evlogimenos2004-09-031-2/+2
| | | | | | Patch contributed by Paolo Invernizzi! llvm-svn: 16152
* Change the way we choose a free register: instead of picking the firstAlkis Evlogimenos2004-09-021-3/+14
| | | | | | | | | | | | | | | | | | | | | | free allocatable register, we prefer the a free one with the most uses of inactive intervals. This causes less spills and performes a bit better compared to gcc: Program | GCC/LLC (Before)| GCC/LLC (After) 164.gzip/164.gzip | 0.59 | 0.60 175.vpr/175.vpr | 0.57 | 0.58 176.gcc/176.gcc | 0.59 | 0.61 181.mcf/181.mcf | 0.94 | 0.95 186.crafty/186.crafty | 0.62 | 0.62 197.parser/197.parser | 0.89 | 0.88 252.eon/252.eon | 0.61 | 0.66 253.perlbmk/253.perlbmk | 0.79 | 0.84 254.gap/254.gap | 0.81 | 0.81 255.vortex/255.vortex | 0.92 | 0.93 256.bzip2/256.bzip2 | 0.69 | 0.69 300.twolf/300.twolf | 0.91 | 0.90 llvm-svn: 16147
* We don't need to sort the added vector as unhandled intervals areAlkis Evlogimenos2004-09-021-1/+0
| | | | | | stored in a binary heap. llvm-svn: 16143
* Changes For Bug 352Reid Spencer2004-09-011-3/+3
| | | | | | | | Move include/Config and include/Support into include/llvm/Config, include/llvm/ADT and include/llvm/Support. From here on out, all LLVM public header files must be under include/llvm/. llvm-svn: 16137
* Be a bit more efficient when processing the active and inactiveAlkis Evlogimenos2004-09-011-26/+31
| | | | | | | | | lists. Instead of scanning the vector backwards, scan it forward and swap each element we want to erase. Then at the end erase all removed intervals at once. This doesn't save much: 0.08s out of 4s when compiling 176.gcc. llvm-svn: 16136
* Now that LiveIntervals::addIntervalsForSpills is fixed, do not requireAlkis Evlogimenos2004-08-271-2/+0
| | | | | | LiveVariables. llvm-svn: 16076
* Back out this change as it broke the build last night. This should beAlkis Evlogimenos2004-08-271-0/+2
| | | | | | | investicated further as the linearscan variants don't really need LiveVariables... llvm-svn: 16074
* The linear scan variants do not require the LiveVariables analysis.Alkis Evlogimenos2004-08-271-2/+0
| | | | llvm-svn: 16071
* Convert indentation to 2 spaces.Alkis Evlogimenos2004-08-041-438/+438
| | | | llvm-svn: 15489
OpenPOWER on IntegriCloud