aboutsummaryrefslogtreecommitdiffstats
path: root/lib/CodeGen
Commit message (Collapse)AuthorAgeFilesLines
* add an brief instruction what this pass isGuochun Shi2003-06-101-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6676 91177308-0d34-0410-b5e6-96231b3b80d8
* a simple introduction to this passGuochun Shi2003-06-101-0/+33
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6675 91177308-0d34-0410-b5e6-96231b3b80d8
* cleaned codeGuochun Shi2003-06-103-127/+321
| | | | | | | add some comments git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6674 91177308-0d34-0410-b5e6-96231b3b80d8
* delete useless functionsGuochun Shi2003-06-084-216/+190
| | | | | | | add comment git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6673 91177308-0d34-0410-b5e6-96231b3b80d8
* change DEBUG to DEBUG_PRINTGuochun Shi2003-06-083-102/+106
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6672 91177308-0d34-0410-b5e6-96231b3b80d8
* Do not hastily change the Opcode from 'r' to 'i' type if we're not actuallyMisha Brukman2003-06-071-7/+6
| | | | | | | | | SETTING the operand to be an immediate or have verified that one of the operands is really a SignExtended or Unextended immediate value already, which warrants an 'i' opcode. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6662 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix bug: Jello/2003-06-04-bzip2-bug.llChris Lattner2003-06-051-23/+21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6624 91177308-0d34-0410-b5e6-96231b3b80d8
* I have finally seen the light. The code to change the opcode must live higher inMisha Brukman2003-06-041-4/+13
| | | | | | | | | | | | the loop, and in both cases. In the first case, it is a VReg that is a constant so it may be actually converted to a constant. In the second case, it is already a constant, but then if it doesn't change its type (e.g. to become a register and have the value loaded from memory if it is too large to live in its instruction field), we must change the opcode BEFORE the 'continue', otherwise we miss the opportunity. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6602 91177308-0d34-0410-b5e6-96231b3b80d8
* Pass through the emitConstantPool() call to the real emitter.Misha Brukman2003-06-031-0/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6590 91177308-0d34-0410-b5e6-96231b3b80d8
* Moved code to modify the opcode from 'reg' to 'imm' form to a more logical ↵Misha Brukman2003-06-031-15/+6
| | | | | | place. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6563 91177308-0d34-0410-b5e6-96231b3b80d8
* Moved FInfo.cpp to lib/Target/Sparc as it is Sparc-specific.Misha Brukman2003-06-021-73/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6554 91177308-0d34-0410-b5e6-96231b3b80d8
* Minor cleanups.Chris Lattner2003-06-021-6/+4
| | | | | | | | This pass should be moved to lib/Target/Sparc since it's sparc specific It also needs a file comment. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6553 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove usage of noncopyable classes to clean up doxygen output.Chris Lattner2003-06-022-22/+25
| | | | | | | | In particular these classes are the last that link the noncopyable classes with the hash_map, vector, and list classes. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6552 91177308-0d34-0410-b5e6-96231b3b80d8
* Add #includeChris Lattner2003-06-021-0/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6550 91177308-0d34-0410-b5e6-96231b3b80d8
* Removed a useless ofstream.Misha Brukman2003-06-021-8/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6547 91177308-0d34-0410-b5e6-96231b3b80d8
* compiled with the new SchedGraphCommonGuochun Shi2003-06-023-27/+38
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6545 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove spurious assert()Misha Brukman2003-06-021-1/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6529 91177308-0d34-0410-b5e6-96231b3b80d8
* Changes to be compatible with MachineCodeEmitter.hChris Lattner2003-06-011-65/+51
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6515 91177308-0d34-0410-b5e6-96231b3b80d8
* Minor changes.Vikram S. Adve2003-05-311-0/+5
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6470 91177308-0d34-0410-b5e6-96231b3b80d8
* Added MachineCodeForInstruction object as an argument toVikram S. Adve2003-05-312-6/+13
| | | | | | | | | TmpInstruction constructors because every TmpInstruction object has to be registered with a MachineCodeForInstruction to prevent leaks. This simplifies the user's code. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6469 91177308-0d34-0410-b5e6-96231b3b80d8
* Allow explicit physical registers for implicit operands.Vikram S. Adve2003-05-311-1/+11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6468 91177308-0d34-0410-b5e6-96231b3b80d8
* Changes to allow explicit physical register arguments that have beenVikram S. Adve2003-05-312-42/+96
| | | | | | | | | | | preallocated. While reg-to-reg dependences were already handled, this change required new code for adding edges to/from call instructions. This was part of the extensive changes to the way code generation occurs for function call arguments and return values. See log for CodeGen/PhyRegAlloc.cpp. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6467 91177308-0d34-0410-b5e6-96231b3b80d8
* Extensive changes to the way code generation occurs for functionVikram S. Adve2003-05-312-157/+261
| | | | | | | | | | | | | | | call arguments and return values: Now all copy operations before and after a call are generated during selection instead of during register allocation. The values are copied to virtual registers (or to the stack), but in the former case these operands are marked with the correct physical registers according to the calling convention. Although this complicates scheduling and does not work well with live range analysis, it simplifies the machine-dependent part of register allocation. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6465 91177308-0d34-0410-b5e6-96231b3b80d8
* When converting virtual registers to immediate constants, change the opcode.Misha Brukman2003-05-301-0/+14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6452 91177308-0d34-0410-b5e6-96231b3b80d8
* Added saveBBreferences() for BasicBlock resolution.Misha Brukman2003-05-301-4/+8
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6451 91177308-0d34-0410-b5e6-96231b3b80d8
* so far everything compilesGuochun Shi2003-05-302-23/+39
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6423 91177308-0d34-0410-b5e6-96231b3b80d8
* Correctly write out binary data as chars, before they're cast to ints.Misha Brukman2003-05-281-2/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6385 91177308-0d34-0410-b5e6-96231b3b80d8
* Added a debugging code emitter that prints code to a file, debug to std::cerr,Misha Brukman2003-05-271-0/+121
| | | | | | | | and passes the real code to a memory-outputting code emitter. This may be removed at a later point in development. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6379 91177308-0d34-0410-b5e6-96231b3b80d8
* (1) Added special register class containing (for now) %fsr.Vikram S. Adve2003-05-279-51/+54
| | | | | | | | | | | | | | Fixed spilling of %fcc[0-3] which are part of %fsr. (2) Moved some machine-independent reg-class code to class TargetRegInfo from SparcReg{Class,}Info. (3) Renamed MachienOperand::opIsDef to MachineOperand::opIsDefOnly() and related functions and flags. Fixed several bugs where only "isDef" was being checked, not "isDefAndUse". git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6341 91177308-0d34-0410-b5e6-96231b3b80d8
* Cleaned up code layout. No functional changes.Misha Brukman2003-05-222-678/+622
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6304 91177308-0d34-0410-b5e6-96231b3b80d8
* Kill `using' directives.Misha Brukman2003-05-222-51/+47
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6301 91177308-0d34-0410-b5e6-96231b3b80d8
* Use a kill, not a dead definition, update commentChris Lattner2003-05-121-5/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6131 91177308-0d34-0410-b5e6-96231b3b80d8
* * Keep LiveVariable information more up-to-date and consistentChris Lattner2003-05-121-7/+87
| | | | | | | | | | * *** Finally mark values that are inputs to PHIs as killed when appropriate. This should make the generated code quite a bit better. For example, the local-ra will not have to spill PHI inputs at the end of predecessor BB's anymore. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6117 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix bug where we could iterate off the end of a basic blockChris Lattner2003-05-121-2/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6116 91177308-0d34-0410-b5e6-96231b3b80d8
* * Keep the BBMap around as long as the pass is liveChris Lattner2003-05-121-8/+23
| | | | | | | | * Change getVarInfo to take real virtual register numbers and offset them itself. This has caused me so much grief, it's not even funny. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6115 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix N^2 algorithmChris Lattner2003-05-121-25/+34
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6112 91177308-0d34-0410-b5e6-96231b3b80d8
* * Fix several commentsChris Lattner2003-05-121-6/+37
| | | | | | | * Update LiveVar info better, fixing bug: Jello/2003-05-11-PHIRegAllocBug.ll git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6110 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix tab infestation!Chris Lattner2003-05-121-45/+45
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6109 91177308-0d34-0410-b5e6-96231b3b80d8
* Allow const functionsChris Lattner2003-05-091-2/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6056 91177308-0d34-0410-b5e6-96231b3b80d8
* Add methods for stub function generationChris Lattner2003-05-081-0/+7
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6054 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a vector to keep track of which registers are allocatable. Remove FIXMEsChris Lattner2003-05-071-14/+38
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6015 91177308-0d34-0410-b5e6-96231b3b80d8
* Re-add gross hack, it's still necessary. :(Chris Lattner2003-05-061-2/+12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6012 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove hideously nasty hackChris Lattner2003-05-061-12/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6011 91177308-0d34-0410-b5e6-96231b3b80d8
* Debug output should go to cerr, not cout, because that's where bytecode goes.Misha Brukman2003-05-041-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6002 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a bug which occurred with empty basic blocksChris Lattner2003-05-021-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5982 91177308-0d34-0410-b5e6-96231b3b80d8
* Minor cleanupChris Lattner2003-05-011-4/+6
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5976 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove unneccesary &*Chris Lattner2003-04-232-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5871 91177308-0d34-0410-b5e6-96231b3b80d8
* Just some code beautification changes I had sitting around in my tree.Misha Brukman2003-04-222-22/+15
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5859 91177308-0d34-0410-b5e6-96231b3b80d8
* Fixed compilation errors, command-line argument declarations, cleaned up code toMisha Brukman2003-04-104-267/+257
| | | | | | | | | | | | | look nicer and removed useless stuff. Also renamed a few variables, moved them into namespaces, converted outputting to a file into a print to std::cerr with a DEBUG() guard, as all passes should do anyway. No functional changes have been made. However, this code now compiles. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5769 91177308-0d34-0410-b5e6-96231b3b80d8
* Made the code readable:Misha Brukman2003-04-094-1884/+1977
| | | | | | | | | | * Lines must be wrapped at 80 chars. This is a hard limit. * Consistent style on functions, braces, if, for, etc. Code must be readable. No functional changes have been made, even though I added a new typedef. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5768 91177308-0d34-0410-b5e6-96231b3b80d8