summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/TwoAddressInstructionPass.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Remove trailing whitespaceMisha Brukman2005-04-211-4/+4
| | | | llvm-svn: 21420
* Use the TargetInstrInfo::commuteInstruction method to commute instructionsChris Lattner2005-01-191-6/+17
| | | | | | instead of doing it manually. llvm-svn: 19685
* Make the 2-address instruction lowering pass smarter in two ways:Chris Lattner2005-01-021-17/+61
| | | | | | | | | | | | | | | | | 1. If we are two-addressing a commutable instruction and the LHS is not the last use of the variable, see if the instruction is the last use of the RHS. If so, commute the instruction, allowing us to avoid a register-register copy in many cases for common instructions like ADD, OR, AND, etc on X86. 2. If #1 doesn't hold, and if this is an instruction that also existing in 3-address form, promote the instruction to a 3-address instruction to avoid the register-register copy. We can do this for several common instructions in X86, including ADDrr, INC, DEC, etc. This patch implements test/Regression/CodeGen/X86/commute-two-addr.ll, overlap-add.ll, and overlap-shift.ll when I check in the X86 support for it. llvm-svn: 19245
* Changes For Bug 352Reid Spencer2004-09-011-3/+3
| | | | | | | | Move include/Config and include/Support into include/llvm/Config, include/llvm/ADT and include/llvm/Support. From here on out, all LLVM public header files must be under include/llvm/. llvm-svn: 16137
* The insertion method returns void nowChris Lattner2004-08-151-5/+1
| | | | llvm-svn: 15779
* Fix indentation and wrap code at 80 colsMisha Brukman2004-07-221-110/+100
| | | | llvm-svn: 15107
* Remove extraneous punctuationChris Lattner2004-07-221-2/+2
| | | | llvm-svn: 15098
* Minor cleanupsChris Lattner2004-07-211-8/+6
| | | | llvm-svn: 15091
* These files don't need to include <iostream> since they include ↵Brian Gaeke2004-07-211-1/+0
| | | | | | "Support/Debug.h". llvm-svn: 15089
* Simplify the interface to LiveVariables::addVirtualRegister(Killed|Dead)Chris Lattner2004-07-191-2/+2
| | | | llvm-svn: 14997
* Made a fix so that you can print out MachineInstrs that belong to a ↵Tanya Lattner2004-06-251-3/+3
| | | | | | MachineBasicBlock that is not yet attached to a MachineFunction. This change includes changing the third operand (TargetMachine) to a pointer for the MachineInstr::print function. llvm-svn: 14389
* Adjust to new TargetMachine interfaceChris Lattner2004-06-021-1/+1
| | | | llvm-svn: 13956
* Beautify debug output.Alkis Evlogimenos2004-02-181-3/+8
| | | | llvm-svn: 11573
* This pass should not require phi elimination or live variableAlkis Evlogimenos2004-02-151-13/+13
| | | | | | | analysis. It should only preserve them and update LiveVariables if it already ran. llvm-svn: 11479
* Use newly added next() and prior() utility functions.Alkis Evlogimenos2004-02-141-2/+2
| | | | llvm-svn: 11430
* Remove getAllocatedRegNum(). Use getReg() instead.Alkis Evlogimenos2004-02-131-6/+6
| | | | llvm-svn: 11393
* Change MachineBasicBlock's vector of MachineInstr pointers into anAlkis Evlogimenos2004-02-121-5/+5
| | | | | | | | | ilist of MachineInstr objects. This allows constant time removal and insertion of MachineInstr instances from anywhere in each MachineBasicBlock. It also allows for constant time splicing of MachineInstrs into or out of MachineBasicBlocks. llvm-svn: 11340
* Added missing include.Tanya Lattner2004-02-051-0/+1
| | | | llvm-svn: 11129
* Modify the two address instruction pass to remove the duplicateAlkis Evlogimenos2004-02-041-57/+67
| | | | | | operand of the instruction and thus simplify the register allocation. llvm-svn: 11124
* Revert changes. Will implement this using a different set of primitivesAlkis Evlogimenos2004-02-021-9/+3
| | | | llvm-svn: 11091
* Correctly update def/use information for modified machine operands.Alkis Evlogimenos2004-02-021-3/+9
| | | | llvm-svn: 11087
* Fix, correctly this time, the computation of the return valueChris Lattner2004-01-311-15/+16
| | | | | | | | | Fix a spello Tighten up the assertion checking No functionality changes. llvm-svn: 11036
* * Fix incorrect computation of the runOnMachineFunction return valueChris Lattner2004-01-311-30/+23
| | | | | | * Turn a bunch of instance variables into automatic variables llvm-svn: 11035
* Remove unneeded #includesChris Lattner2004-01-311-12/+10
| | | | | | | | Move Passes.h (which defines the interface to this file) to the top. Move statistics to the top of the file. Add a comment llvm-svn: 11034
* Make LiveVariables::HandlePhysRegUse andAlkis Evlogimenos2004-01-111-21/+11
| | | | | | | | | LiveVariables::HandlePhysRegDef private they use information that is not in memory when LiveVariables finishes the analysis. Also update the TwoAddressInstructionPass to not use this interface. llvm-svn: 10755
* fix warningChris Lattner2004-01-051-1/+1
| | | | llvm-svn: 10692
* Currently we cannot handle two-address instructions of the form:Alkis Evlogimenos2004-01-051-0/+9
| | | | | | | A = B op C where A == C, but this cannot really occur in practice because of SSA form. Add an assert to check that just to be safe. llvm-svn: 10682
* Update description.Alkis Evlogimenos2004-01-041-5/+10
| | | | llvm-svn: 10681
* Remove TwoAddressInstruction from the public headers and add an IDAlkis Evlogimenos2003-12-181-2/+19
| | | | | | instead, since this pass doesn't expose any state to its users. llvm-svn: 10520
* Add TwoAddressInstructionPass to handle instructions that have two orAlkis Evlogimenos2003-12-181-0/+149
more operands and the two first operands are constrained to be the same. The pass takes an instruction of the form: a = b op c and transforms it into: a = b a = a op c and also preserves live variables. llvm-svn: 10512
OpenPOWER on IntegriCloud