summaryrefslogtreecommitdiffstats
path: root/llvm/lib
Commit message (Collapse)AuthorAgeFilesLines
* MCELF: Compensate for the addend on i386. Patch by Roman Divacky, with some ↵Benjamin Kramer2010-08-261-14/+7
| | | | | | cleanups. llvm-svn: 112197
* Restrict the register to tGPR to make sure the str instruction will beJim Grosbach2010-08-261-4/+4
| | | | | | encodable as a 16-bit wide instruction. llvm-svn: 112195
* Revert r112176; it broke test/CodeGen/Thumb2/thumb2-cmn.ll.Dan Gohman2010-08-261-50/+8
| | | | llvm-svn: 112191
* Reapply r112091 and r111922, support for metadata linking, with aDan Gohman2010-08-268-58/+112
| | | | | | | | | | | | | | fix: add a flag to MapValue and friends which indicates whether any module-level mappings are being made. In the common case of inlining, no module-level mappings are needed, so MapValue doesn't need to examine non-function-local metadata, which can be very expensive in the case of a large module with really deep metadata (e.g. a large C++ program compiled with -g). This flag is a little awkward; perhaps eventually it can be moved into the ClonedCodeInfo class. llvm-svn: 112190
* StringRef::compare_numeric also differed from StringRef::compare for ↵Benjamin Kramer2010-08-261-1/+1
| | | | | | characters > 127. llvm-svn: 112189
* Do unsigned char comparisons in StringRef::compare_lower to be more ↵Benjamin Kramer2010-08-261-4/+4
| | | | | | consistent with compare in corner cases. llvm-svn: 112185
* There seems to be a (potential) hardware bug with the CMN instruction andBill Wendling2010-08-261-8/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | comparison with 0. These two pieces of code should give identical results: rsbs r1, r1, 0 cmp r0, r1 mov r0, #0 it ls mov r0, #1 and: cmn r0, r1 mov r0, #0 it ls mov r0, #1 However, the CMN gives the *opposite* result when r1 is 0. This is because the carry flag is set in the CMP case but not in the CMN case. In short, the CMP instruction doesn't perform a truncate of the (logical) NOT of 0 plus the value of r0 and the carry bit (because the "carry bit" parameter to AddWithCarry is defined as 1 in this case, the carry flag will always be set when r0 >= 0). The CMN instruction doesn't perform a NOT of 0 so there is never a "carry" when this AddWithCarry is performed (because the "carry bit" parameter to AddWithCarry is defined as 0). The AddWithCarry in the CMP case seems to be relying upon the identity: ~x + 1 = -x However when x is 0 and unsigned, this doesn't hold: x = 0 ~x = 0xFFFF FFFF ~x + 1 = 0x1 0000 0000 (-x = 0) != (0x1 0000 0000 = ~x + 1) Therefore, we should disable *all* versions of CMN, especially when comparing against zero, until we can limit when the CMN instruction is used (when we know that the RHS is not 0) or when we have a hardware fix for this. (See the ARM docs for the "AddWithCarry" pseudo-code.) This is related to <rdar://problem/7569620>. llvm-svn: 112176
* Add a hackaround for PR7993 which is causing failures on x86 builders that ↵Chris Lattner2010-08-261-0/+2
| | | | | | lack sse2. llvm-svn: 112175
* implement SplitVecOp_CONCAT_VECTORS, fixing the included testcase with SSE1.Chris Lattner2010-08-263-68/+94
| | | | llvm-svn: 112171
* Use pseudo instructions for VST1d64Q.Bob Wilson2010-08-264-4/+9
| | | | llvm-svn: 112170
* fix sse1 only codegen in x86-64 mode, which is something weChris Lattner2010-08-261-6/+11
| | | | | | apparently try to support. llvm-svn: 112168
* Revert r111922, "MapValue support for MDNodes. This is similar to r109117,Daniel Dunbar2010-08-261-27/+8
| | | | | | | except ...", it is causing *massive* performance regressions when building Clang with itself (-O3 -g). llvm-svn: 112158
* Revert r112091, "Remap metadata attached to instructions when remappingDaniel Dunbar2010-08-263-31/+17
| | | | | | individual ...", which depends on r111922, which I am reverting. llvm-svn: 112157
* zap dead code.Chris Lattner2010-08-262-37/+0
| | | | llvm-svn: 112155
* remove dead protoChris Lattner2010-08-261-1/+0
| | | | llvm-svn: 112131
* zap dead code.Chris Lattner2010-08-261-13/+1
| | | | llvm-svn: 112130
* Fix PR7748 without using microsoft extensionsBruno Cardoso Lopes2010-08-262-13/+13
| | | | llvm-svn: 112128
* Enable pre-RA virtual frame base register allocation. rdar://8277890Jim Grosbach2010-08-261-1/+1
| | | | llvm-svn: 112127
* Rewrite ExtractGV, removing a bunch of stuff that didn't fully work,Dan Gohman2010-08-261-125/+32
| | | | | | and was over-complicated, and replacing it with a simple implementation. llvm-svn: 112120
* Revert svn 107892 (with changes to work with trunk). It caused a crash ifBob Wilson2010-08-261-1/+28
| | | | | | | a VLD result was not used (Radar 8355607). It should also fix pr7988, but I haven't verified that yet. llvm-svn: 112118
* we should pattern match the SSE complex arithmetic ops.Chris Lattner2010-08-251-0/+26
| | | | llvm-svn: 112109
* Start converting NEON load/stores to use pseudo instructions, beginning hereBob Wilson2010-08-255-41/+165
| | | | | | | | | | | with the VST4 instructions. Until after register allocation, we want to represent sets of adjacent registers by a single super-register. These VST4 pseudo instructions have a single QQ or QQQQ source register operand. They get expanded to the real VST4 instructions with 4 separate D register operands. Once this conversion is complete, we'll be able to remove the NEONPreAllocPass and avoid some fragile and hacky code elsewhere. llvm-svn: 112108
* remove some llvmcontext arguments that are now dead post-refactoring.Chris Lattner2010-08-254-8/+6
| | | | llvm-svn: 112104
* Change handling of illegal vector types to widen when possible instead of Chris Lattner2010-08-252-46/+97
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | expanding: e.g. <2 x float> -> <4 x float> instead of -> 2 floats. This affects two places in the code: handling cross block values and handling function return and arguments. Since vectors are already widened by legalizetypes, this gives us much better code and unblocks x86-64 abi and SPU abi work. For example, this (which is a silly example of a cross-block value): define <4 x float> @test2(<4 x float> %A) nounwind { %B = shufflevector <4 x float> %A, <4 x float> undef, <2 x i32> <i32 0, i32 1> %C = fadd <2 x float> %B, %B br label %BB BB: %D = fadd <2 x float> %C, %C %E = shufflevector <2 x float> %D, <2 x float> undef, <4 x i32> <i32 0, i32 1, i32 undef, i32 undef> ret <4 x float> %E } Now compiles into: _test2: ## @test2 ## BB#0: addps %xmm0, %xmm0 addps %xmm0, %xmm0 ret previously it compiled into: _test2: ## @test2 ## BB#0: addps %xmm0, %xmm0 pshufd $1, %xmm0, %xmm1 ## kill: XMM0<def> XMM0<kill> XMM0<def> insertps $0, %xmm0, %xmm0 insertps $16, %xmm1, %xmm0 addps %xmm0, %xmm0 ret This implements rdar://8230384 llvm-svn: 112101
* Remap metadata attached to instructions when remapping individualDan Gohman2010-08-253-17/+31
| | | | | | instructions, not when remapping modules. llvm-svn: 112091
* Revert this for now, PUNPCKLDQ dont operate on v4f32Bruno Cardoso Lopes2010-08-251-1/+1
| | | | llvm-svn: 112090
* X86: Fix misencode of RI64mi8. This fixes OpenSSL / x86_64-apple-darwin10 / ↵Daniel Dunbar2010-08-251-4/+3
| | | | | | clang -O3. llvm-svn: 112089
* Fix comment.Devang Patel2010-08-251-4/+3
| | | | llvm-svn: 112086
* Remove dead argument.Devang Patel2010-08-252-6/+4
| | | | llvm-svn: 112085
* Add some statistics for PEI register scavengingJim Grosbach2010-08-251-0/+7
| | | | llvm-svn: 112084
* Add a FIXME comment.Dan Gohman2010-08-251-0/+3
| | | | llvm-svn: 112083
* Fix the bitcode reader to clear out function-specific stateDan Gohman2010-08-251-0/+2
| | | | | | | from MDValueList between each function, now that the bitcode writer is reusing the index space for function-local metadata. llvm-svn: 112082
* Fix a bug found by inspection.Dan Gohman2010-08-251-1/+1
| | | | llvm-svn: 112081
* Add a comment.Dan Gohman2010-08-251-0/+1
| | | | llvm-svn: 112080
* MCELF: Use precomputed symbol indices, patch by Roman Divacky.Benjamin Kramer2010-08-251-11/+7
| | | | llvm-svn: 112079
* MC: Fix inconsistant naming in COFF object writer. Patch by Cameron Esfahani.Michael J. Spencer2010-08-251-3/+4
| | | | llvm-svn: 112076
* Don't override the var from the enclosing scope.Jim Grosbach2010-08-251-2/+2
| | | | | | | When doing copy/paste/modify, it's apparently rather important to remember the 'modify' bit... llvm-svn: 112075
* zap dead codeChris Lattner2010-08-251-34/+0
| | | | llvm-svn: 112073
* DIGlobalVariable can be used to encode debug info for globals that are ↵Devang Patel2010-08-251-2/+2
| | | | | | directly folded into a constant by FE. llvm-svn: 112072
* Remove dead recursive function. Yay for clang -Wunused-function.Benjamin Kramer2010-08-251-7/+0
| | | | llvm-svn: 112060
* Clear FunctionLocalMDs in purgeFunction along with the rest of theDan Gohman2010-08-251-1/+1
| | | | | | function-specific state. llvm-svn: 112058
* Fix whitespace.Dan Gohman2010-08-251-1/+1
| | | | llvm-svn: 112056
* Eliminate an unnecessary cast.Dan Gohman2010-08-251-1/+1
| | | | llvm-svn: 112055
* ARM/Thumb2: Fix a misselect in getARMCmp, when attempting to adjust a signedDaniel Dunbar2010-08-251-4/+4
| | | | | | | | | comparison that would overflow. - The other under/overflow cases can't actually happen because the immediates which would trigger them are legal (so we don't enter this code), but adjusted the style to make it clear the transform is always valid. llvm-svn: 112053
* Do type checks before we bother to do everything else.Eric Christopher2010-08-251-8/+9
| | | | llvm-svn: 112039
* Fix nasty mingw32 bug, which e.g. prevented llvm-gcc bootstrap there.Anton Korobeynikov2010-08-253-6/+10
| | | | | | | | Mark _alloca call as clobberring EFLAGS, otherwise some DCE might remove other flags-clobberring stuff (e.g. cmp instructions) occuring after _alloca call. llvm-svn: 112034
* Reorganize load mechanisms. Handle types in a little less fixed way.Eric Christopher2010-08-251-19/+45
| | | | | | Fix some todos. No functional change. llvm-svn: 112031
* PUNPCKLDQ should also be used for v4f32Bruno Cardoso Lopes2010-08-251-1/+1
| | | | llvm-svn: 112020
* teach lowering to get target specific nodes for pshufd, emulating the same ↵Bruno Cardoso Lopes2010-08-251-5/+51
| | | | | | isel behavior for now, so we can pass all vector shuffle tests llvm-svn: 112017
* In the default address space, any GEP off of null results in a trap value if ↵Owen Anderson2010-08-251-4/+5
| | | | | | | | | you try to load it. Thus, any load in the default address space that completes implies that the base value that it GEP'd from was not null. llvm-svn: 112015
OpenPOWER on IntegriCloud