- Dec 16, 2009
-
-
Jakob Stoklund Olesen authored
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
-
- Dec 03, 2009
-
-
Chris Lattner authored
Patch by Howard Hinnant! llvm-svn: 90365
-
- Dec 01, 2009
-
-
Jakob Stoklund Olesen authored
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
-
- Nov 21, 2009
-
-
Jakob Stoklund Olesen authored
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
-
- Nov 19, 2009
-
-
Jakob Stoklund Olesen authored
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
-
- Nov 18, 2009
-
-
Jakob Stoklund Olesen authored
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
-
Jakob Stoklund Olesen authored
llvm-svn: 89167
-
- Nov 17, 2009
-
-
Jakob Stoklund Olesen authored
llvm-svn: 89142
-
Jakob Stoklund Olesen authored
llvm-svn: 89139
-
Jakob Stoklund Olesen authored
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
-
Evan Cheng authored
llvm-svn: 89082
-
Jakob Stoklund Olesen authored
llvm-svn: 89021
-
- Nov 16, 2009
-
-
Lang Hames authored
Fix for the original bug in PR5495 - Look at uses as well as defs when determining the PHI-copy insert point. - Patch by Andrew Canis! llvm-svn: 88880
-
- Nov 14, 2009
-
-
Jakob Stoklund Olesen authored
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
-
Jakob Stoklund Olesen authored
llvm-svn: 88727
-
- Nov 13, 2009
-
-
Jakob Stoklund Olesen authored
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
-
- Nov 12, 2009
-
-
Daniel Dunbar authored
llvm-svn: 87024
-
- Nov 11, 2009
-
-
Jakob Stoklund Olesen authored
- 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
-
- Nov 10, 2009
-
-
Jakob Stoklund Olesen authored
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
-
Jakob Stoklund Olesen authored
Clean up some whitespace. No functional changes. llvm-svn: 86724
-
- Aug 01, 2009
-
-
Dan Gohman authored
llvm-svn: 77754
-
- Jul 23, 2009
-
-
Lang Hames authored
llvm-svn: 76865
-
Lang Hames authored
llvm-svn: 76849
-
- Jul 22, 2009
-
-
Lang Hames authored
llvm-svn: 76688
-
- Jul 07, 2009
-
-
Evan Cheng authored
llvm-svn: 74925
-
Sanjiv Gupta authored
previous cmp; a copy can not be inserted here if the copy insn also has side effects. We don't have access to the attributes of copy insn here; so just play safe by finding a safe locations for branch terminators. llvm-svn: 74898
-
- May 26, 2009
-
-
Jeffrey Yasskin authored
entries as there are basic blocks in the function. LiveVariables::getVarInfo creates a VarInfo struct for every register in the function, leading to quadratic space use. This patch changes the BitVector to a SparseBitVector, which doesn't help the worst-case memory use but does reduce the actual use in very long functions with short-lived variables. llvm-svn: 72426
-
Evan Cheng authored
llvm-svn: 72411
-
- Mar 17, 2009
-
-
Duncan Sands authored
(which produces "call L_f$stub" rather than "call f"). llvm-svn: 67079
-
- Mar 16, 2009
-
-
Bill Wendling authored
U test/CodeGen/X86/2009-03-13-PHIElimBug.ll D test/CodeGen/X86/2009-03-16-PHIElimInLPad.ll U lib/CodeGen/PHIElimination.cpp r67049 was causing this failure: Running /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.src/test/CodeGen/X86/dg.exp ... FAIL: /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.src/test/CodeGen/X86/2009-03-13-PHIElimBug.ll for PR3784 Failed with exit(1) at line 1 while running: llvm-as < /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.src/test/CodeGen/X86/2009-03-13-PHIElimBug.ll | llc -march=x86 | /usr/bin/grep -A 2 {call f} | /usr/bin/grep movl child process exited abnormally llvm-svn: 67051
-
Duncan Sands authored
how invokes are set up. The fix could be disturbed by register copies coming after the EH_LABEL, and also didn't behave quite right when it was the invoke result that was used in a phi node. Also (see new testcase) fix another phi elimination bug while there: register copies in the landing pad need to come after the EH_LABEL, because that's where execution branches to when unwinding. If they come before the EH_LABEL then they will never be executed... Also tweak the original testcase so it doesn't use a no-longer existing counter. The accumulated phi elimination changes fix two of seven Ada testsuite failures that turned up after landing pad critical edge splitting was turned off. So there's probably more to come. llvm-svn: 67049
-
- Mar 13, 2009
-
-
Evan Cheng authored
Fix PR3784: If the source of a phi comes from a bb ended with an invoke, make sure the copy is inserted before the try range (unless it's used as an input to the invoke, then insert it after the last use), not at the end of the bb. Also re-apply r66140 which was disabled as a workaround. llvm-svn: 66976
-
- Feb 03, 2009
-
-
Bill Wendling authored
llvm-svn: 63599
-
- Jan 28, 2009
-
-
Duncan Sands authored
llvm-svn: 63198
-
- Sep 04, 2008
-
-
Dan Gohman authored
llvm-svn: 55779
-
- Jul 08, 2008
-
-
Dan Gohman authored
MachineMemOperands. The pools are owned by MachineFunctions. This drastically reduces the number of calls to malloc/free made during the "Emit" phase of scheduling, as well as later phases in CodeGen. Combined with other changes, this speeds up the "instruction selection" phase of CodeGen by 10% in some cases. llvm-svn: 53212
-
- Jul 03, 2008
-
-
Evan Cheng authored
- Remove calls to copyKillDeadInfo which is an N^2 function. Instead, propagate kill / dead markers as new instructions are constructed in foldMemoryOperand, convertToThressAddress, etc. - Also remove LiveVariables::instructionChanged, etc. Replace all calls with cheaper calls which update VarInfo kill list. llvm-svn: 53097
-
- Jun 19, 2008
-
-
Evan Cheng authored
llvm-svn: 52479
-
- May 13, 2008
-
-
Dan Gohman authored
address of the PassInfo directly instead of calling getPassInfo. This eliminates a bunch of dynamic initializations of static data. Also, fold RegisterPassBase into PassInfo, make a bunch of its data members const, and rearrange some code to initialize data members in constructors instead of using setter member functions. llvm-svn: 51022
-
Dan Gohman authored
several things that were neither in an anonymous namespace nor static but not intended to be global. llvm-svn: 51017
-