summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
Commit message (Collapse)AuthorAgeFilesLines
* revert 88761 as it fails builds.Sanjiv Gupta2009-11-141-1/+1
| | | | llvm-svn: 88762
* Fix debug info crashes for PIC16.Sanjiv Gupta2009-11-141-1/+1
| | | | llvm-svn: 88761
* Added getSubRegIndex(A,B) that returns subreg index of A to B. Use it to ↵Evan Cheng2009-11-141-5/+2
| | | | | | replace broken code in VirtRegRewriter. llvm-svn: 88753
* - Change TargetInstrInfo::reMaterialize to pass in TargetRegisterInfo.Evan Cheng2009-11-145-8/+13
| | | | | | | | - If destination is a physical register and it has a subreg index, use the sub-register instead. This fixes PR5423. llvm-svn: 88745
* Fix PR5412: Fix an inverted check and another missing sub-register check.Evan Cheng2009-11-141-9/+30
| | | | llvm-svn: 88738
* Enable the tail call optimization when the caller returns undef.Dan Gohman2009-11-141-0/+4
| | | | llvm-svn: 88737
* Fix bug in -split-phi-edges.Jakob Stoklund Olesen2009-11-141-3/+14
| | | | | | | | | | When splitting an edge after a machine basic block with fall-through, we forgot to insert a jump instruction. Fix this by calling updateTerminator() on the fall-through block when relevant. Also be more precise in PHIElimination::isLiveIn. llvm-svn: 88728
* Update MachineDominator informationJakob Stoklund Olesen2009-11-141-6/+9
| | | | llvm-svn: 88727
* Added an API to the SlotIndexes pass to allow new instructions to be ↵Lang Hames2009-11-143-89/+31
| | | | | | | | inserted into the numbering. PreAllocSplitting is now using this API to insert code. llvm-svn: 88725
* Fix PR5411. Bug in UpdateKills. A reg def partially define its super-registers.Evan Cheng2009-11-131-0/+4
| | | | llvm-svn: 88719
* Fix PHIElimination optimization that uses MBB->getBasicBlock.Jakob Stoklund Olesen2009-11-132-34/+23
| | | | | | | | | | | The BasicBlock associated with a MachineBasicBlock does not necessarily correspond to the code in the MBB. Don't insert a new IR BasicBlock when splitting critical edges. We are not supposed to modify the IR during codegen, and we should be able to do just fine with a NULL BB. llvm-svn: 88707
* Add MachineFunction::verify() to call the machine code verifier directly.Jakob Stoklund Olesen2009-11-131-0/+4
| | | | llvm-svn: 88706
* Fix polarity of a CFG check in machine verifier.Jakob Stoklund Olesen2009-11-131-5/+14
| | | | llvm-svn: 88704
* Use .data() instead of .c_str() when nul-termination is not needed.Dan Gohman2009-11-131-1/+1
| | | | llvm-svn: 88703
* Move DebugInfo checks into EmitComments and remove them fromDavid Greene2009-11-131-15/+23
| | | | | | | | target-specific AsmPrinters. Not all comments need DebugInfo. Re-enable the line numbers comment test. llvm-svn: 88697
* When optimizing for size, don't tail-merge unless it's likely to be aDan Gohman2009-11-131-9/+12
| | | | | | | | | | code-size win, and not when it's only likely to be code-size neutral, such as when only a single instruction would be eliminated and a new branch would be required. This fixes rdar://7392894. llvm-svn: 88692
* Fix PR5410: LiveVariables lost subreg def:Evan Cheng2009-11-131-1/+7
| | | | | | | | | | | | | | D0<def,dead> = ... ... = S0<use, kill> S0<def> = ... ... D0<def> = The first D0 def is correctly marked dead, however, livevariables should have added an implicit def of S0 or we end up with a use without a def. llvm-svn: 88690
* Allow target to specify regclass for which antideps will only be broken ↵David Goodwin2009-11-133-32/+109
| | | | | | along the critical path. llvm-svn: 88682
* Don't let a noalias difference disrupt the tailcall optimization.Dan Gohman2009-11-131-3/+4
| | | | llvm-svn: 88672
* Ignore nameless variables.Devang Patel2009-11-131-1/+3
| | | | llvm-svn: 87069
* Adjust isConstantSplat to allow for big-endian targets.Dale Johannesen2009-11-131-4/+7
| | | | | | PPC is such a target; make it work. llvm-svn: 87060
* Simplify code a bitBill Wendling2009-11-121-4/+3
| | | | llvm-svn: 87040
* Refactor code that checks if it's a call to a "nounwind" function.Bill Wendling2009-11-122-31/+40
| | | | llvm-svn: 87036
* Do some cleanups suggested by Chris.David Greene2009-11-121-0/+4
| | | | llvm-svn: 87034
* Set the ReloadReuse AsmPrinter flag where appropriate.David Greene2009-11-121-0/+3
| | | | llvm-svn: 87030
* Fix -Asserts warning.Daniel Dunbar2009-11-121-2/+1
| | | | llvm-svn: 87024
* If there's more than one function operand to a call instruction, be conservativeBill Wendling2009-11-121-1/+12
| | | | | | | | | and don't assume that the call doesn't throw. It would be nice if there were a way to determine which is the callee and which is a parameter. In practice, the architecture we care about normally only have one operand for a call instruction (x86 and arm). llvm-svn: 87023
* Add a bool flag to StackObjects telling whether they reference spillDavid Greene2009-11-127-16/+18
| | | | | | | | | | | | | slots. The AsmPrinter will use this information to determine whether to print a spill/reload comment. Remove default argument values. It's too easy to pass a wrong argument value when multiple arguments have default values. Make everything explicit to trap bugs early. Update all targets to adhere to the new interfaces.. llvm-svn: 87022
* Add compare_lower and equals_lower methods to StringRef. Switch all users ofBenjamin Kramer2009-11-121-3/+2
| | | | | | StringsEqualNoCase (from StringExtras.h) to it. llvm-svn: 87020
* Make FixedStackPseudoSourceValue a first-class PseudoSourceValue byDavid Greene2009-11-121-23/+2
| | | | | | | | making it visible to clients and adding LLVM-style cast capability. This will be used by AsmPrinter to determine when to emit spill comments for an instruction. llvm-svn: 87019
* Rename registers to break output dependencies in addition to anti-dependencies.David Goodwin2009-11-124-10/+30
| | | | llvm-svn: 87015
* "Attach debug info with llvm instructions" mode was enabled a month ago. Now ↵Devang Patel2009-11-126-393/+14
| | | | | | make it permanent and remove old way of inserting intrinsics to encode debug info for line number and scopes. llvm-svn: 87014
* RegScavenger::enterBasicBlock should always reset register state.Evan Cheng2009-11-121-5/+2
| | | | llvm-svn: 86972
* Move the utility function UpdateTerminator() from CodePlacementOpt() intoJim Grosbach2009-11-122-61/+56
| | | | | | MachineBasicBlock so other passes can utilize it. llvm-svn: 86947
* Make the BranchFolderPass class local to BranchFolding.cpp.Dan Gohman2009-11-122-14/+15
| | | | llvm-svn: 86928
* Minor code cleanups.Dan Gohman2009-11-121-9/+9
| | | | llvm-svn: 86926
* Fixed an iteration condition in PreAllocSplitting. This should fix some ↵Lang Hames2009-11-121-1/+1
| | | | | | miscompilations casued by PreAllocSplitting. llvm-svn: 86919
* Tail merge at any size when there are two potentials blocks and oneDan Gohman2009-11-121-10/+34
| | | | | | can be made to fall through into the other. llvm-svn: 86909
* Don't mark a call as potentially throwing if the function it's calling has theBill Wendling2009-11-111-1/+21
| | | | | | "nounwind" attribute. llvm-svn: 86897
* Promote MergePotentialsElt and SameTailElt to be regular classesDan Gohman2009-11-112-58/+107
| | | | | | | instead of typedefs for std::pair. This simplifies the type of SameTails, which previously was std::vector<std::pair<std::vector<std::pair<unsigned, MachineBasicBlock *> >::iterator, MachineBasicBlock::iterator> llvm-svn: 86885
* x86 users can now return arbitrary sized structs. Structs too large to fit ↵Kenneth Uildriks2009-11-112-67/+211
| | | | | | in return registers will be returned through a hidden sret parameter introduced during SelectionDAG construction. llvm-svn: 86876
* Revert this line of 86871.Dan Gohman2009-11-111-1/+1
| | | | llvm-svn: 86875
* If doesSupportDebugInformation() is false then do not try to emit dwarf ↵Devang Patel2009-11-111-0/+3
| | | | | | debug info. llvm-svn: 86874
* Check in the changes to this file too.Dan Gohman2009-11-111-3/+9
| | | | llvm-svn: 86873
* Add support for tail duplication to BranchFolding, and extendDan Gohman2009-11-112-53/+296
| | | | | | | | | | | tail merging support to handle more cases. - Recognize several cases where tail merging is beneficial even when the tail size is smaller than the generic threshold. - Make use of MachineInstrDesc::isBarrier to help detect non-fallthrough blocks. - Check for and avoid disrupting fall-through edges in more cases. llvm-svn: 86871
* Fix liveness calculation when splitting critical edges during PHI elimination.Jakob Stoklund Olesen2009-11-113-52/+78
| | | | | | | | | | | | | | - Edges are split before any phis are eliminated, so the code is SSA. - Create a proper IR BasicBlock for the split edges. - LiveVariables::addNewBlock now has same syntax as MachineDominatorTree::addNewBlock. Algorithm calculates predecessor live-out set rather than successor live-in set. This feature still causes some miscompilations. llvm-svn: 86867
* Fix indentation level.Dan Gohman2009-11-111-8/+8
| | | | llvm-svn: 86856
* Whitespace cleanups.Dan Gohman2009-11-111-93/+92
| | | | llvm-svn: 86855
* Prefix MBB numbers with "BB#" in debug output to make it clear whatDan Gohman2009-11-111-3/+3
| | | | | | the numbers mean. llvm-svn: 86854
* Minor code simplification.Dan Gohman2009-11-111-9/+8
| | | | llvm-svn: 86853
OpenPOWER on IntegriCloud