summaryrefslogtreecommitdiffstats
path: root/llvm/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* Move REG_SEQUENCE removal to 2addr pass.Evan Cheng2010-05-053-63/+68
| | | | llvm-svn: 103109
* Implement rdar://7415680 - Twine integer support lacks greatnessChris Lattner2010-05-051-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Microoptimize Twine's with unsigned and int to not pin their value to the stack. This saves stack space in common cases and allows mem2reg in the caller. A simple example is: void foo(const Twine &); void bar(int x) { foo("xyz: " + Twine(x)); } Before: __Z3bari: subq $40, %rsp movl %edi, 36(%rsp) leaq L_.str3(%rip), %rax leaq 36(%rsp), %rcx leaq 8(%rsp), %rdi movq %rax, 8(%rsp) movq %rcx, 16(%rsp) movb $3, 24(%rsp) movb $7, 25(%rsp) callq __Z3fooRKN4llvm5TwineE addq $40, %rsp ret After: __Z3bari: subq $24, %rsp leaq L_.str3(%rip), %rax movq %rax, (%rsp) movslq %edi, %rax movq %rax, 8(%rsp) movb $3, 16(%rsp) movb $7, 17(%rsp) leaq (%rsp), %rdi callq __Z3fooRKN4llvm5TwineE addq $24, %rsp ret It saves 16 bytes of stack and one instruction in this case. llvm-svn: 103107
* Model CONCAT_VECTORS of two 64-bit values as a REG_SEQUENCE.Evan Cheng2010-05-053-4/+38
| | | | llvm-svn: 103104
* Trim include.Evan Cheng2010-05-051-1/+0
| | | | llvm-svn: 103103
* Teach liveintervalanalysis about virtual registers which are defined by ↵Evan Cheng2010-05-051-14/+37
| | | | | | | | | | reg_sequence instructions that are formed by registers defined by distinct instructions. e.g. 80 %reg1041:6<def> = VSHRNv4i16 %reg1034<kill>, 12, pred:14, pred:%reg0 . . . 120 %reg1041:5<def> = VSHRNv4i16 %reg1039<kill>, 12, pred:14, pred:%reg0 llvm-svn: 103102
* MC: Rename MCSymbol::{g,s}etValue -> MCSymbol::{g,s}etVariableValue.Daniel Dunbar2010-05-054-6/+6
| | | | llvm-svn: 103095
* MC/Mach-O/x86_64: Relocations in debug sections should use local relocationsDaniel Dunbar2010-05-051-0/+11
| | | | | | | when possible. - <rdar://problem/7934873> llvm-svn: 103092
* Try again if write(2) reports an recoverable error.Benjamin Kramer2010-05-051-1/+6
| | | | | | | This should fix mysteriously crashing boost regression tests when stderr is managed by bjam (PR7043). llvm-svn: 103085
* Revert 102941, we're going to do this via attr and can justEric Christopher2010-05-051-8/+1
| | | | | | hack the code to turn it off when debugging. llvm-svn: 103083
* Combine the implementations of the core part of the SSAUpdater andBob Wilson2010-05-042-866/+211
| | | | | | MachineSSAUpdater to avoid duplicating all the code. llvm-svn: 103060
* Update comment.Eric Christopher2010-05-041-1/+1
| | | | llvm-svn: 103057
* With -neon-reg-sequence, models forming a Q register from a pair of ↵Evan Cheng2010-05-041-2/+11
| | | | | | consecutive D registers as a REG_SEQUENCE. llvm-svn: 103047
* Do not pre-allocate for registers which form a REG_SEQUENCE.Evan Cheng2010-05-041-0/+28
| | | | llvm-svn: 103041
* Teach PHI elimination to remove REG_SEQUENCE instructions and update ↵Evan Cheng2010-05-043-0/+86
| | | | | | | | | | | | | references of the source operands with references of the destination with subreg indices. e.g. %reg1029<def>, %reg1030<def> = VLD1q16 %reg1024<kill>, ... %reg1031<def> = REG_SEQUENCE %reg1029<kill>, 5, %reg1030<kill>, 6 => %reg1031:5<def>, %reg1031:6<def> = VLD1q16 %reg1024<kill>, ... PHI elimination now does more than phi elimination. It is really a de-SSA pass. llvm-svn: 103039
* Defer adding critical edges to the "toSplit" list until after checking forBob Wilson2010-05-041-4/+5
| | | | | | | | indirect branches in all the predecessors. This avoids unnecessarily splitting edges in cases where load PRE is not possible anyway. Thanks to Jakub Staszak for pointing this out. llvm-svn: 103034
* "on the rare occasion the SPU BE produces illegal assembly - it tries to ↵Chris Lattner2010-05-041-2/+10
| | | | | | | | emit an add instruction of the form 'a reg, reg, imm'." Patch by Kalle Raiskila! llvm-svn: 103021
* MC/X86: Chris pointed that 'as' isn't consistent in accepting the long form ofDaniel Dunbar2010-05-041-5/+0
| | | | | | | | | | | | | | | instructions which have no direct register usage. Darwin 'as' accepts: add $0, (%rax) but rejects mov $0, (%rax) for example. Given that, only accept suffix matches which match exactly one form. We still need to emit nice diagnostics for failures... llvm-svn: 103015
* Rename variables for consistency.Evan Cheng2010-05-041-10/+11
| | | | llvm-svn: 103013
* MC/X86: Add "support" for matching ATT style mnemonic prefixes.Daniel Dunbar2010-05-042-4/+66
| | | | | | | | | | | | | | | | | - The idea is that when a match fails, we just try to match each of +'b', +'w', +'l'. If exactly one matches, we assume this is a mnemonic prefix and accept it. If all match, we assume it is width generic, and take the 'l' form. - This would be a horrible hack, if it weren't so simple. Therefore it is an elegant solution! Chris gets the credit for this particular elegant solution. :) - Next step to making this more robust is to have the X86 matcher generate the mnemonic prefix information. Ideally we would also compute up-front exactly which mnemonic to attempt to match, but this may require more custom code in the matcher than is really worth it. llvm-svn: 103012
* Fix a problem exposed by my previous commit and noticed by a release-assertsDuncan Sands2010-05-041-11/+3
| | | | | | | | | buildbot: the debugging and non-debugging versions of getFunction were not functionally equivalent: the non-debugging version wrongly assumed that if a metadata operand was not metadata, then it had a non-null containing function. This is not true, since the operand might be a global value, constant etc. llvm-svn: 103008
* Fix a variant of PR6112 found by thinking about it: when doingDuncan Sands2010-05-041-7/+21
| | | | | | | | | | RAUW of a global variable with a local variable in function F, if function local metadata M in function G was using the global then M would become function-local to both F and G, which is not allowed. See the testcase for an example. Fixed by detecting this situation and zapping the metadata operand when it occurs. llvm-svn: 103007
* fix operand indexes when outputting InvokeInstsGabor Greif2010-05-041-6/+7
| | | | llvm-svn: 103003
* Set DW_AT_APPLE_omit_frame_ptr in endFunction() where MachineFunction is ↵Devang Patel2010-05-041-4/+6
| | | | | | available all the time. llvm-svn: 103001
* Use the SCEVAddRecExpr::getPostIncExpr utility function insteadDan Gohman2010-05-041-4/+2
| | | | | | of doing the same thing manually. llvm-svn: 102997
* Fix a copy+pasto.Dan Gohman2010-05-041-2/+2
| | | | llvm-svn: 102996
* Do not ignore debug loc attached with llvm.dbg.declare while collecting ↵Devang Patel2010-05-041-3/+1
| | | | | | debug info used by a module. llvm-svn: 102995
* Instruction selection optimizations may have moved the def of a function ↵Evan Cheng2010-05-041-1/+2
| | | | | | argument out of the entry block. rdar://7937489 llvm-svn: 102993
* Fix to r102952. The MOV64toSDrm record in X86Instr64bit.td needed the opcodeKevin Enderby2010-05-041-1/+1
| | | | | | changed to 0x7E from 0x6E as well as the previous change of RPDI to S3SI. llvm-svn: 102991
* llvm-mc: Fix case were we would skip a line in the .s file after an instructionDaniel Dunbar2010-05-042-27/+28
| | | | | | | | match failure. Also, fixes a few memory leak FIXMEs. llvm-svn: 102986
* Teach scheduler about REG_SEQUENCE.Evan Cheng2010-05-042-2/+44
| | | | llvm-svn: 102984
* Re-enable isel kill flags, now that the local allocator is ignoring them.Dan Gohman2010-05-041-4/+0
| | | | llvm-svn: 102981
* rdar://7937137 - dbg values not being handled in thumb1 version ofJim Grosbach2010-05-041-0/+7
| | | | | | eliminateFrameIndex(), leading to llvm_unreachable() assertion failure. llvm-svn: 102980
* Remove preexisting kill flags in RegAllocLocal, just like LiveVariables does.Jakob Stoklund Olesen2010-05-031-1/+4
| | | | | | | This should make it possible to start producing kill flags in isel without breaking stuff. llvm-svn: 102976
* Factor out FastISel's code for materializing constants and other valuesDan Gohman2010-05-031-1/+10
| | | | | | | in registers into a separate function to de-couple it from the top-down-specific logic in getRegForValue. llvm-svn: 102975
* Implement builtin_return_address(x) and builtin_frame_address(x) Dale Johannesen2010-05-031-23/+34
| | | | | | on PPC for x!=0. 7624113. llvm-svn: 102972
* Remove the API compatibility layer which converted add, sub, and mulDan Gohman2010-05-033-34/+27
| | | | | | | | to fadd, fsub, and fmul, when used with a floating-point type. LLVM has supported the new instructions since 2.6, so it's time to get on board. llvm-svn: 102971
* Check that subregisters don't have independent values in ↵Jakob Stoklund Olesen2010-05-031-3/+14
| | | | | | | | RemoveCopyByCommutingDef(). This fixes PR6941. llvm-svn: 102970
* Reword a comment slightly.Eric Christopher2010-05-031-1/+1
| | | | llvm-svn: 102966
* Use getConstant instead of getIntegerSCEV. The two are basically theDan Gohman2010-05-034-44/+43
| | | | | | same, now that getConstant has overloads consistent with ConstantInt::get. llvm-svn: 102965
* Print basic block numbers in live interval debug output. Since the rest of theBob Wilson2010-05-031-1/+2
| | | | | | | | debug output is showing machine instructions, the IR-level basic block names aren't very meaningful, and because multiple machine basic blocks may be derived from one IR-level BB, they're also not unique. llvm-svn: 102960
* Fix function prototype mismatch in LLVMUnionType(). Fixes PR7019.Nick Lewycky2010-05-031-2/+1
| | | | llvm-svn: 102959
* Changed llvm-mc to use the same suffixes with floating point compareKevin Enderby2010-05-031-6/+6
| | | | | | | instructions as the Mac OS X darwin assembler. Some of which like 'fcoml' assembled to different opcodes. While some of the suffixes were just different. llvm-svn: 102958
* Fixed the encoding of two of the X86 movq instuctions. The Move quadword fromKevin Enderby2010-05-032-2/+2
| | | | | | | mm to mm/m64 and the Move quadword from xmm2/mem64 to xmm1 had the incorrect encodings. llvm-svn: 102952
* Fixed the encoding of the x86 push instructions. Using a 32-bit immediate valueKevin Enderby2010-05-031-4/+4
| | | | | | | | | | caused the a pushl instruction to be incorrectly encoding using only two bytes of immediate, causing the following 2 instruction bytes to be part of the 32-bit immediate value. Also fixed the one byte form of push to be used when the immediate would fit in a signed extended byte. Lastly changed the names to not include the 32 of PUSH32 since they actually push the size of the stack pointer. llvm-svn: 102951
* Silence warnings about -1 being converted to an unsigned value.Dan Gohman2010-05-031-6/+6
| | | | | | | | Also, pass true for isSigned even when creating constants for unsigned comparisons, because the point is to create an all-ones constant, rather than UINT64_MAX, even for integers wider than 64 bits. llvm-svn: 102946
* Add an option, defaulting to off, to disable the sse domain crossing opts.Eric Christopher2010-05-031-1/+8
| | | | llvm-svn: 102941
* Check for side effects before splitting loop.Devang Patel2010-05-031-0/+19
| | | | | | Patch by Jakub Staszak! llvm-svn: 102928
* Use isTrueWhenEqual and isFalseWhenEqual instead of assuming thatDan Gohman2010-05-031-2/+2
| | | | | | | | SimplifyICmpOperands will simplify such cases to EQ or NE. This makes the correcntess of the code independent on SimplifyICmpOperands doing certain simplifications. llvm-svn: 102927
* In ScalarEvolution::print, don't bother printing out the SCEVs forDan Gohman2010-05-031-1/+1
| | | | | | | comparison instructions, since they aren't interesting, despite having integer result types. llvm-svn: 102925
* In SimplifyICmpOperands, avoid needlessly swapping the operands in theDan Gohman2010-05-031-3/+6
| | | | | | case where both are addrecs in unrelated loops. llvm-svn: 102924
OpenPOWER on IntegriCloud