summaryrefslogtreecommitdiffstats
path: root/llvm/lib
Commit message (Collapse)AuthorAgeFilesLines
* Thread comparisons over udiv/sdiv/ashr/lshr exact and lshr nuw/nsw wheneverNick Lewycky2011-03-052-1/+54
| | | | | | | | | possible. This goes into instcombine and instsimplify because instsimplify doesn't need to check hasOneUse since it returns (almost exclusively) constants. This fixes PR9343 #4 #5 and #8! llvm-svn: 127064
* Try once again to optimize "icmp (srem X, Y), Y" by turning the comparison intoNick Lewycky2011-03-051-0/+29
| | | | | | true/false or "icmp slt/sge Y, 0". llvm-svn: 127063
* Rework the global split cost calculation.Jakob Stoklund Olesen2011-03-051-21/+30
| | | | | | | The global cost is the sum of block frequencies for spill code that must be inserted because preferences weren't met. llvm-svn: 127062
* Compute the constraints for global live range splitting from an interference ↵Jakob Stoklund Olesen2011-03-051-163/+67
| | | | | | | | | | | pattern. This simplifies the code and makes it faster too. The interference patterns are saved for each candidate register. It will be reused for actually executing the split. Work in progress. llvm-svn: 127054
* Teach the register scavenger to take subregs into account when finding a ↵Jim Grosbach2011-03-051-5/+10
| | | | | | free register. llvm-svn: 127049
* Support unregistering exception frames of functions when they are removed.Eric Christopher2011-03-042-6/+8
| | | | | | | | Patch by Johannes Schaub! Fixes PR8548 llvm-svn: 127047
* Improve readability with some whitespace!Eric Christopher2011-03-041-1/+1
| | | | llvm-svn: 127043
* Extract a method. No functional change.Jakob Stoklund Olesen2011-03-041-40/+52
| | | | llvm-svn: 127040
* Initialize variable.Bill Wendling2011-03-041-1/+1
| | | | llvm-svn: 127038
* Go back to comparing spill weights when deciding if interference can be evicted.Jakob Stoklund Olesen2011-03-041-9/+5
| | | | | | | It gives better results. Sometimes, a live range can be large and still have high spill weight. Such a range should not be spilled. llvm-svn: 127036
* Improve div/rem node handling on mips. Patch by Akira HatanakaBruno Cardoso Lopes2011-03-044-34/+80
| | | | llvm-svn: 127034
* Expands register/immediate pairs when the immediate is too large to fit in ↵Bruno Cardoso Lopes2011-03-043-8/+122
| | | | | | 16-bit field. Patch by Akira Hatanaka llvm-svn: 127032
* When decling to reuse existing expressions that involve casts, ignoreDan Gohman2011-03-041-1/+1
| | | | | | | bitcasts, which are really no-ops here. This fixes slowdowns on MultiSource/Applications/aha and others. llvm-svn: 127031
* Rewrite and simplify o32 vaarg passing, no functional changes. Patch by Sasa ↵Bruno Cardoso Lopes2011-03-041-37/+19
| | | | | | Stankovic llvm-svn: 127029
* Be nice to Xcore and the XMOS assembler and avoid quoting section namesJoerg Sonnenberger2011-03-041-12/+18
| | | | | | that contain only letters, digits and the characters "_" and ".". llvm-svn: 127028
* Lowers block address. Currently asserts when relocation model is not PIC. ↵Bruno Cardoso Lopes2011-03-045-1/+40
| | | | | | Patch by Akira Hatanaka llvm-svn: 127027
* raw_ostream: while it is generally desirable to do larger writes, it can lead toBenjamin Kramer2011-03-041-3/+7
| | | | | | | | | | inefficient file system buffering if the writes are not a multiple of the desired buffer size. Avoid this by limiting the large write to a multiple of the buffer size and copying the remainder into the buffer. Thanks to Dan for pointing this out. llvm-svn: 127026
* Renumber slot indexes locally when possible.Jakob Stoklund Olesen2011-03-041-2/+25
| | | | | | | | | | | | | Initially, slot indexes are quad-spaced. There is room for inserting up to 3 new instructions between the original instructions. When we run out of indexes between two instructions, renumber locally using double-spaced indexes. The original quad-spacing means that we catch up quickly, and we only have to renumber a handful of instructions to get a monotonic sequence. This is much faster than renumbering the whole function as we did before. llvm-svn: 127023
* Revert broken srem logic from r126991.Nick Lewycky2011-03-041-15/+0
| | | | llvm-svn: 127021
* Fix an old copy-n-pasteBruno Cardoso Lopes2011-03-041-2/+2
| | | | llvm-svn: 127020
* Disable ARMGlobalMerge on darwin. The debugger is not yet able to extract ↵Devang Patel2011-03-041-0/+6
| | | | | | individual variable's info from merged global. llvm-svn: 127019
* Expands FCOS and FSIN nodes when type is f64.Bruno Cardoso Lopes2011-03-041-0/+2
| | | | llvm-svn: 127017
* Number SlotIndexes uniformly without looking at the number of defs on each ↵Jakob Stoklund Olesen2011-03-041-24/+5
| | | | | | | | | | | | instruction. You can't really predict how many indexes will be needed from the number of defs, so let's keep it simple. Also remove an extra empty index that was inserted after each basic block. It was intended for live-out ranges, but it was never used that way. llvm-svn: 127014
* raw_ostream: If writing a string that is larger than the buffer, write it ↵Benjamin Kramer2011-03-041-9/+13
| | | | | | | | directly instead of doing many buffer-sized writes. This caps the number of write(2) calls per string to a maximum of 2. llvm-svn: 127010
* Add SlotIndex statistics.Jakob Stoklund Olesen2011-03-041-0/+4
| | | | llvm-svn: 127007
* Tweak debug output. No functional changes.Jakob Stoklund Olesen2011-03-042-10/+6
| | | | llvm-svn: 127006
* Fixes addc pattern when immediate cannot be represented with 16-bit. Patch ↵Bruno Cardoso Lopes2011-03-041-1/+1
| | | | | | by Akira Hatanaka llvm-svn: 127005
* Remove (hopefully) all trailing whitespaces from the mips backend. Patch by ↵Bruno Cardoso Lopes2011-03-0420-265/+265
| | | | | | Hatanaka, Akira llvm-svn: 127003
* Revert commit 126684 "Use the correct shift amount type". It is only the ↵Duncan Sands2011-03-041-1/+1
| | | | | | | | | | | correct type after type legalization has completed. Before then it may simply not be big enough to hold the shift amount, particularly on x86 which uses a very small type for shifts (this issue broke stuff in the past which is why LegalizeTypes carefully uses a large type for shift amounts). llvm-svn: 127000
* Allow vector shifts (shl,lshr,ashr) on SPU.Kalle Raiskila2011-03-041-48/+16
| | | | | | | | | There was a previous implementation with patterns that would have matched e.g. shl <v4i32> <i32>, but this is not valid LLVM IR so they never were selected. llvm-svn: 126998
* Allow load from constant on SPU.Kalle Raiskila2011-03-041-1/+6
| | | | | | A 'load <4 x i32>* null' crashes llc before this fix. llvm-svn: 126995
* Fold "icmp pred (srem X, Y), Y" like we do for urem. Handle signed comparisonsNick Lewycky2011-03-041-1/+30
| | | | | | | in the urem case, though not the other way around. This is enough to get #3 from PR9343! llvm-svn: 126991
* Teach instruction simplify to use constant ranges to solve problems of the formNick Lewycky2011-03-041-37/+61
| | | | | | | | | "icmp pred %X, CI" and a number of examples where "%X = binop %Y, CI2". Some of these cases (div and rem) used to make it through opt -O2, but the others are probably now making code elsewhere redundant (probably instcombine). llvm-svn: 126988
* DenseMap<uintptr_t,...> doesn't allow all values as keys.Jakob Stoklund Olesen2011-03-041-0/+2
| | | | | | | Avoid colliding with the sentinels, hopefully unbreaking llvm-gcc-x86_64-linux-selfhost. llvm-svn: 126982
* Minor pre-RA-sched fixes and cleanup.Andrew Trick2011-03-041-7/+15
| | | | | | | | Fix the PendingQueue, then disable it because it's not required for the current schedulers' heuristics. Fix the logic for the unused list-ilp scheduler. llvm-svn: 126981
* Add ArrayRef variant.Devang Patel2011-03-041-0/+3
| | | | llvm-svn: 126978
* Precompute block frequencies, pow() isn't free.Jakob Stoklund Olesen2011-03-043-17/+15
| | | | llvm-svn: 126975
* Use an IndexedMap instead of a DenseMap for the live-out cache.Jakob Stoklund Olesen2011-03-042-48/+47
| | | | | | | This speeds up updateSSA() so it only accounts for 5% of the live range splitting time. llvm-svn: 126972
* PR9377: Handle x86 str with register operand in a way consistent with gas.Eli Friedman2011-03-041-4/+9
| | | | llvm-svn: 126970
* There are times when the landing pad won't have a call to 'eh.selector' inBill Wendling2011-03-031-9/+23
| | | | | | | | | | | | | | it. It's been assumed up til now that it would be in its immediate successor. However, this isn't necessarily the case. It could be in one of its successor's successors. Modify the code to more thoroughly check for an 'eh.selector' call in successors. It only looks at a successor if we get there as a result of an unconditional branch. Testcase ObjC/exceptions-4.m in r126968. llvm-svn: 126969
* PR8053: Fix encoding of S bit in some ARM instructions.Bob Wilson2011-03-031-1/+1
| | | | | | Patch by Zonr Chang! llvm-svn: 126967
* Revert r123908; the code in question is completely untested and wrong.Eli Friedman2011-03-032-28/+0
| | | | llvm-svn: 126964
* Bug#9033: For the ELF assembler output, always quote the section name.Joerg Sonnenberger2011-03-031-2/+16
| | | | llvm-svn: 126963
* Fix typo.Devang Patel2011-03-031-1/+1
| | | | llvm-svn: 126962
* Fix thinko in previous check-in.Devang Patel2011-03-031-1/+3
| | | | | | Add comment. llvm-svn: 126959
* llvm::Function argument count is not a good indicator of how many arugments ↵Devang Patel2011-03-031-1/+4
| | | | | | does the function have at source level. If we need more space, just resize vector conservatively. This vector is only used once per function. llvm-svn: 126957
* Allow a target to choose whether to prefer the scavenger emergency spill slotJim Grosbach2011-03-031-7/+6
| | | | | | be next to the frame pointer or the stack pointer. llvm-svn: 126956
* Split MCEELFStreamer and ELFObjectWriter into .h and .cpp files, so that ↵Jan Sjödin2011-03-034-480/+662
| | | | | | other components can use them. llvm-svn: 126942
* Fix typo in comment.Richard Osborne2011-03-031-1/+1
| | | | llvm-svn: 126941
* Optimize fprintf -> iprintf if there are no floating point argumentsRichard Osborne2011-03-032-8/+29
| | | | | | and siprintf is available on the target. llvm-svn: 126940
OpenPOWER on IntegriCloud