summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/PHIElimination.h
Commit message (Collapse)AuthorAgeFilesLines
* Remove the PHIElimination.h header, as it is no longer needed.Cameron Zwarich2010-12-051-74/+0
| | | | llvm-svn: 120959
* I forgot to actually remove the FindCopyInsertPoint() declaration fromCameron Zwarich2010-12-051-8/+0
| | | | | | PHIElimination.h. llvm-svn: 120953
* Remove the SplitCriticalEdge() method declaration from PHIElimination.h. At oneCameron Zwarich2010-12-051-6/+0
| | | | | | | time, this method existed, but now PHIElimination uses the method of the same name on MachineBasicBlock. llvm-svn: 120952
* Remove PHIElimination's private copy of SkipPHIsAndLabels.Cameron Zwarich2010-12-041-29/+0
| | | | llvm-svn: 120918
* Get rid of static constructors for pass registration. Instead, every pass ↵Owen Anderson2010-10-191-1/+3
| | | | | | | | | | | | | | | | | exposes an initializeMyPassFunction(), which must be called in the pass's constructor. This function uses static dependency declarations to recursively initialize the pass's dependencies. Clients that only create passes through the createFooPass() APIs will require no changes. Clients that want to use the CommandLine options for passes will need to manually call the appropriate initialization functions in PassInitialization.h before parsing commandline arguments. I have tested this with all standard configurations of clang and llvm-gcc on Darwin. It is possible that there are problems with the static dependencies that will only be visible with non-standard options. If you encounter any crash in pass registration/creation, please send the testcase to me directly. llvm-svn: 116820
* PHI elimination shouldn't require machineloopinfo since it's used at -O0. ↵Evan Cheng2010-08-171-2/+1
| | | | | | Move the requirement to LiveIntervalAnalysis instead. Note this does not change the number of times machineloopinfo is computed. llvm-svn: 111285
* Move the decision logic whether it's a good idea to split a critical edge to ↵Evan Cheng2010-08-171-2/+5
| | | | | | clients. Also fixed an erroneous check. An edge is only a back edge when the from and to blocks are in the same loop. llvm-svn: 111256
* Reapply r110396, with fixes to appease the Linux buildbot gods.Owen Anderson2010-08-061-1/+1
| | | | llvm-svn: 110460
* Revert r110396 to fix buildbots.Owen Anderson2010-08-061-1/+1
| | | | llvm-svn: 110410
* Don't use PassInfo* as a type identifier for passes. Instead, use the ↵Owen Anderson2010-08-051-1/+1
| | | | | | | | address of the static ID member as the sole unique type identifier. Clean up APIs related to this change. llvm-svn: 110396
* Move REG_SEQUENCE removal to 2addr pass.Evan Cheng2010-05-051-2/+0
| | | | llvm-svn: 103109
* Teach PHI elimination to remove REG_SEQUENCE instructions and update ↵Evan Cheng2010-05-041-0/+2
| | | | | | | | | | | | | 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
* Remove PHINodeTraits and use MachineInstrExpressionTrait instead.Evan Cheng2010-03-031-8/+2
| | | | llvm-svn: 97687
* Dead code eliminationJakob Stoklund Olesen2010-02-231-9/+0
| | | | llvm-svn: 96837
* Dead code elimination.Jakob Stoklund Olesen2010-02-171-34/+0
| | | | llvm-svn: 96496
* Handle DBG_VALUE mixed with labels when doing PHIDale Johannesen2010-02-161-1/+18
| | | | | | | elimination. Before a DBG_VALUE could affect codegen. The solution here is imperfect and not final. llvm-svn: 96318
* move target-independent opcodes out of TargetInstrInfoChris Lattner2010-02-091-4/+4
| | | | | | | | | into TargetOpcodes.h. #include the new TargetOpcodes.h into MachineInstr. Add new inline accessors (like isPHI()) to MachineInstr, and start using them throughout the codebase. llvm-svn: 95687
* Reuse lowered phi nodes.Jakob Stoklund Olesen2009-12-161-4/+13
| | | | | | | | | | | | | | Tail duplication produces lots of identical phi nodes in different basic blocks. Teach PHIElimination to reuse the join registers when lowering a phi node that is identical to an already lowered node. This saves virtual registers, and more importantly it avoids creating copies the the coalescer doesn't know how to eliminate. Teach LiveIntervalAnalysis about the phi joins with multiple uses. This patch significantly reduces code size produced by -pre-regalloc-taildup. llvm-svn: 91549
* Move PHIElimination::isLiveOut method to LiveVariables.Jakob Stoklund Olesen2009-12-011-6/+0
| | | | | | | | We want LiveVariables clients to use methods rather than accessing the getVarInfo data structure directly. That way it will be possible to change the LiveVariables representation. llvm-svn: 90240
* Be more clever about calculating live variables through new basic blocks.Jakob Stoklund Olesen2009-11-211-6/+0
| | | | | | | | | | | | When splitting a critical edge, the registers live through the edge are: - Used in a PHI instruction, or - Live out from the predecessor, and - Live in to the successor. This allows the coalescer to eliminate even more phi joins. llvm-svn: 89530
* Don't require LiveVariables for PHIElimination. Enable critical edge splittingJakob Stoklund Olesen2009-11-181-1/+2
| | | | | | | | | | | | when LiveVariables is available. The -split-phi-edges is now gone, and so is the hack to disable it when using the local register allocator. The PHIElimination pass no longer has LiveVariables as a prerequisite - that is what broke the local allocator. Instead we do critical edge splitting when possible - that is when LiveVariables is available. llvm-svn: 89213
* Fix PHIElimination optimization that uses MBB->getBasicBlock.Jakob Stoklund Olesen2009-11-131-4/+5
| | | | | | | | | | | 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
* Fix liveness calculation when splitting critical edges during PHI elimination.Jakob Stoklund Olesen2009-11-111-1/+7
| | | | | | | | | | | | | | - 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
* Teach PHIElimination to split critical edges when -split-phi-edges is enabled.Jakob Stoklund Olesen2009-11-101-0/+9
| | | | | | | | Critical edges leading to a PHI node are split when the PHI source variable is live out from the predecessor block. This help the coalescer eliminate more PHI joins. llvm-svn: 86725
* Refactoring: Extract method PHIElimination::isLiveOut().Jakob Stoklund Olesen2009-11-101-0/+6
| | | | | | | Clean up some whitespace. No functional changes. llvm-svn: 86724
* Fix comment for consistency sake.Evan Cheng2009-09-041-1/+1
| | | | llvm-svn: 80993
* Added PHI Def & Kill tracking to PHIElimination pass.Lang Hames2009-07-231-0/+45
| | | | llvm-svn: 76849
* Exposed PHIElimination pass within CodeGen.Lang Hames2009-07-211-0/+80
llvm-svn: 76688
OpenPOWER on IntegriCloud