summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
Commit message (Collapse)AuthorAgeFilesLines
...
* 80-column and trailing whitespace cleanup.Jim Grosbach2010-07-021-28/+33
| | | | llvm-svn: 107490
* grammar tweaksJim Grosbach2010-07-021-3/+3
| | | | llvm-svn: 107489
* Rename CreateReg to CreateRegs, and MakeReg to CreateReg.Dan Gohman2010-07-025-14/+15
| | | | llvm-svn: 107451
* Make the "linker_private" linkage type emit a non-weak symbol to the file. ItBill Wendling2010-07-011-1/+1
| | | | | | will still be stripped by the linker when it generates the final image. llvm-svn: 107440
* Implement the "linker_private_weak" linkage type. This will be used forBill Wendling2010-07-011-0/+1
| | | | | | | | | | | | | | | | | | | | | | | Objective-C metadata types which should be marked as "weak", but which the linker will remove upon final linkage. However, this linkage isn't specific to Objective-C. For example, the "objc_msgSend_fixup_alloc" symbol is defined like this: .globl l_objc_msgSend_fixup_alloc .weak_definition l_objc_msgSend_fixup_alloc .section __DATA, __objc_msgrefs, coalesced .align 3 l_objc_msgSend_fixup_alloc: .quad _objc_msgSend_fixup .quad L_OBJC_METH_VAR_NAME_1 This is different from the "linker_private" linkage type, because it can't have the metadata defined with ".weak_definition". Currently only supported on Darwin platforms. llvm-svn: 107433
* Do not require line number entry for undefined local variable.Devang Patel2010-07-011-2/+4
| | | | | | This is a regression caused by r106792 and caught by gdb testsuite. llvm-svn: 107430
* MC: Pass the target instance to the AsmParser constructor.Daniel Dunbar2010-07-011-1/+1
| | | | llvm-svn: 107426
* MC: Move COFF enumeration constants to llvm/Support/COFF.h, patch by MichaelDaniel Dunbar2010-07-011-55/+55
| | | | | | Spencer! llvm-svn: 107418
* Temporarily disable on-demand fast-isel.Dan Gohman2010-07-012-8/+14
| | | | llvm-svn: 107393
* Use FuncInfo's isExportedInst accessor method instead ofDan Gohman2010-07-011-1/+1
| | | | | | doing the work manually. llvm-svn: 107384
* Rename CreateRegForValue to CreateReg, and change its argumentDan Gohman2010-07-015-11/+11
| | | | | | | from a Value to a Type, because it doesn't actually care about the Value. llvm-svn: 107383
* Fast isel no longer needs DeadMachineInstrElim to clean up after it.Dan Gohman2010-07-011-12/+8
| | | | llvm-svn: 107381
* Teach fast-isel to avoid loading a value from memory when it's alreadyDan Gohman2010-07-011-0/+24
| | | | | | | available in a register. This is pretty primitive, but it reduces the number of instructions in common testcases by 4%. llvm-svn: 107380
* Enable on-demand fast-isel.Dan Gohman2010-07-012-1/+10
| | | | llvm-svn: 107377
* Reapply r106422, splitting the code for materializing a value out ofDan Gohman2010-07-012-11/+55
| | | | | | | SelectionDAGBuilder::getValue into a helper function, with fixes to use DenseMaps safely. llvm-svn: 107371
* Don't use operator[] here, because it's not desirable to insert a defaultDan Gohman2010-07-011-2/+5
| | | | | | value if the search fails. llvm-svn: 107368
* Trailing whitespace.Mikhail Glushenkov2010-07-011-3/+3
| | | | llvm-svn: 107360
* Add memory operand folding support to InlineSpiller.Jakob Stoklund Olesen2010-07-011-0/+37
| | | | llvm-svn: 107355
* Add support for rematerialization to InlineSpiller.Jakob Stoklund Olesen2010-06-302-33/+130
| | | | llvm-svn: 107351
* Use the catch-all selectors we already found when converting them to use theBill Wendling2010-06-301-16/+23
| | | | | | | correct catch-all value. This saves having to iterate through all of the selectors in the program again. llvm-svn: 107345
* Handle array and vector typed parameters in sjljehprepare like we doJim Grosbach2010-06-301-4/+4
| | | | | | structs. rdar://8145832 llvm-svn: 107332
* grammar tweak in comment.Jim Grosbach2010-06-301-1/+1
| | | | llvm-svn: 107321
* Some fool committed without testing (or even building) first.Jakob Stoklund Olesen2010-06-301-2/+2
| | | | llvm-svn: 107307
* Remember to track spill slot uses in VirtRegMap when inserting loads and stores.Jakob Stoklund Olesen2010-06-302-0/+4
| | | | | | | | | LocalRewriter::runOnMachineFunction uses this information to mark dead spill slots. This means that InlineSpiller now also works for functions that spill. llvm-svn: 107302
* Remove an unused variable. The call to getRoot has side-effects, soDuncan Sands2010-06-301-1/+0
| | | | | | this could break something (but doesn't seem to). llvm-svn: 107295
* use ArgOperand APIGabor Greif2010-06-301-10/+10
| | | | llvm-svn: 107282
* use ArgOperand APIGabor Greif2010-06-301-6/+6
| | | | llvm-svn: 107279
* use CallSite::arg_end instead of CallInst::op_endGabor Greif2010-06-301-1/+1
| | | | llvm-svn: 107276
* Remove trailing whitespace, no functionality changes.John Mosby2010-06-301-19/+18
| | | | llvm-svn: 107244
* Do not construct DIE for already processed MDNode.Devang Patel2010-06-301-1/+2
| | | | llvm-svn: 107237
* Use skipInstruction() as a simpler way of iterating over instructions using ↵Jakob Stoklund Olesen2010-06-301-10/+2
| | | | | | SrcReg llvm-svn: 107234
* Use clEnumValN macro to work around keyword clashJakob Stoklund Olesen2010-06-301-1/+1
| | | | llvm-svn: 107233
* Add variables into a scope before constructing scope DIE otherwise variables ↵Devang Patel2010-06-301-2/+2
| | | | | | won't be included DIE tree. llvm-svn: 107228
* Begin implementation of an inline spiller.Jakob Stoklund Olesen2010-06-293-1/+147
| | | | | | | | | | | InlineSpiller inserts loads and spills immediately instead of deferring to VirtRegMap. This is possible now because SlotIndexes allows instructions to be inserted and renumbered. This is work in progress, and is mostly a copy of TrivialSpiller so far. It works very well for functions that don't require spilling. llvm-svn: 107227
* Revert r107205 and r107207.Bill Wendling2010-06-293-14/+11
| | | | llvm-svn: 107215
* Print InlinedAt location.Devang Patel2010-06-291-7/+21
| | | | llvm-svn: 107214
* Print InlinedAt location.Devang Patel2010-06-291-12/+23
| | | | llvm-svn: 107208
* Introducing the "linker_weak" linkage type. This will be used for Objective-CBill Wendling2010-06-293-11/+14
| | | | | | | | | | | | | | | | | | | metadata types which should be marked as "weak", but which the linker will remove upon final linkage. For example, the "objc_msgSend_fixup_alloc" symbol is defined like this: .globl l_objc_msgSend_fixup_alloc .weak_definition l_objc_msgSend_fixup_alloc .section __DATA, __objc_msgrefs, coalesced .align 3 l_objc_msgSend_fixup_alloc: .quad _objc_msgSend_fixup .quad L_OBJC_METH_VAR_NAME_1 This is different from the "linker_private" linkage type, because it can't have the metadata defined with ".weak_definition". llvm-svn: 107205
* Do not hardcode DW_AT_stmt_list value.Devang Patel2010-06-292-7/+17
| | | | | | Inspired by Artur Pietrek. llvm-svn: 107202
* Fix the handling of partial redefines in the fast register allocator.Jakob Stoklund Olesen2010-06-291-17/+39
| | | | | | | | | | | A partial redefine needs to be treated like a tied operand, and the register must be reloaded while processing use operands. This fixes a bug where partially redefined registers were processed as normal defs with a reload added. The reload could clobber another use operand if it was a kill that allowed register reuse. llvm-svn: 107193
* Fix a register scavenger crash when dealing with undefined subregs.Bob Wilson2010-06-291-0/+18
| | | | | | | The LowerSubregs pass needs to preserve implicit def operands attached to EXTRACT_SUBREG instructions when it replaces those instructions with copies. llvm-svn: 107189
* It seems clear that this should return Changed.Duncan Sands2010-06-291-1/+1
| | | | llvm-svn: 107141
* Add a VT argument to getMinimalPhysRegClass and replace the copy related usesRafael Espindola2010-06-294-7/+7
| | | | | | | | | of getPhysicalRegisterRegClass with it. If we want to make a copy (or estimate its cost), it is better to use the smallest class as more efficient operations might be possible. llvm-svn: 107140
* getMachineBasicBlockAddress returns a uintptr_t - don't truncateDuncan Sands2010-06-291-1/+1
| | | | | | | to unsigned only to extend back to a pointer sized value on the next line. llvm-svn: 107139
* use ArgOperand APIsGabor Greif2010-06-291-3/+3
| | | | llvm-svn: 107132
* Remove initialized but otherwise unused variables.Duncan Sands2010-06-292-3/+0
| | | | llvm-svn: 107127
* When processing loops for scheduling latencies (used for live outs on loopJim Grosbach2010-06-291-1/+4
| | | | | | | back-edges), make sure not to include dbg_value instructions in the count. Closing in on the end of rdar://7797940 llvm-svn: 107119
* Reapply my if-conversion cleanup from svn r106939 with fixes.Bob Wilson2010-06-291-34/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are 2 changes relative to the previous version of the patch: 1) For the "simple" if-conversion case, there's no need to worry about RemoveExtraEdges not handling an unanalyzable branch. Predicated terminators are ignored in this context, so RemoveExtraEdges does the right thing. This might break someday if we ever treat indirect branches (BRIND) as predicable, but for now, I just removed this part of the patch, because in the case where we do not add an unconditional branch, we rely on keeping the fall-through edge to CvtBBI (which is empty after this transformation). The change relative to the previous patch is: @@ -1036,10 +1036,6 @@ IterIfcvt = false; } - // RemoveExtraEdges won't work if the block has an unanalyzable branch, - // which is typically the case for IfConvertSimple, so explicitly remove - // CvtBBI as a successor. - BBI.BB->removeSuccessor(CvtBBI->BB); RemoveExtraEdges(BBI); // Update block info. BB can be iteratively if-converted. 2) My patch exposed a bug in the code for merging the tail of a "diamond", which had previously never been exercised. The code was simply checking that the tail had a single predecessor, but there was a case in MultiSource/Benchmarks/VersaBench/dbms where that single predecessor was neither edge of the diamond. I added the following change to check for that: @@ -1276,7 +1276,18 @@ // tail, add a unconditional branch to it. if (TailBB) { BBInfo TailBBI = BBAnalysis[TailBB->getNumber()]; - if (TailBB->pred_size() == 1 && !TailBBI.HasFallThrough) { + bool CanMergeTail = !TailBBI.HasFallThrough; + // There may still be a fall-through edge from BBI1 or BBI2 to TailBB; + // check if there are any other predecessors besides those. + unsigned NumPreds = TailBB->pred_size(); + if (NumPreds > 1) + CanMergeTail = false; + else if (NumPreds == 1 && CanMergeTail) { + MachineBasicBlock::pred_iterator PI = TailBB->pred_begin(); + if (*PI != BBI1->BB && *PI != BBI2->BB) + CanMergeTail = false; + } + if (CanMergeTail) { MergeBlocks(BBI, TailBBI); TailBBI.IsDone = true; } else { With these fixes, I was able to run all the SingleSource and MultiSource tests successfully. llvm-svn: 107110
* Unlike other targets, ARM now uses BUILD_VECTORs post-legalization so theyBob Wilson2010-06-281-1/+2
| | | | | | | can't be changed arbitrarily by the DAGCombiner without checking if it is running after legalization. llvm-svn: 107097
* Use DW_FORM_addr for DW_AT_entry_pc.Devang Patel2010-06-282-1/+3
| | | | llvm-svn: 107085
OpenPOWER on IntegriCloud