summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
Commit message (Collapse)AuthorAgeFilesLines
* Revert r128961 because it didn't include a test and causes the verifier to failCameron Zwarich2011-05-191-5/+0
| | | | | | | | on CodeGen/X86/2007-05-07-InvokeSRet.ll. There is probably a bug here that was fixed by r128961, but since there is no test or reference to a source file I have to revert it. llvm-svn: 131618
* Revert commit 131534 since it seems to have broken several buildbots.Duncan Sands2011-05-183-4/+4
| | | | | | | | Original log entry: Refactor getActionType and getTypeToTransformTo ; place all of the 'decision' code in one place. llvm-svn: 131536
* Refactor getActionType and getTypeToTransformTo ; place all of the 'decision'Nadav Rotem2011-05-183-4/+4
| | | | | | code in one place. llvm-svn: 131534
* Eliminate dead dead code elimination code.Jakob Stoklund Olesen2011-05-182-292/+0
| | | | llvm-svn: 131524
* Also use shrinkToUses after AdjustCopiesBackFrom().Jakob Stoklund Olesen2011-05-181-1/+1
| | | | | | | The 'last use' may not be in the same basic block, and we still want a correct live range. llvm-svn: 131523
* Properly shrink live ranges after deleting dead copies. Clean up after all ↵Jakob Stoklund Olesen2011-05-181-24/+5
| | | | | | | | | | | | | joined copies. LiveInterval::shrinkToUses recomputes the live range from scratch instead of removing snippets. This should avoid the problem with dangling live ranges. Leave physreg identity copies alone. They can be created when joining a virtreg with a physreg. They don't affect register allocation, and they will be removed by the rewriter. llvm-svn: 131521
* Make fast-isel miss counting in -stats and -fast-isel-verbose take ↵Eli Friedman2011-05-171-3/+8
| | | | | | terminators into account; since there are many fewer isel misses with recent changes, misses caused by terminators are more significant. llvm-svn: 131502
* Misc. code cleanups.Dan Gohman2011-05-171-60/+59
| | | | llvm-svn: 131497
* 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
OpenPOWER on IntegriCloud