summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/TwoAddressInstructionPass.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Add an option to enable StrongPHIElimination, for ease of testing.Owen Anderson2008-10-071-1/+5
| | | | llvm-svn: 57259
* Switch the MachineOperand accessors back to the short names likeDan Gohman2008-10-031-7/+7
| | | | | | isReg, etc., from isRegister, etc. llvm-svn: 57006
* Tidy up several unbeseeming casts from pointer to intptr_t.Dan Gohman2008-09-041-1/+1
| | | | llvm-svn: 55779
* Move the check whether it's worth remating to caller.Evan Cheng2008-08-271-0/+1
| | | | llvm-svn: 55434
* Refactor isSafeToReMat out of 2addr pass.Evan Cheng2008-08-271-29/+1
| | | | llvm-svn: 55430
* - Remove calls to copyKillDeadInfo which is an N^2 function. Instead, ↵Evan Cheng2008-07-031-7/+4
| | | | | | | | 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
* - Add LiveVariables::replaceKillInstruction. This does a subset of ↵Evan Cheng2008-07-031-3/+2
| | | | | | | | 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
* Make LiveVariables even more optional, by making it optional in the call to ↵Owen Anderson2008-07-021-46/+1
| | | | | | | | 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
* TwoAddressInstructionPass doesn't really require LiveVariables, it just ↵Owen Anderson2008-07-021-14/+67
| | | | | | needs to update it if it's already around. llvm-svn: 53049
* Remove unneeded include.Evan Cheng2008-06-301-1/+0
| | | | llvm-svn: 52920
* Enable two-address remat by default.Evan Cheng2008-06-251-35/+33
| | | | llvm-svn: 52701
* Missed a check.Evan Cheng2008-06-191-1/+1
| | | | llvm-svn: 52487
* Complete support for two-address pass rematerialization. Now *almost* always ↵Evan Cheng2008-06-181-49/+128
| | | | | | a win. llvm-svn: 52452
* Implement "AsCheapAsAMove" for some obviously cheap instructions: xor and theBill Wendling2008-05-291-1/+4
| | | | | | like. llvm-svn: 51662
* Check the "isSafeToMove" predicate, which has a series of tests to make sureBill Wendling2008-05-281-1/+3
| | | | | | that it's safe to remat an instruction. llvm-svn: 51659
* Incorporated feedback: Check that the implicitly defined operands aren't usedBill Wendling2008-05-271-9/+8
| | | | | | before deleting the instruction. llvm-svn: 51609
* The enabling of remat in 2-address conversion breaks this test:Bill Wendling2008-05-261-23/+30
| | | | | | | | | | | | 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
* A problem that's exposed when machine LICM is enabled. Consider this code:Bill Wendling2008-05-261-1/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Change class' public PassInfo variables to by initialized with theDan Gohman2008-05-131-1/+1
| | | | | | | | | | | 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
* Clean up the use of static and anonymous namespaces. This turned upDan Gohman2008-05-131-4/+4
| | | | | | | several things that were neither in an anonymous namespace nor static but not intended to be global. llvm-svn: 51017
* Cosmetic changes:Bill Wendling2008-05-101-36/+48
| | | | | | | | | - Comment fixes. - Moar whitespace. - Made ivars "private" by default. No functionality change. llvm-svn: 50926
* Fix a memory bug: increment an iterator of a deleted machine instr.Evan Cheng2008-03-271-2/+7
| | | | llvm-svn: 48853
* Typo.Evan Cheng2008-03-131-1/+1
| | | | llvm-svn: 48337
* Don't try to sink 3-address instruction if convertToThreeAddress created ↵Evan Cheng2008-03-131-1/+6
| | | | | | more than one instructions. llvm-svn: 48336
* Remove an unused command line option.Evan Cheng2008-03-131-9/+0
| | | | llvm-svn: 48334
* TwoAddressInstructionPass enhancement. After it converts a two address ↵Evan Cheng2008-03-131-13/+131
| | | | | | 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
* Refactor code. Remove duplicated functions that basically do the same thing asEvan Cheng2008-03-051-2/+2
| | | | | | findRegisterUseOperandIdx, findRegisterDefOperandIndx. Fix some naming inconsistencies. llvm-svn: 47927
* Rename MRegisterInfo to TargetRegisterInfo.Dan Gohman2008-02-101-3/+3
| | | | llvm-svn: 46930
* Remove DefInst from LiveVariables::VarInfo. Use the facilities on ↵Owen Anderson2008-01-151-4/+0
| | | | | | MachineRegisterInfo instead. llvm-svn: 46016
* rename TargetInstrDescriptor -> TargetInstrDesc.Chris Lattner2008-01-071-7/+7
| | | | | | | Make MachineInstr::getDesc return a reference instead of a pointer, since it can never be null. llvm-svn: 45695
* Rename all the M_* flags to be namespace qualified enums, and switch Chris Lattner2008-01-071-1/+1
| | | | | | | | all clients over to using predicates instead of these flags directly. These are now private values which are only to be used to statically initialize the tables. llvm-svn: 45692
* add more and significantly better comments to the rest of the machineinstrChris Lattner2008-01-071-1/+1
| | | | | | | flags that can be set. Add predicates for the ones lacking it, and switch some clients over to using the predicates instead of Flags directly. llvm-svn: 45690
* Move a bunch more accessors from TargetInstrInfo to TargetInstrDescriptorChris Lattner2008-01-071-2/+2
| | | | llvm-svn: 45680
* Rename MachineInstr::getInstrDescriptor -> getDesc(), which reflectsChris Lattner2008-01-071-1/+1
| | | | | | | | | | | | | | | that it is cheap and efficient to get. Move a variety of predicates from TargetInstrInfo into TargetInstrDescriptor, which makes it much easier to query a predicate when you don't have TII around. Now you can use MI->getDesc()->isBranch() instead of going through TII, and this is much more efficient anyway. Not all of the predicates have been moved over yet. Update old code that used MI->getInstrDescriptor()->Flags to use the new predicates in many places. llvm-svn: 45674
* Don't recalculate the loop info and loop dominators analyses if they'reBill Wendling2008-01-041-0/+2
| | | | | | preserved. llvm-svn: 45596
* Move copyRegToReg from MRegisterInfo to TargetInstrInfo. This is part of theOwen Anderson2007-12-311-2/+1
| | | | | | Machine-level API cleanup instigated by Chris. llvm-svn: 45470
* Rename SSARegMap -> MachineRegisterInfo in keeping with the idea Chris Lattner2007-12-311-2/+2
| | | | | | | | | | | | | | that "machine" classes are used to represent the current state of the code being compiled. Given this expanded name, we can start moving other stuff into it. For now, move the UsedPhysRegs and LiveIn/LoveOuts vectors from MachineFunction into it. Update all the clients to match. This also reduces some needless #includes, such as MachineModuleInfo from MachineFunction. llvm-svn: 45467
* Remove attribution from file headers, per discussion on llvmdev.Chris Lattner2007-12-291-2/+2
| | | | llvm-svn: 45418
* As Chris and Evan pointed out, BreakCriticalMachineEdges doesn't really needOwen Anderson2007-11-121-1/+0
| | | | | | to be a pass of its own. Instead, move it out into a helper method. llvm-svn: 44002
* This preserves critical edge breaking.Owen Anderson2007-11-081-0/+1
| | | | llvm-svn: 43911
* Bring UsedBlocks back. StrongPHIElimination needs this information.Owen Anderson2007-11-081-0/+4
| | | | llvm-svn: 43866
* It's possible to commute instrctions with more than 3 operands.Evan Cheng2007-10-231-1/+1
| | | | llvm-svn: 43256
* Added missing curly braces which renders the if clause useless in debug build.Evan Cheng2007-10-201-1/+2
| | | | llvm-svn: 43196
* Allow copyRegToReg to emit cross register classes copies.Evan Cheng2007-09-261-1/+1
| | | | | | Tested with "make check"! llvm-svn: 42346
* Fix typo in comment.Nick Lewycky2007-05-061-1/+1
| | | | llvm-svn: 36873
* Drop 'const'Devang Patel2007-05-031-2/+2
| | | | llvm-svn: 36662
* Use 'static const char' instead of 'static const int'.Devang Patel2007-05-021-2/+2
| | | | | | | Due to darwin gcc bug, one version of darwin linker coalesces static const int, which defauts PassID based pass identification. llvm-svn: 36652
* Do not use typeinfo to identify pass in pass manager.Devang Patel2007-05-011-0/+4
| | | | llvm-svn: 36632
* VarInfo::UsedBlocks is no longer used. Remove.Evan Cheng2007-04-181-4/+0
| | | | llvm-svn: 36250
* Keep UsedBlocks info accurate.Evan Cheng2007-03-181-0/+3
| | | | llvm-svn: 35140
OpenPOWER on IntegriCloud