aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* revert my previous patches that introduced an additional parameter to the ↵Nuno Lopes2012-05-2215-276/+105
| | | | | | | | objectsize intrinsic. After a lot of discussion, we realized it's not the best option for run-time bounds checking git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157255 91177308-0d34-0410-b5e6-96231b3b80d8
* Only erase virtregs with no uses left.Jakob Stoklund Olesen2012-05-222-4/+133
| | | | | | | | | Also make sure registers aren't erased twice if the dead def mentions the register twice. This fixes PR12911. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157254 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix PR12858, a crash due to GVN's PRE not fully removing an instruction from theDuncan Sands2012-05-222-6/+45
| | | | | | | | | | | | | leader table. That's because it wasn't expecting instructions to turn up as leader for a value number that is not its own, but equality propagation could create this situation. One solution is to have the leader table use a WeakVH but this slows down GVN by about 5%. Instead just have equality propagation not add instructions to the leader table, only constants and arguments. In theory this might cause GVN to run more (each time it changes something it runs again) but it doesn't seem to occur enough to cause a slow down. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157251 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix constant used for pshufb mask when lowering v16i8 shuffles. Bug ↵Craig Topper2012-05-221-1/+1
| | | | | | introduced in r157043. Fixes PR12908. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157236 91177308-0d34-0410-b5e6-96231b3b80d8
* This patch adds a predicate to existing mips32 and mips64 so that thoseAkira Hatanaka2012-05-226-101/+134
| | | | | | | | | | | | | | | | | | | | instruction encodings can be excluded during mips16 processing. This revision fixes the issue raised by Jim Grosbach. bool hasStandardEncoding() const { return !inMips16Mode(); } When micromips is added it will be bool StandardEncoding() const { return !inMips16Mode()&& !inMicroMipsMode(); } No additional testing is needed other than to assure that there is no regression from this patch. Patch by Reed Kotler. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157234 91177308-0d34-0410-b5e6-96231b3b80d8
* fix the quotient returned by sdivrem() for the case when LHS is negative and ↵Nuno Lopes2012-05-222-2/+31
| | | | | | | | RHS is positive based on a patch by Preston Briggs, with some modifications git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157231 91177308-0d34-0410-b5e6-96231b3b80d8
* FileCheck'ize test, and add a bit to test for r157221.Jim Grosbach2012-05-211-1/+7
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157222 91177308-0d34-0410-b5e6-96231b3b80d8
* ARM: .end_data_region mismatch in Thumb2.Jim Grosbach2012-05-211-2/+5
| | | | | | | | | | 32-bit offset jump tables just use real branch instructions and so aren't marked as data regions. We were still emitting the .end_data_region marker though, which assert()ed. rdar://11499158 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157221 91177308-0d34-0410-b5e6-96231b3b80d8
* Added address space qualifier to intrinsic PointerType arguments.Pete Cooper2012-05-213-3/+16
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157218 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix use of an unitialized value in the LegalizeOps expansion for ISD::SUB. ↵Owen Anderson2012-05-211-1/+1
| | | | | | | | | No in-tree targets exercise this path. Patch by Micah Villmow. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157215 91177308-0d34-0410-b5e6-96231b3b80d8
* Thumb2: RSB source register should be rGRP not GPRnopc.Jim Grosbach2012-05-211-4/+4
| | | | | | t2RSB defined the operand correctly, but tRSBS didn't. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157200 91177308-0d34-0410-b5e6-96231b3b80d8
* Mark an unreachable region of code with llvm_unreachable.Dan Gohman2012-05-211-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157197 91177308-0d34-0410-b5e6-96231b3b80d8
* Typo.Chad Rosier2012-05-211-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157195 91177308-0d34-0410-b5e6-96231b3b80d8
* Make it so that the MArch, MCPU, MAttrs passed to EngineBuilder are actually ↵Owen Anderson2012-05-211-4/+0
| | | | | | | | | used. Patch by Jose Fonseca. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157191 91177308-0d34-0410-b5e6-96231b3b80d8
* test commitPatrik Hägglund2012-05-211-1/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157184 91177308-0d34-0410-b5e6-96231b3b80d8
* PR1255 (case ranges: work with ConstantRangesSet instead of ConstantInt) ↵Stepan Dyatkovskiy2012-05-213-12/+37
| | | | | | related changes for Execution and Verifier. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157183 91177308-0d34-0410-b5e6-96231b3b80d8
* Allow 256-bit shuffles to still be split even if only half of the shuffle ↵Craig Topper2012-05-212-21/+59
| | | | | | comes from two 128-bit pieces. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157175 91177308-0d34-0410-b5e6-96231b3b80d8
* Give a small negative bias to giant edge bundles.Jakob Stoklund Olesen2012-05-212-1/+12
| | | | | | | | | | | | | | | | This helps compile time when the greedy register allocator splits live ranges in giant functions. Without the bias, we would try to grow regions through the giant edge bundles, usually to find out that the region became too big and expensive. If a live range has many uses in blocks near the giant bundle, the small negative bias doesn't make a big difference, and we still consider regions including the giant edge bundle. Giant edge bundles are usually connected to landing pads or indirect branches. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157174 91177308-0d34-0410-b5e6-96231b3b80d8
* Clear kill flags on the fly when joining intervals.Jakob Stoklund Olesen2012-05-201-36/+22
| | | | | | | | | | | With physreg joining out of the way, it is easy to recognize the instructions that need their kill flags cleared while testing for interference. This allows us to skip the final scan of all instructions for an 11% speedup of the coalescer pass. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157169 91177308-0d34-0410-b5e6-96231b3b80d8
* Add RPO to the lexicon.Nick Lewycky2012-05-201-0/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157166 91177308-0d34-0410-b5e6-96231b3b80d8
* Make the global base reg GR32_NOSP.Jakob Stoklund Olesen2012-05-201-1/+1
| | | | | | It can sometimes be used in addressing modes that don't support %ESP. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157165 91177308-0d34-0410-b5e6-96231b3b80d8
* Constrain regclasses in PeepholeOptimizer.Jakob Stoklund Olesen2012-05-201-1/+10
| | | | | | | It can be necessary to restrict to a sub-class before accessing sub-registers. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157164 91177308-0d34-0410-b5e6-96231b3b80d8
* Constrain register classes in TailDup.Jakob Stoklund Olesen2012-05-201-3/+5
| | | | | | | When rewriting operands, make sure the new registers have a compatible register class. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157163 91177308-0d34-0410-b5e6-96231b3b80d8
* When legalising shifts, do not pre-build a list of operands whichPeter Collingbourne2012-05-202-10/+32
| | | | | | | may be RAUW'd by the recursive call to LegalizeOps; instead, retrieve the other operands when calling UpdateNodeOperands. Fixes PR12889. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157162 91177308-0d34-0410-b5e6-96231b3b80d8
* Emit memcmp directly from the StringMatcherEmitter.Benjamin Kramer2012-05-201-4/+4
| | | | | | | | | There should be no difference in the resulting binary, given a sufficiently smart compiler. However we already had compiler timeouts on the generated code in Intrinsics.gen, this hopefully makes the lives of slow buildbots a little easier. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157161 91177308-0d34-0410-b5e6-96231b3b80d8
* Plug a leak when using MCJIT.Benjamin Kramer2012-05-202-3/+4
| | | | | | Found by valgrind. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157160 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a missing PPC 64-bit stwu pattern.Hal Finkel2012-05-202-0/+36
| | | | | | | This seems to fix the remaining compile-time failures on PPC64 when compiling with -enable-ppc-preinc. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157159 91177308-0d34-0410-b5e6-96231b3b80d8
* Use TargetMachine's register info instead of creating a new one and leaking it.Benjamin Kramer2012-05-201-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157155 91177308-0d34-0410-b5e6-96231b3b80d8
* Use the right register class for LDRrs.Jakob Stoklund Olesen2012-05-202-3/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157152 91177308-0d34-0410-b5e6-96231b3b80d8
* Transfer memory operands to the right instruction.Jakob Stoklund Olesen2012-05-202-5/+5
| | | | | | They need to go on the PICLDR as the verifier points out. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157151 91177308-0d34-0410-b5e6-96231b3b80d8
* Properly constrain register classes for sub-registers.Jakob Stoklund Olesen2012-05-202-2/+4
| | | | | | Not all GR64 registers have sub_8bit sub-registers. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157150 91177308-0d34-0410-b5e6-96231b3b80d8
* Properly constrain register classes in 2-addr.Jakob Stoklund Olesen2012-05-202-1/+7
| | | | | | | X86 has 2-addr instructions with different constraints on the tied def and use operands. One is GR32, one is GR32_NOSP. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157149 91177308-0d34-0410-b5e6-96231b3b80d8
* Missed a push_back in r157147.Jakob Stoklund Olesen2012-05-201-1/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157148 91177308-0d34-0410-b5e6-96231b3b80d8
* Avoid deleting extra copies when RegistersDefinedFromSameValue is true.Jakob Stoklund Olesen2012-05-201-7/+8
| | | | | | | This function adds copies to be erased to DupCopies, avoid also adding them to DeadCopies. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157147 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix build bots.Jakob Stoklund Olesen2012-05-201-4/+4
| | | | | | Avoid looking at the operands of a potentially erased instruction. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157146 91177308-0d34-0410-b5e6-96231b3b80d8
* LiveRangeQuery simplifies shrinkToUses().Jakob Stoklund Olesen2012-05-201-10/+6
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157145 91177308-0d34-0410-b5e6-96231b3b80d8
* Use LiveRangeQuery in ScheduleDAGInstrs.Jakob Stoklund Olesen2012-05-201-11/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157144 91177308-0d34-0410-b5e6-96231b3b80d8
* Eliminate some uses of struct LiveRange.Jakob Stoklund Olesen2012-05-201-12/+15
| | | | | | That struct ought to be a LiveInterval implementation detail. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157143 91177308-0d34-0410-b5e6-96231b3b80d8
* Use LiveRangeQuery instead of getLiveRangeContaining().Jakob Stoklund Olesen2012-05-201-4/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157142 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a LiveRangeQuery class.Jakob Stoklund Olesen2012-05-201-0/+85
| | | | | | | | | | | This class is meant to be the primary interface for examining a live range in the vicinity on a given instruction. It avoids all the messy dealings with iterators and early clobbers. This is a more abstract interface to live ranges, hiding the implementation as a vector of segments. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157141 91177308-0d34-0410-b5e6-96231b3b80d8
* Do not pass an invalid domtree to SimplifyInstruction fromPeter Collingbourne2012-05-202-2/+27
| | | | | | LoopUnswitch. Fixes PR12887. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157140 91177308-0d34-0410-b5e6-96231b3b80d8
* Simplify overlap check.Jakob Stoklund Olesen2012-05-191-8/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157137 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix 12892.Jakob Stoklund Olesen2012-05-193-4/+146
| | | | | | | | | | | | Dead code elimination during coalescing could cause a virtual register to be split into connected components. The following rewriting would be confused about the already joined copies present in the code, but without a corresponding value number in the live range. Erase all joined copies instantly when joining intervals such that the MI and LiveInterval representations are always in sync. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157135 91177308-0d34-0410-b5e6-96231b3b80d8
* Do not eliminate allocas whose alignment exceeds that of thePeter Collingbourne2012-05-192-12/+71
| | | | | | | copied-in constant, as a subsequent user may rely on over alignment. Fixes PR12885. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157134 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a FIXME about access to negative stack-pointer offsets on PPC32.Hal Finkel2012-05-191-0/+2
| | | | | | | | | | | | | | The current code will generate a prologue which starts with something like: mflr 0 stw 31, -4(1) stw 0, 4(1) stwu 1, -16(1) But under the PPC32 SVR4 ABI, access to negative offsets from R1 is not allowed. This was pointed out by Peter Bergner. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157133 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove the late DCE in RegisterCoalescer.Jakob Stoklund Olesen2012-05-191-145/+2
| | | | | | | | | | | Dead code and joined copies are now eliminated on the fly, and there is no need for a post pass. This makes the coalescer work like other modern register allocator passes: Code is changed on the fly, there is no pending list of changes to be committed. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157132 91177308-0d34-0410-b5e6-96231b3b80d8
* Erase joined copies immediately.Jakob Stoklund Olesen2012-05-192-14/+16
| | | | | | | | | The late dead code elimination is no longer necessary. The test changes are cause by a register hint that can be either %rdi or %rax. The choice depends on the use list order, which this patch changes. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157131 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix an ancient bug in removeCopyByCommutingDef().Jakob Stoklund Olesen2012-05-191-2/+5
| | | | | | | | | | | | | | | Before rewriting uses of one value in A to register B, check that there are no tied uses. That would require multiple A values to be rewritten. This bug can't bite in the current version of the code for a fairly subtle reason: A tied use would have caused 2-addr to insert a copy before the use. If the copy has been coalesced, it will be found by the same loop changed by this patch, and the optimization is aborted. This was exposed by 400.perlbench and lua after applying a patch that deletes joined copies aggressively. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157130 91177308-0d34-0410-b5e6-96231b3b80d8
* On Haswell, perfer storing YMM registers using a single instruction.Nadav Rotem2012-05-192-5/+18
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157129 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for additional in-reg vbroadcast patternsNadav Rotem2012-05-192-3/+46
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157127 91177308-0d34-0410-b5e6-96231b3b80d8