- Mar 30, 2009
-
-
Evan Cheng authored
Turn a 2-address instruction into a 3-address one when it's profitable even if the two-address operand is killed. e.g. %reg1024<def> = MOV r1 %reg1025<def> = ADD %reg1024, %reg1026 r0 = MOV %reg1025 If it's not possible / profitable to commute ADD, then turning ADD into a LEA saves a copy. llvm-svn: 68065
-
- Mar 23, 2009
-
-
Evan Cheng authored
Model inline asm constraint which ties an input to an output register as machine operand TIED_TO constraint. This eliminated the need to pre-allocate registers for these. This also allows register allocator can eliminate the unneeded copies. llvm-svn: 67512
-
- Mar 19, 2009
-
-
Evan Cheng authored
llvm-svn: 67335
-
- Mar 01, 2009
-
-
Evan Cheng authored
Look for situations like this: %reg1024<def> = MOV r1 %reg1025<def> = MOV r0 %reg1026<def> = ADD %reg1024, %reg1025 r0 = MOV %reg1026 Commute the ADD to hopefully eliminate an otherwise unavoidable copy. llvm-svn: 65752
-
- Feb 21, 2009
-
-
Evan Cheng authored
If two-address def is dead and the instruction does not define other registers, and it doesn't produce side effects, just delete the instruction. llvm-svn: 65218
-
- Jan 28, 2009
-
-
Duncan Sands authored
llvm-svn: 63198
-
- Jan 25, 2009
-
-
Evan Cheng authored
Teach 2addr pass to be do more commuting. If both uses of a two-address instruction are killed, but the first operand has a use before and after the def, commute if the second operand does not suffer from the same issue. %reg1028<def> = EXTRACT_SUBREG %reg1027<kill>, 1 %reg1029<def> = MOV8rr %reg1028 %reg1029<def> = SHR8ri %reg1029, 7, %EFLAGS<imp-def,dead> insert => %reg1030<def> = MOV8rr %reg1028 %reg1030<def> = ADD8rr %reg1028<kill>, %reg1029<kill>, %EFLAGS<imp-def,dead> In this case, it might not be possible to coalesce the second MOV8rr instruction if the first one is coalesced. So it would be profitable to commute it: %reg1028<def> = EXTRACT_SUBREG %reg1027<kill>, 1 %reg1029<def> = MOV8rr %reg1028 %reg1029<def> = SHR8ri %reg1029, 7, %EFLAGS<imp-def,dead> insert => %reg1030<def> = MOV8rr %reg1029 %reg1030<def> = ADD8rr %reg1029<kill>, %reg1028<kill>, %EFLAGS<imp-def,dead> llvm-svn: 62954
-
- Jan 24, 2009
-
-
Evan Cheng authored
llvm-svn: 62893
-
- Jan 05, 2009
-
-
Dan Gohman authored
llvm-svn: 61715
-
- Nov 12, 2008
-
-
Dan Gohman authored
the debug output, so that the updated liveness flags are reflected in the debug output. llvm-svn: 59147
-
- Oct 07, 2008
-
-
Owen Anderson authored
llvm-svn: 57259
-
- Oct 03, 2008
-
-
Dan Gohman authored
isReg, etc., from isRegister, etc. llvm-svn: 57006
-
- Sep 04, 2008
-
-
Dan Gohman authored
llvm-svn: 55779
-
- Aug 27, 2008
-
-
Evan Cheng authored
llvm-svn: 55434
-
Evan Cheng authored
llvm-svn: 55430
-
- 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
-
Evan Cheng authored
- Add LiveVariables::replaceKillInstruction. This does a subset of instructionChanged. That is, it only update the VarInfo.kills if the new instruction is known to have the correct dead and kill markers. - CommuteInstruction copies kill / dead markers over to new instruction. So use replaceKillInstruction instead. llvm-svn: 53061
-
Owen Anderson authored
Make LiveVariables even more optional, by making it optional in the call to TargetInstrInfo::convertToThreeAddressInstruction Also, if LV isn't around, then TwoAddr doesn't need to be updating flags, since they won't have been set in the first place. llvm-svn: 53058
-
- Jul 02, 2008
-
-
Owen Anderson authored
TwoAddressInstructionPass doesn't really require LiveVariables, it just needs to update it if it's already around. llvm-svn: 53049
-
- Jun 30, 2008
-
-
Evan Cheng authored
llvm-svn: 52920
-
- Jun 25, 2008
-
-
Evan Cheng authored
llvm-svn: 52701
-
- Jun 19, 2008
-
-
Evan Cheng authored
llvm-svn: 52487
-
- Jun 18, 2008
-
-
Evan Cheng authored
llvm-svn: 52452
-
- May 29, 2008
-
-
Bill Wendling authored
like. llvm-svn: 51662
-
Bill Wendling authored
that it's safe to remat an instruction. llvm-svn: 51659
-
- May 27, 2008
-
-
Bill Wendling authored
before deleting the instruction. llvm-svn: 51609
-
- May 26, 2008
-
-
Bill Wendling authored
Running /Users/void/llvm/llvm.src/test/CodeGen/X86/dg.exp ... FAIL: /Users/void/llvm/llvm.src/test/CodeGen/X86/2007-11-30-LoadFolding-Bug.ll Failed with exit(1) at line 1 while running: llvm-as < /Users/void/llvm/llvm.src/test/CodeGen/X86/2007-11-30-LoadFolding-Bug.ll | llc -march=x86 -mattr=+sse2 -stats |& grep {1 .*folded into instructions} child process exited abnormally Make this conditional for now. llvm-svn: 51563
-
Bill Wendling authored
LBB1_3: # bb ... xorl %ebp, %ebp subl (%ebx), %ebp ... incl %ecx cmpl %edi, %ecx jl LBB1_3 # bb Whe using machine LICM, LLVM converts it into: xorl %esi, %esi LBB1_3: # bb ... movl %esi, %ebp subl (%ebx), %ebp ... incl %ecx cmpl %edi, %ecx jl LBB1_3 # bb Two address conversion inserts the copy instruction. However, it's cheaper to rematerialize it, and remat helps reduce register pressure. llvm-svn: 51562
-
- 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
-
- May 10, 2008
-
-
Bill Wendling authored
- Comment fixes. - Moar whitespace. - Made ivars "private" by default. No functionality change. llvm-svn: 50926
-
- Mar 27, 2008
-
-
Evan Cheng authored
llvm-svn: 48853
-
- Mar 13, 2008
-
-
Evan Cheng authored
llvm-svn: 48337
-
Evan Cheng authored
Don't try to sink 3-address instruction if convertToThreeAddress created more than one instructions. llvm-svn: 48336
-
Evan Cheng authored
llvm-svn: 48334
-
Evan Cheng authored
TwoAddressInstructionPass enhancement. After it converts a two address instruction into a 3-address one, sink it past the instruction that kills the read-mod-write register if its definition is used past the kill. This reduces the number of live register by one. llvm-svn: 48333
-
- Mar 05, 2008
-
-
Evan Cheng authored
findRegisterUseOperandIdx, findRegisterDefOperandIndx. Fix some naming inconsistencies. llvm-svn: 47927
-
- Feb 10, 2008
-
-
Dan Gohman authored
llvm-svn: 46930
-
- Jan 15, 2008
-
-
Owen Anderson authored
llvm-svn: 46016
-
- Jan 07, 2008
-
-
Chris Lattner authored
Make MachineInstr::getDesc return a reference instead of a pointer, since it can never be null. llvm-svn: 45695
-