summaryrefslogtreecommitdiff
path: root/lib
Commit message (Collapse)AuthorAge
* Reapply commit 143028 with a fix: the problem was casting a ConstantExpr MulDuncan Sands2011-10-27
| | | | | | | | | | | | using BinaryOperator (which only works for instructions) when it should have been a cast to OverflowingBinaryOperator (which also works for constants). While there, correct a few other dubious looking uses of BinaryOperator. Thanks to Chad Rosier for the testcase. Original commit message: My super-optimizer noticed that we weren't folding this expression to true: (x *nsw x) sgt 0, where x = (y | 1). This occurs in 464.h264ref. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143125 91177308-0d34-0410-b5e6-96231b3b80d8
* Change the sysexit mnemonic (and sysexitl) to never have the REX.W prefix andKevin Enderby2011-10-27
| | | | | | | | not depend on In32BitMode. Use the sysexitq mnemonic for the version with the REX.W prefix and only allow it only In64BitMode. rdar://9738584 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143112 91177308-0d34-0410-b5e6-96231b3b80d8
* Thumb2 t2LDMDB[_UPD] assembly parsing to recognize .w suffix.Jim Grosbach2011-10-27
| | | | | | rdar://10348844 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143110 91177308-0d34-0410-b5e6-96231b3b80d8
* Expose relocation accessors through the libObject C API.Owen Anderson2011-10-27
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143109 91177308-0d34-0410-b5e6-96231b3b80d8
* Thumb2 t2MVNi assembly parsing to recognize ".w" suffix.Jim Grosbach2011-10-27
| | | | | | | rdar://10348584 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143108 91177308-0d34-0410-b5e6-96231b3b80d8
* Add relocation iterators to the libObject C API.Owen Anderson2011-10-27
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143107 91177308-0d34-0410-b5e6-96231b3b80d8
* BlockFrequency: Use a smarter overflow check.Benjamin Kramer2011-10-27
| | | | | | This trades one 64 bit div for one 64 bit mul and some arithmetic. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143106 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert Duncan's r143028 expression folding which appears to be the culpritBob Wilson2011-10-27
| | | | | | behind a compile failure on 483.xalancbmk. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143102 91177308-0d34-0410-b5e6-96231b3b80d8
* LLLexer: Factor hex char parsing.Benjamin Kramer2011-10-27
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143101 91177308-0d34-0410-b5e6-96231b3b80d8
* Teach our Dwarf emission to use the string pool.Nick Lewycky2011-10-27
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143097 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't crash on 128-bit sdiv by constant. Found by inspection.Eli Friedman2011-10-27
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143095 91177308-0d34-0410-b5e6-96231b3b80d8
* It is not safe to sink an alloca into a stacksave/stackrestore pair, so ↵Eli Friedman2011-10-27
| | | | | | don't do that. <rdar://problem/10352360> git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143093 91177308-0d34-0410-b5e6-96231b3b80d8
* A branch predicated on a constant can just FastEmit an unconditional branch.Chad Rosier2011-10-27
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143086 91177308-0d34-0410-b5e6-96231b3b80d8
* Rename NonScalarIntSafe to something more appropriate.Lang Hames2011-10-26
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143080 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a TODO comment. FastISel works by parsing each basic block from the bottomChad Rosier2011-10-26
| | | | | | | | up. Thus, improving the support for compares is goodness because it increases the number of terminator instructions we can handle. This creates many more opportunities for target specific fast-isel. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143079 91177308-0d34-0410-b5e6-96231b3b80d8
* Factor a little more code into EmitCmp, which should have been done in the firstChad Rosier2011-10-26
| | | | | | place. No functional change intended. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143078 91177308-0d34-0410-b5e6-96231b3b80d8
* Use EmitCmp in SelectBranch. No functional change intended.Chad Rosier2011-10-26
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143076 91177308-0d34-0410-b5e6-96231b3b80d8
* Reflow lines, fix comments for doxygen style, fix whitespace. No functionalityNick Lewycky2011-10-26
| | | | | | | change. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143074 91177308-0d34-0410-b5e6-96231b3b80d8
* Factor out an EmitCmp function that can be used by both SelectCmp andChad Rosier2011-10-26
| | | | | | SelectBranch. No functional change intended. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143072 91177308-0d34-0410-b5e6-96231b3b80d8
* Trailing whitespace.Jim Grosbach2011-10-26
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143071 91177308-0d34-0410-b5e6-96231b3b80d8
* Thumb2 ldr pc-relative encoding fixes.Jim Grosbach2011-10-26
| | | | | | | | | We were parsing label references to the i12 encoding, which isn't right. They need to go to the pci variant instead. More of rdar://10348687 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143068 91177308-0d34-0410-b5e6-96231b3b80d8
* Fixes an issue reported by -verify-machineinstrs.Rafael Espindola2011-10-26
| | | | | | Patch by Sanjoy Das. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143064 91177308-0d34-0410-b5e6-96231b3b80d8
* ARM parse parenthesized expressions for label references.Jim Grosbach2011-10-26
| | | | | | Partial fix for rdar://10348687. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143063 91177308-0d34-0410-b5e6-96231b3b80d8
* This commit introduces two fake instructions MORESTACK_RET andRafael Espindola2011-10-26
| | | | | | | | | | | | MORESTACK_RET_RESTORE_R10; which are lowered to a RET and a RET followed by a MOV respectively. Having a fake instruction prevents the verifier from seeing a MachineBasicBlock end with a non-terminator (MOV). It also prevents the rather eccentric case of a MachineBasicBlock ending with RET but having successors nevertheless. Patch by Sanjoy Das. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143062 91177308-0d34-0410-b5e6-96231b3b80d8
* Make sure short memsets on ARM lower to stores, even when optimizing for size.Lang Hames2011-10-26
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143055 91177308-0d34-0410-b5e6-96231b3b80d8
* The maximum power of 2 dividing a power of 2 is itself. This occursDuncan Sands2011-10-26
| | | | | | | in 403.gcc and was spotted by my super-optimizer. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143054 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for scattered relocations to the MachO relocatation pretty printer.Owen Anderson2011-10-26
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143051 91177308-0d34-0410-b5e6-96231b3b80d8
* On an ELF system, ".debug_str" is mergeable and contains null terminated stringsNick Lewycky2011-10-26
| | | | | | | composed of one byte characters. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143044 91177308-0d34-0410-b5e6-96231b3b80d8
* The order of the two symbol listings in a Macho x86_64 subtractor relocation ↵Owen Anderson2011-10-26
| | | | | | is reversed from what seems intuitive to me. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143035 91177308-0d34-0410-b5e6-96231b3b80d8
* Thumb2 remove redundant ".w" suffix from t2MVNCCi pattern.Jim Grosbach2011-10-26
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143034 91177308-0d34-0410-b5e6-96231b3b80d8
* Include the full 64 bits of relocation data in the type info for MachO ↵Owen Anderson2011-10-26
| | | | | | relocations, so that we can recognize scattered relocations. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143033 91177308-0d34-0410-b5e6-96231b3b80d8
* Expand relocation type field to 64 bits. MachO scattered relocations ↵Owen Anderson2011-10-26
| | | | | | require 33 bits of type info. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143032 91177308-0d34-0410-b5e6-96231b3b80d8
* Improve pretty printing of GOT relocations in MachO on x86_64.Owen Anderson2011-10-26
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143031 91177308-0d34-0410-b5e6-96231b3b80d8
* My super-optimizer noticed that we weren't folding this expression toDuncan Sands2011-10-26
| | | | | | | true: (x *nsw x) sgt 0, where x = (y | 1). This occurs in 464.h264ref. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143028 91177308-0d34-0410-b5e6-96231b3b80d8
* Simplify SplitVecRes_UnaryOp by removing all the code that isDuncan Sands2011-10-26
| | | | | | | | | | | | | | | | | | | | | trying to legalize the operand types when only the result type is required to be legalized - the type legalization machinery will get round to the operands later if they need legalizing. There can be a point to legalizing operands in parallel with the result: when this saves compile time or results in better code. There was only one case in which this was true: when the operand is also split, so keep the logic for that bit. As a result of this change, additional operand legalization methods may need to be introduced to handle nodes where the result and operand types can differ, like SIGN_EXTEND, but the testsuite doesn't contain any tests where this is the case. In any case, it seems better to require such methods (and die with an assert if they doesn't exist) than to quietly produce wrong code if we forgot to special case the node in SplitVecRes_UnaryOp. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143026 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert r142530 at least temporarily while a discussion is had on ↵James Molloy2011-10-26
| | | | | | llvm-commits regarding exactly how much optsize should optimize for size over performance. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143023 91177308-0d34-0410-b5e6-96231b3b80d8
* Use a worklist to prevent the iterator from becoming invalidated because of ↵Bill Wendling2011-10-26
| | | | | | the 'removeSuccessor' call. Noticed in a Release+Asserts+Check buildbot. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143018 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove unused variable.Eric Christopher2011-10-26
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143011 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't use floating point to do an integer's job.Jakob Stoklund Olesen2011-10-26
| | | | | | | | | | | This code makes different decisions when compiled into x87 instructions because of different rounding behavior. That caused phase 2/3 miscompares on 32-bit Linux when the phase 1 compiler was built with gcc (using x87), and the phase 2 compiler was built with clang (using SSE). This fixes PR11200. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143006 91177308-0d34-0410-b5e6-96231b3b80d8
* Disable LICM speculation in high register pressure situation again now that ↵Evan Cheng2011-10-26
| | | | | | Devang has fixed other issues. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143003 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert part of r142530. The patch potentially hurts performance especiallyEvan Cheng2011-10-26
| | | | | | | | on Darwin platforms where -Os means optimize for size without hurting performance. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143002 91177308-0d34-0410-b5e6-96231b3b80d8
* Reapply r142920 with fix:Bill Wendling2011-10-26
| | | | | | | | | | | | | An MBB which branches to an EH landing pad shouldn't be considered for tail merging. In SjLj EH, the jump to the landing pad is not done explicitly through a branch statement. The EH landing pad is added as a successor to the throwing BB. Because of that however, the branch folding pass could mistakenly think that it could merge the throwing BB with another BB. This isn't safe to do. <rdar://problem/10334833> git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143001 91177308-0d34-0410-b5e6-96231b3b80d8
* The bitcode reader can create an shuffle with a place holder mask which it willMon P Wang2011-10-26
| | | | | | | | fix up later. For this special case, allow such a mask to be considered valid. <rdar://problem/8622574> git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@142992 91177308-0d34-0410-b5e6-96231b3b80d8
* Object/Archive: Cleanup anon namespace.Michael J. Spencer2011-10-25
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@142983 91177308-0d34-0410-b5e6-96231b3b80d8
* Object/Archive: Add BSD style long file name support and skip internal members.Michael J. Spencer2011-10-25
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@142981 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove extraneous printing of "-PC".Owen Anderson2011-10-25
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@142970 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for the notion of "hidden" relocations. On MachO, these are ↵Owen Anderson2011-10-25
| | | | | | | | | relocation entries that are used as additional information for other, real relocations, rather than being relocations themselves. I'm not familiar enough with ELF or COFF to know if they should have any relocations marked hidden. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@142961 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove a couple redundant checks.Eli Friedman2011-10-25
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@142959 91177308-0d34-0410-b5e6-96231b3b80d8
* Make assert() message more informative.Jim Grosbach2011-10-25
| | | | | | | PR11217. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@142956 91177308-0d34-0410-b5e6-96231b3b80d8
* Teach the MachO relocation pretty-printer to interpret ARM half-relocations.Owen Anderson2011-10-25
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@142938 91177308-0d34-0410-b5e6-96231b3b80d8