1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-22 20:43:44 +02:00
Commit Graph

16 Commits

Author SHA1 Message Date
Evan Cheng
7310728cf9 Remove PHINodeTraits and use MachineInstrExpressionTrait instead.
llvm-svn: 97687
2010-03-03 23:55:49 +00:00
Jakob Stoklund Olesen
890a5e50fc Dead code elimination
llvm-svn: 96837
2010-02-23 00:28:53 +00:00
Jakob Stoklund Olesen
e7862f29ec Dead code elimination.
llvm-svn: 96496
2010-02-17 19:13:56 +00:00
Dale Johannesen
622053fec3 Handle DBG_VALUE mixed with labels when doing PHI
elimination.  Before a DBG_VALUE could affect codegen.
The solution here is imperfect and not final.

llvm-svn: 96318
2010-02-16 01:57:28 +00:00
Chris Lattner
7acf9be6c4 move target-independent opcodes out of TargetInstrInfo
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
2010-02-09 19:54:29 +00:00
Jakob Stoklund Olesen
e8d568962e Reuse lowered phi nodes.
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
2009-12-16 18:55:53 +00:00
Jakob Stoklund Olesen
2b50f038b1 Move PHIElimination::isLiveOut method to LiveVariables.
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
2009-12-01 17:13:31 +00:00
Jakob Stoklund Olesen
319458cd03 Be more clever about calculating live variables through new basic blocks.
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
2009-11-21 02:05:21 +00:00
Jakob Stoklund Olesen
e8cac54a36 Don't require LiveVariables for PHIElimination. Enable critical edge splitting
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
2009-11-18 18:01:35 +00:00
Jakob Stoklund Olesen
a8d26951eb Fix PHIElimination optimization that uses MBB->getBasicBlock.
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
2009-11-13 21:56:15 +00:00
Jakob Stoklund Olesen
01582996dd Fix liveness calculation when splitting critical edges during PHI elimination.
- 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
2009-11-11 19:31:31 +00:00
Jakob Stoklund Olesen
b92c9347ba Teach PHIElimination to split critical edges when -split-phi-edges is enabled.
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
2009-11-10 22:01:05 +00:00
Jakob Stoklund Olesen
35918309f2 Refactoring: Extract method PHIElimination::isLiveOut().
Clean up some whitespace.
No functional changes.

llvm-svn: 86724
2009-11-10 22:00:56 +00:00
Evan Cheng
284b38aaa7 Fix comment for consistency sake.
llvm-svn: 80993
2009-09-04 07:46:30 +00:00
Lang Hames
1716e28365 Added PHI Def & Kill tracking to PHIElimination pass.
llvm-svn: 76849
2009-07-23 04:34:03 +00:00
Lang Hames
0e61f87ea3 Exposed PHIElimination pass within CodeGen.
llvm-svn: 76688
2009-07-21 23:47:33 +00:00