aboutsummaryrefslogtreecommitdiffstats
path: root/lib/CodeGen
Commit message (Collapse)AuthorAgeFilesLines
* Hyphenate target-(in)dependent for more tasty grammar goodness (tm)Misha Brukman2004-10-081-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16854 91177308-0d34-0410-b5e6-96231b3b80d8
* InstrSched has been moved to lib/Target/SparcV9Misha Brukman2004-10-081-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16850 91177308-0d34-0410-b5e6-96231b3b80d8
* InstrSched is SparcV9-specific and so has been moved to lib/Target/SparcV9/Misha Brukman2004-10-087-3197/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16849 91177308-0d34-0410-b5e6-96231b3b80d8
* Single-space instead of double-spacing in the MakefileMisha Brukman2004-10-081-2/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16845 91177308-0d34-0410-b5e6-96231b3b80d8
* Do not repeat the map lookupChris Lattner2004-10-011-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16633 91177308-0d34-0410-b5e6-96231b3b80d8
* When a virtual register is folded into an instruction, keep track of whetherChris Lattner2004-10-013-27/+52
| | | | | | | | | it was a use, def, or both. This allows us to be less pessimistic in our analysis of them. In practice, this doesn't make a big difference, but it doesn't hurt either. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16632 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a simple little improvement to the local spiller to keep track of storesChris Lattner2004-10-011-0/+26
| | | | | | | | | | | and delete them if they turn out to be dead. This is a useful little hack that even speeds up some programs. For example, it speeds up Ptrdist/ks from 17.53s to 15.59s, and 188.ammp from 149s to 146s. This also speeds up llc :) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16630 91177308-0d34-0410-b5e6-96231b3b80d8
* Substantially revamp the local spiller, causing it to actually improve theChris Lattner2004-10-011-164/+301
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | generated code over the simple spiller. The new local spiller generates substantially better code than the simple one in some cases, by reusing values that are loaded out of stack slots and kept available in registers. This primarily helps programs that are spilling a lot, and there is still stuff that can be done to improve it. This patch makes the local spiller the default, as it's only a tiny bit slower than the simple spiller (it increases the runtime of llc by < 1%). Here are some numbers with speedups. Program #reuse old(s) new(s) Speedup Povray: 3452, 16.87 -> 15.93 (5.5%) 177.mesa: 2176, 2.77 -> 2.76 (0%) 179.art: 35, 28.43 -> 28.01 (1.5%) 183.equake: 55, 61.44 -> 61.41 (0%) 188.ammp: 869, 174 -> 149 (15%) 164.gzip: 43, 40.73 -> 40.71 (0%) 175.vpr: 351, 18.54 -> 17.34 (6.5%) 176.gcc: 2471, 5.01 -> 4.92 (1.8%) 181.mcf 42, 79.30 -> 75.20 (5.2%) 186.crafty: 484, 29.73 -> 30.04 (-1%) 197.parser: 251, 10.47 -> 10.67 (-1%) 252.eon: 1501, 1.98 -> 1.75 (12%) 253.perlbm: 1183, 14.83 -> 14.42 (2.8%) 254.gap: 825, 7.46 -> 7.29 (2.3%) 255.vortex: 285, 10.51 -> 10.27 (2.3%) 256.bzip2: 63, 55.70 -> 55.20 (0.9%) 300.twolf: 830, 21.63 -> 22.00 (-1%) PtrDist/ks 14, 32.75 -> 17.53 (46.5%) Olden/tsp 46, 8.71 -> 8.24 (5.4%) Free/distray 70, 1.09 -> 0.99 (9.2%) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16629 91177308-0d34-0410-b5e6-96231b3b80d8
* Pretty print a bit nicer :)Chris Lattner2004-10-011-2/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16628 91177308-0d34-0410-b5e6-96231b3b80d8
* Document this class a bit :-)Alkis Evlogimenos2004-10-011-0/+34
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16626 91177308-0d34-0410-b5e6-96231b3b80d8
* Use more efficient map operations. Fix a bug that would affect hypotheticalChris Lattner2004-09-301-6/+8
| | | | | | | targets that supported multiple memory operands. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16614 91177308-0d34-0410-b5e6-96231b3b80d8
* There is no need to call MachineInstr::print directly, just send the MI& to ↵Chris Lattner2004-09-302-18/+18
| | | | | | an ostream. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16613 91177308-0d34-0410-b5e6-96231b3b80d8
* * Wrap some comments to 80 colsChris Lattner2004-09-302-31/+38
| | | | | | | | | * Add const_iterator stuff * Add a print method, which means that I can now call dump() from the debugger. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16612 91177308-0d34-0410-b5e6-96231b3b80d8
* Simplify the logic in the simple spiller and capitalize some variablesChris Lattner2004-09-301-86/+90
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16609 91177308-0d34-0410-b5e6-96231b3b80d8
* Switch from defaulting to the 'local' spiller to the 'simple' spiller. TheChris Lattner2004-09-301-2/+2
| | | | | | | | | | | two spillers produce perfectly identical code (at least on povray and eon), but the simple spiller is substantially faster than the local spiller. Once the local spiller is improved, we can switch back. Switching cuts 5.2% off of the llc time for povray (about 1.3s). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16608 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't use a densemap for keeping track of which vregs are already loaded, justChris Lattner2004-09-301-6/+10
| | | | | | | | use a simple vector. This speeds up -spiller=simple from taking 22s to taking .1s on povray (debug build). This change does not modify the generated code. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16607 91177308-0d34-0410-b5e6-96231b3b80d8
* Use longer and more explicit names for instance vars (particularly importantChris Lattner2004-09-302-50/+46
| | | | | | | | data structures). Fix the print method to send to the right ostream, not always cerr. Delete typedefs that are only used once. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16606 91177308-0d34-0410-b5e6-96231b3b80d8
* Free the VirtRegMap at the end of MachineFunction processing instead of atChris Lattner2004-09-301-1/+1
| | | | | | | the beginning of processing the next one. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16605 91177308-0d34-0410-b5e6-96231b3b80d8
* Reindent code, improve comments, move huge nested methods out of classes,Chris Lattner2004-09-302-407/+417
| | | | | | | prune #includes, add print/dump methods, etc. No functionality changes. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16604 91177308-0d34-0410-b5e6-96231b3b80d8
* Add includes and use std:: for standard library calls to make codeAlkis Evlogimenos2004-09-283-22/+25
| | | | | | | compile on windows. This patch was contributed by Paolo Invernizzi. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16539 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix includes. Patch contributed by Paolo Invernizzi!Alkis Evlogimenos2004-09-281-0/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16533 91177308-0d34-0410-b5e6-96231b3b80d8
* Grow the map on entry so that we don't crash if joinIntervals neverAlkis Evlogimenos2004-09-091-2/+1
| | | | | | | runs (if coalescing is disabled for example). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16259 91177308-0d34-0410-b5e6-96231b3b80d8
* Use a DenseMap for mapping reg->reg. This improves the LiveIntervalAlkis Evlogimenos2004-09-082-9/+12
| | | | | | | analysis running time from 2.7869secs to 2.5226secs on 176.gcc. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16244 91177308-0d34-0410-b5e6-96231b3b80d8
* Indent to 2 spaces and cleanup excess whitespace.Alkis Evlogimenos2004-09-051-48/+47
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16188 91177308-0d34-0410-b5e6-96231b3b80d8
* Indent to 2 spaces.Alkis Evlogimenos2004-09-051-26/+27
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16187 91177308-0d34-0410-b5e6-96231b3b80d8
* Order #includes alphabetically, local .h files first.Misha Brukman2004-09-031-3/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16153 91177308-0d34-0410-b5e6-96231b3b80d8
* Fixes to make LLVM compile with vc7.1.Alkis Evlogimenos2004-09-032-2/+3
| | | | | | | Patch contributed by Paolo Invernizzi! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16152 91177308-0d34-0410-b5e6-96231b3b80d8
* Change the way we choose a free register: instead of picking the firstAlkis Evlogimenos2004-09-021-4/+15
| | | | | | | | free allocatable register, we prefer the a free one with the most uses of inactive intervals. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16148 91177308-0d34-0410-b5e6-96231b3b80d8
* 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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16147 91177308-0d34-0410-b5e6-96231b3b80d8
* We don't need to sort the added vector as unhandled intervals areAlkis Evlogimenos2004-09-021-1/+0
| | | | | | | stored in a binary heap. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16143 91177308-0d34-0410-b5e6-96231b3b80d8
* Changes For Bug 352Reid Spencer2004-09-0127-53/+53
| | | | | | | | | 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/. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16137 91177308-0d34-0410-b5e6-96231b3b80d8
* Be a bit more efficient when processing the active and inactiveAlkis Evlogimenos2004-09-012-52/+62
| | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16136 91177308-0d34-0410-b5e6-96231b3b80d8
* Give a better assertion if we see a use before a def.Alkis Evlogimenos2004-09-011-0/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16135 91177308-0d34-0410-b5e6-96231b3b80d8
* Minor code clarity changes.Alkis Evlogimenos2004-08-311-4/+6
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16123 91177308-0d34-0410-b5e6-96231b3b80d8
* Put this change back in after testing from Reid proved its innocence. ↵Nate Begeman2004-08-291-2/+2
| | | | | | getSpillSize now returns value in bits git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16102 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove dead code.Alkis Evlogimenos2004-08-281-1/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16077 91177308-0d34-0410-b5e6-96231b3b80d8
* Now that LiveIntervals::addIntervalsForSpills is fixed, do not requireAlkis Evlogimenos2004-08-272-4/+0
| | | | | | | LiveVariables. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16076 91177308-0d34-0410-b5e6-96231b3b80d8
* Only update LiveVariables if it is available. addIntervalsForSpillsAlkis Evlogimenos2004-08-271-9/+12
| | | | | | | runs after the initial run of the live interval analysis. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16075 91177308-0d34-0410-b5e6-96231b3b80d8
* Back out this change as it broke the build last night. This should beAlkis Evlogimenos2004-08-272-0/+4
| | | | | | | | investicated further as the linearscan variants don't really need LiveVariables... git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16074 91177308-0d34-0410-b5e6-96231b3b80d8
* Back out change to divide getSpillSize by 8 until I figure out why it breaks ↵Nate Begeman2004-08-271-2/+2
| | | | | | x86, which has register sizes in bits. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16073 91177308-0d34-0410-b5e6-96231b3b80d8
* The linear scan variants do not require the LiveVariables analysis.Alkis Evlogimenos2004-08-272-4/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16071 91177308-0d34-0410-b5e6-96231b3b80d8
* Register sizes are in bits, not bytesNate Begeman2004-08-271-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16070 91177308-0d34-0410-b5e6-96231b3b80d8
* Use newly added API in MRegisterInfo and don't expose the allocatableAlkis Evlogimenos2004-08-261-13/+1
| | | | | | | register set anymore. Its users now use the MRegisterInfo API. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16061 91177308-0d34-0410-b5e6-96231b3b80d8
* Use newly added API in MRegisterInfo.Alkis Evlogimenos2004-08-262-5/+6
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16060 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a bug in a previous checkin of mine, correctingChris Lattner2004-08-241-1/+1
| | | | | | | | | | Regression.CodeGen.Generic.2004-04-09-SameValueCoalescing.llx and the code size problem. This bug prevented us from doing most register coallesces. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16031 91177308-0d34-0410-b5e6-96231b3b80d8
* Do not use .xword and friends to emit zeros on V9. Apparently there are issuesChris Lattner2004-08-241-6/+0
| | | | | | | | | with emitting .xwords when not on an 8-byte boundary (.xword 0 is not the same as 8 .byte 0's). Because we do not know when or when we are not aligned, just emit bytes like the old V9 asmprinter did. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16006 91177308-0d34-0410-b5e6-96231b3b80d8
* Register info alignment is in bits, frame object alignment is (currently) inChris Lattner2004-08-211-1/+1
| | | | | | | bytes. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15970 91177308-0d34-0410-b5e6-96231b3b80d8
* Now that we have per-register spill size/alignment info, remove more usesChris Lattner2004-08-211-4/+5
| | | | | | | of getRegClass git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15967 91177308-0d34-0410-b5e6-96231b3b80d8
* Instead of using isDummyPhiInstr, we just compare the opcode with V9::PHI.Brian Gaeke2004-08-182-5/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15906 91177308-0d34-0410-b5e6-96231b3b80d8
* Instead of using isDummyPhiInstr, we just compare the opcode with V9::PHI.Brian Gaeke2004-08-181-3/+3
| | | | | | | Also, squash a use of TargetInstrInfo::isNop(). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15905 91177308-0d34-0410-b5e6-96231b3b80d8