summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
Commit message (Collapse)AuthorAgeFilesLines
* Misc. code cleanups.Dan Gohman2011-05-171-33/+34
| | | | llvm-svn: 131495
* Revert 131467 due to buildbot complaint.Stuart Hastings2011-05-171-6/+2
| | | | llvm-svn: 131469
* Fix an obscure issue in X86_64 parameter passing: if a tiny byval isStuart Hastings2011-05-171-2/+6
| | | | | | | passed as the fifth parameter, insure it's passed correctly (in R9). rdar://problem/6920088 llvm-svn: 131467
* Tweak cross-class coalescing to be more aggressive when the target class is ↵Jakob Stoklund Olesen2011-05-171-3/+9
| | | | | | | | | | | | | small. The greedy register allocator has live range splitting and register class inflation, so it can actually fully undo this join, including restoring the original register classes. We still don't want to do this for long live ranges, mostly because of the high register pressure of there are many constrained live ranges overlapping. llvm-svn: 131466
* Teach LiveInterval::isZeroLength about null SlotIndexes.Jakob Stoklund Olesen2011-05-161-1/+1
| | | | | | | | | | | | When instructions are deleted, they leave tombstone SlotIndex entries. The isZeroLength method should ignore these null indexes. This causes RABasic to sometimes spill a callee-saved register in the abi-isel.ll test, so don't run that test with -regalloc=basic. Prioritizing register allocation according to spill weight can cause more registers to be used. llvm-svn: 131436
* Delete unused variables.Dan Gohman2011-05-162-8/+6
| | | | llvm-svn: 131430
* Trim #includes.Dan Gohman2011-05-161-7/+0
| | | | llvm-svn: 131429
* Fix whitespace and 80-column violations.Dan Gohman2011-05-161-10/+10
| | | | llvm-svn: 131428
* Track how many insns fast-isel successfully selects as well as how many itJim Grosbach2011-05-161-0/+2
| | | | | | misses. llvm-svn: 131426
* Preserve debug info for unused zero extended boolean argument.Devang Patel2011-05-161-6/+27
| | | | | | Radar 9422775. llvm-svn: 131422
* Make fast-isel work correctly s/uadd.with.overflow intrinsics.Eli Friedman2011-05-161-7/+7
| | | | llvm-svn: 131420
* Fix silly typo.Eli Friedman2011-05-161-1/+1
| | | | llvm-svn: 131419
* Basic fast-isel of extractvalue. Not too helpful on its own, given the IR ↵Eli Friedman2011-05-161-0/+42
| | | | | | clang generates for cases like this, but it should become more useful soon. llvm-svn: 131417
* Don't do tail calls in a function that call setjmp. The stack might beRafael Espindola2011-05-161-33/+1
| | | | | | corrupted when setjmp returns again. llvm-svn: 131399
* Fix a FIXME by moving the fast-isel implementation of the objectsize ↵Eli Friedman2011-05-141-0/+10
| | | | | | intrinsic from the x86 code to the generic code. llvm-svn: 131332
* Make codegen able to handle values of empty types. This is one wayRafael Espindola2011-05-132-6/+33
| | | | | | to fix PR9900. I will keep it open until sable is able to comment on it. llvm-svn: 131294
* Since I can't reproduce the failures from 131261, re-trying with aStuart Hastings2011-05-131-2/+6
| | | | | | simplified version. <rdar://problem/9298790> llvm-svn: 131274
* Revert 131266 and 131261 due to buildbot complaints.Stuart Hastings2011-05-131-9/+2
| | | | | | rdar://problem/9298790 llvm-svn: 131269
* Non-fast-isel followup to 129634; correctly handle branches controlledStuart Hastings2011-05-121-2/+9
| | | | | | | | | | | | | by non-CMP expressions. The executable test case (129821) would test this as well, if we had an "-O0 -disable-arm-fast-isel" LLVM-GCC tester. Alas, the ARM assembly would be very difficult to check with FileCheck. The thumb2-cbnz.ll test is affected; it generates larger code (tst.w vs. cmp #0), but I believe the new version is correct. rdar://problem/9298790 llvm-svn: 131261
* Update comment.Evan Cheng2011-05-121-2/+0
| | | | llvm-svn: 131258
* Doug convinced me that DW_AT_APPLE_objc_complete_type is more appropriate name.Devang Patel2011-05-121-2/+2
| | | | | | s/DW_AT_APPLE_objc_class_extension/DW_AT_APPLE_objc_complete_type/g llvm-svn: 131244
* Re-enable branchfolding common code hoisting optimization. Fixed a liveness ↵Evan Cheng2011-05-121-13/+38
| | | | | | test bug and also taught it to update liveins. llvm-svn: 131241
* Let Objective-C front-end identify class extension, in dwarf output, using ↵Devang Patel2011-05-121-0/+4
| | | | | | an attribute DW_AT_APPLE_objc_class_extension. llvm-svn: 131238
* Temporarily disable the transformation. It's breaking 186.crafty in some ↵Evan Cheng2011-05-121-0/+4
| | | | | | configuration. llvm-svn: 131235
* Re-commit 131172 with fix. MachineInstr identity checks should check deadEvan Cheng2011-05-124-17/+293
| | | | | | | | | markers. In some cases a register def is dead on one path, but not on another. This is passing Clang self-hosting. llvm-svn: 131214
* Identify end of prologue (and beginning of function body) using ↵Devang Patel2011-05-112-44/+40
| | | | | | DW_LNS_set_prologue_end line table opcode. llvm-svn: 131194
* Avoid hoisting spills when looking at a copy from another register that is alsoJakob Stoklund Olesen2011-05-111-7/+16
| | | | | | | | | | | | | about to be spilled. This can only happen when two extra snippet registers are included in the spill, and there is a copy between them. Hoisting the spill creates problems because the hoist will mark the copy for later dead code elimination, and spilling the second register will turn the copy into a spill. <rdar://problem/9420853> llvm-svn: 131192
* Fixes a bug in the DAGCombiner. LoadSDNodes have two values (data, chain).Nadav Rotem2011-05-111-1/+1
| | | | | | | | If there is a store after the load node, then there is a chain, which means that there is another user. Thus, asking hasOneUser would fail. Instead we ask hasNUsesOfValue on the 'data' value. llvm-svn: 131183
* Revert 131172 as it is causing clang to miscompile itself. I will tryRafael Espindola2011-05-113-268/+10
| | | | | | to provide a reduced testcase. llvm-svn: 131176
* Give the 'eh.sjlj.dispatchsetup' intrinsic call the value coming from the setjmpBill Wendling2011-05-112-2/+2
| | | | | | | | intrinsic call. This prevents it from being reordered so that it appears *before* the setjmp intrinsic (thus making it completely useless). <rdar://problem/9409683> llvm-svn: 131174
* Add a late optimization to BranchFolding that hoist common instruction sequencesEvan Cheng2011-05-113-10/+268
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | at the start of basic blocks to their common predecessor. It's actually quite common (e.g. about 50 times in JM/lencod) and has shown to be a nice code size benefit. e.g. pushq %rax testl %edi, %edi jne LBB0_2 ## BB#1: xorb %al, %al popq %rdx ret LBB0_2: xorb %al, %al callq _foo popq %rdx ret => pushq %rax xorb %al, %al testl %edi, %edi je LBB0_2 ## BB#1: callq _foo LBB0_2: popq %rdx ret rdar://9145558 llvm-svn: 131172
* Initialize moveTypeModule.Rafael Espindola2011-05-101-2/+2
| | | | llvm-svn: 131157
* Disable my little CopyToReg argument hack with fast-isel. ↵Eli Friedman2011-05-101-2/+3
| | | | | | rdar://problem/9413587 . llvm-svn: 131156
* Correctly walk through nested and adjacent CALLSEQ_START nodes. NoStuart Hastings2011-05-101-1/+2
| | | | | | | test case; I've only seen this on a release branch, and I can't get it to reproduce on trunk. rdar://problem/7662569 llvm-svn: 131152
* Produce a __debug_frame section on darwin ARM when appropriate.Rafael Espindola2011-05-104-73/+6
| | | | llvm-svn: 131151
* Rename DwarfRequiresRelocationForStmtList toRafael Espindola2011-05-101-1/+1
| | | | | | DwarfRequiresRelocationForSectionOffset as this is not specific to StmtList. llvm-svn: 131148
* Use .cfi_sections to put the unwind info in .debug_frame when possible. WithRafael Espindola2011-05-103-9/+21
| | | | | | | | | this clang will use .debug_frame in, for example, clang -g -c -m32 test.c This matches gcc's behaviour. It looks like .debug_frame is a bit bigger than .eh_frame, but has the big advantage of not being allocated. llvm-svn: 131140
* Fix PR9883. Make sure all caches are invalidated when a live range is repaired.Jakob Stoklund Olesen2011-05-104-4/+8
| | | | | | | | The previous invalidation missed the alias interference caches. Also add a stats counter for the number of repaired ranges. llvm-svn: 131133
* Do not ignore InlinedAt while walking up scope chain to find subprogram node. Devang Patel2011-05-091-1/+8
| | | | llvm-svn: 131106
* Look through struct wrapped types for inline asm statments.Eric Christopher2011-05-092-0/+12
| | | | | | Patch by Evan Cheng. llvm-svn: 131093
* Indent properly, no functionality change.Duncan Sands2011-05-091-12/+12
| | | | llvm-svn: 131082
* Remove an assertion to fix PR9872.Jakob Stoklund Olesen2011-05-082-1/+6
| | | | | | | | | | | | | | | | | | | | It can happen that a live debug variable is the last use of a sub-register, and the register allocator will pick a larger register class for the virtual register. If the allocated register doesn't support the sub-register index, just use %noreg for the debug variables instead of asserting. In PR9872, a debug variable ends up in the sub_8bit_hi part of a GR32_ABCD register. The register is split and one part is inflated to GR32 and assigned %ESI because there are no more normal uses of sub_8bit_hi. Since %ESI doesn't have that sub-register, substPhysReg asserted. Now it will simply insert a %noreg instead, and the debug variable will be marked unavailable in that range. We don't currently have a way of saying: !"value" is in bits 8-15 of %ESI, I don't know if DWARF even supports that. llvm-svn: 131073
* Emit a proper error message when register allocators run out of registers.Jakob Stoklund Olesen2011-05-062-1/+24
| | | | | | | This can't be just an assertion, users can always write impossible inline assembly. Such an assembly statement should be included in the error message. llvm-svn: 131024
* Added an assertion, and updated a comment.Andrew Trick2011-05-061-5/+8
| | | | llvm-svn: 131022
* 80 col violations.Evan Cheng2011-05-061-3/+7
| | | | llvm-svn: 131015
* Make the logic for determining function alignment more explicit. No ↵Eli Friedman2011-05-062-1/+7
| | | | | | functionality change. llvm-svn: 131012
* Use array_lengthof. No functional change.Eli Friedman2011-05-061-3/+1
| | | | llvm-svn: 131008
* Iterate backwards over debug locations when splitting them so they can be ↵Jakob Stoklund Olesen2011-05-061-1/+4
| | | | | | | | safely erased. This should unbreak dragonegg-i386-linux and build-self-4-mingw32. llvm-svn: 131007
* Typo: Reviewed by Alistair.Andrew Trick2011-05-061-1/+1
| | | | llvm-svn: 131001
* Update LiveDebugVariables after live range splitting.Jakob Stoklund Olesen2011-05-064-3/+165
| | | | | | | | | | | | After a virtual register is split, update any debug user variables that resided in the old register. This ensures that the LiveDebugVariables are still correct after register allocation. This may create DBG_VALUE instructions that place a user variable in a register in parts of the function and in a stack slot in other parts. DwarfDebug currently doesn't support that. llvm-svn: 130998
OpenPOWER on IntegriCloud