summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/PHIElimination.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Remove unused STL header includes.Jay Foad2011-04-231-1/+0
| | | | llvm-svn: 130068
* Add an option to disable critical edge splitting in PHIElimination.Cameron Zwarich2011-03-101-4/+12
| | | | llvm-svn: 127398
* Adjust indenting of arguments.Cameron Zwarich2011-02-171-3/+3
| | | | llvm-svn: 125727
* Return Changed from SplitPHIEdges rather than always returning true.Cameron Zwarich2011-02-171-1/+1
| | | | llvm-svn: 125726
* Add a statistic to PHIElimination tracking the number of critical edges split.Cameron Zwarich2011-02-141-2/+7
| | | | llvm-svn: 125476
* Try for the third time to teach getFirstTerminator() about debug values.Jakob Stoklund Olesen2011-01-141-2/+8
| | | | | | This time let's rephrase to trick gcc-4.3 into not miscompiling. llvm-svn: 123432
* Revert r123419. It still breaks llvm-gcc-i386-linux-selfhost.Jakob Stoklund Olesen2011-01-141-8/+2
| | | | llvm-svn: 123423
* Try again to teach getFirstTerminator() about debug values.Jakob Stoklund Olesen2011-01-141-2/+8
| | | | | | Fix some callers to better deal with debug values. llvm-svn: 123419
* Speculatively revert r123384 to make llvm-gcc-i386-linux-selfhost buildbot ↵Devang Patel2011-01-131-2/+0
| | | | | | happy. llvm-svn: 123389
* Teach MachineBasicBlock::getFirstTerminator to ignore debug values.Jakob Stoklund Olesen2011-01-131-0/+2
| | | | | | | It will still return an iterator that points to the first terminator or end(), but there may be DBG_VALUE instructions following the first terminator. llvm-svn: 123384
* Replace TargetRegisterInfo::printReg with a PrintReg class that also works ↵Jakob Stoklund Olesen2011-01-091-1/+1
| | | | | | | | | | without a TRI instance. Print virtual registers numbered from 0 instead of the arbitrary FirstVirtualRegister. The first virtual register is printed as %vreg0. TRI::NoRegister is printed as %noreg. llvm-svn: 123107
* Remove the PHIElimination.h header, as it is no longer needed.Cameron Zwarich2010-12-051-8/+55
| | | | llvm-svn: 120959
* Move the FindCopyInsertPoint method of PHIElimination to a new standaloneCameron Zwarich2010-12-051-45/+2
| | | | | | function so that it can be shared with StrongPHIElimination. llvm-svn: 120951
* Remove PHIElimination's private copy of SkipPHIsAndLabels.Cameron Zwarich2010-12-041-2/+2
| | | | llvm-svn: 120918
* Now with fewer extraneous semicolons!Owen Anderson2010-10-071-1/+1
| | | | llvm-svn: 115996
* Now that PassInfo and Pass::ID have been separated, move the rest of the ↵Owen Anderson2010-08-231-2/+2
| | | | | | passes over to the new registration API. llvm-svn: 111815
* Preserve subregs on PHI source operands. Patch by Krister Wombell!Jakob Stoklund Olesen2010-08-181-1/+4
| | | | llvm-svn: 111366
* PHI elimination shouldn't require machineloopinfo since it's used at -O0. ↵Evan Cheng2010-08-171-7/+9
| | | | | | 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/+9
| | | | | | 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
* PHI elimination should not break back edge. It can cause some significant ↵Evan Cheng2010-08-171-3/+5
| | | | | | | | | | | | | | | | | | | | | code placement issues. rdar://8263994 good: LBB0_2: mov r2, r0 . . . mov r1, r2 bne LBB0_2 bad: LBB0_2: mov r2, r0 . . . @ BB#3: mov r1, r2 b LBB0_2 llvm-svn: 111221
* 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
* Emit COPY instructions instead of using copyRegToReg in InstrEmitter,Jakob Stoklund Olesen2010-07-101-5/+6
| | | | | | | | | ScheduleDAGEmit, TwoAddressLowering, and PHIElimination. This switches the bulk of register copies to using COPY, but many less used copyRegToReg calls remain. llvm-svn: 108050
* Move PHIElimination's SplitCriticalEdge for MachineBasicBlocks outDan Gohman2010-06-221-52/+1
| | | | | | | into a utility routine, teach it how to update MachineLoopInfo, and make use of it in MachineLICM to split critical edges on demand. llvm-svn: 106555
* Add a DebugLoc parameter to TargetInstrInfo::InsertBranch(). ThisStuart Hastings2010-06-171-1/+2
| | | | | | | | | | | | addresses a longstanding deficiency noted in many FIXMEs scattered across all the targets. This effectively moves the problem up one level, replacing eleven FIXMEs in the targets with eight FIXMEs in CodeGen, plus one path through FastISel where we actually supply a DebugLoc, fixing Radar 7421831. llvm-svn: 106243
* Add a DebugLoc argument to TargetInstrInfo::copyRegToReg, so that itDan Gohman2010-05-061-2/+4
| | | | | | doesn't have to guess. llvm-svn: 103194
* Move REG_SEQUENCE removal to 2addr pass.Evan Cheng2010-05-051-61/+0
| | | | llvm-svn: 103109
* Teach PHI elimination to remove REG_SEQUENCE instructions and update ↵Evan Cheng2010-05-041-0/+60
| | | | | | | | | | | | | 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
* Rename variables for consistency.Evan Cheng2010-05-041-10/+11
| | | | llvm-svn: 103013
* Avoid being influenced by dbg_value instructions.Evan Cheng2010-03-251-1/+1
| | | | llvm-svn: 99465
* Remove PHINodeTraits and use MachineInstrExpressionTrait instead.Evan Cheng2010-03-031-31/+0
| | | | llvm-svn: 97687
* Keep track of phi join registers explicitly in LiveVariables.Jakob Stoklund Olesen2010-02-231-0/+1
| | | | | | | | Previously, LiveIntervalAnalysis would infer phi joins by looking for multiply defined registers. That doesn't work if the phi join is implicitly defined in all but one of the predecessors. llvm-svn: 96994
* Dead code eliminationJakob Stoklund Olesen2010-02-231-5/+0
| | | | llvm-svn: 96837
* Dead code elimination.Jakob Stoklund Olesen2010-02-171-4/+0
| | | | llvm-svn: 96496
* move target-independent opcodes out of TargetInstrInfoChris Lattner2010-02-091-10/+10
| | | | | | | | | 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
* Change errs() to dbgs().David Greene2010-01-051-3/+3
| | | | llvm-svn: 92566
* Turn off critical edge splitting for landing pads. The introduction of aBill Wendling2009-12-171-3/+4
| | | | | | | | | | non-landing pad basic block as the successor to a block that ends in an unconditional jump will cause block folding to remove the added block as a successor. Thus eventually removing it AND the landing pad entirely. Critical edge splitting is an optimization, so we can safely turn it off when dealing with landing pads. llvm-svn: 91634
* Reuse lowered phi nodes.Jakob Stoklund Olesen2009-12-161-13/+86
| | | | | | | | | | | | | | 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
* improve portability to avoid conflicting with std::next in c++'0x.Chris Lattner2009-12-031-3/+3
| | | | | | Patch by Howard Hinnant! llvm-svn: 90365
* Move PHIElimination::isLiveOut method to LiveVariables.Jakob Stoklund Olesen2009-12-011-48/+2
| | | | | | | | 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-18/+2
| | | | | | | | | | | | 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
* Place new basic blocks immediately after their predecessor when splittingJakob Stoklund Olesen2009-11-191-7/+7
| | | | | | | | | critical edges in PHIElimination. This has a huge impact on regalloc performance, and we recover almost all of the 10% compile time regression that edge splitting introduced. llvm-svn: 89381
* Don't require LiveVariables for PHIElimination. Enable critical edge splittingJakob Stoklund Olesen2009-11-181-27/+7
| | | | | | | | | | | | 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 inverted test and add testcase from failing self-host.Jakob Stoklund Olesen2009-11-181-9/+7
| | | | llvm-svn: 89167
* Disable -split-phi-edges to unbreak the buildbotsJakob Stoklund Olesen2009-11-171-1/+1
| | | | llvm-svn: 89142
* Never call UpdateTerminator() when AnalyzeBranch would fail.Jakob Stoklund Olesen2009-11-171-1/+13
| | | | llvm-svn: 89139
* Enable -split-phi-edges by default, except when -regalloc=local.Jakob Stoklund Olesen2009-11-171-3/+15
| | | | | | | The local register allocator doesn't like it when LiveVariables is run. We should also disable edge splitting under -O0, but that has to wait a bit. llvm-svn: 89125
* Revert 89021. It's miscompiling llvm-gcc driver driver at -O0.Evan Cheng2009-11-171-1/+1
| | | | llvm-svn: 89082
* Enable -split-phi-edges by defaultJakob Stoklund Olesen2009-11-171-1/+1
| | | | llvm-svn: 89021
OpenPOWER on IntegriCloud