Commit Graph

5180 Commits

Author SHA1 Message Date
Chris Lattner 803c66bc64 Add debugging helper
llvm-svn: 5235
2003-01-13 00:52:25 +00:00
Chris Lattner b9636a70e5 Make sure to handle %'s in strings correctly so that the names of BB's and functions are actually printed!
llvm-svn: 5234
2003-01-13 00:52:14 +00:00
Chris Lattner 962d5befb3 * No longer need lowerallocation pass
* Add X86 Stackifier pass
* Add peephole optimizer pass

llvm-svn: 5233
2003-01-13 00:51:23 +00:00
Chris Lattner c39dc9e648 rename FP -> fp*
llvm-svn: 5232
2003-01-13 00:50:46 +00:00
Chris Lattner 06e07162fc * Move frame and constant pool indexes to first argument of memory reference
so we can put an offset in there as well...
* Fix long/ulong stuff

llvm-svn: 5231
2003-01-13 00:50:33 +00:00
Chris Lattner 9fe3518dc0 * Some instructions take 64 bit integers, add an Arg type for it
* Add flags for different types of FP pseudo instrs

llvm-svn: 5230
2003-01-13 00:49:24 +00:00
Chris Lattner 5cc425a8e1 * Function calls clobber fp registers
* Use new M_TERMINATOR_FLAG flag
* Add ::Void flag on several instructions so def-use info is correct!
* Implement MANY FP instructions
* Finalize pseudo FP instructions
* Add set of Pseudo FP instruction description flags
* Add support for MOVim instrs
* Add support for 64 bit support instrs, like adc sbb, etc
* Add conditional move

llvm-svn: 5229
2003-01-13 00:48:46 +00:00
Chris Lattner 7878563ff9 Add support for frame and constant pool references
llvm-svn: 5228
2003-01-13 00:45:53 +00:00
Chris Lattner 61e1195e89 Move passes out to Passes.h
llvm-svn: 5227
2003-01-13 00:45:29 +00:00
Chris Lattner 888a8084b6 Add speculation
llvm-svn: 5226
2003-01-13 00:35:08 +00:00
Chris Lattner 956e8379f9 * Implement rudimentary output of the constant pool
* Implement support for MRMS?m instructions
* Add Arg64 support
* Add support for frame indexes and constant pool indexes
*

llvm-svn: 5225
2003-01-13 00:35:03 +00:00
Chris Lattner d4ba62218e * Add support for FP registers ST*
* Add support for the constant pool & constant pool indices
* Add support for MRMS?m instructions
* Fix FP Prefix emission
* Add support for global addresses and external symbols

llvm-svn: 5224
2003-01-13 00:33:59 +00:00
Chris Lattner 6c0daf795a * Adjust to use new interfaces, eliminating CurReg stuff
* Support arbitrary FP constants
* Fix bugs in frame layout for function calls and incoming arguments
* Insert copies for constant arguments to PHI nodes into the BOTTOM of
  predecessor blocks, not the top.
* Implement _floating point_ support: setcc, return, load, store, cast
* Fix several bugs in the cast instruction
* Abstract out call emission and load/store for FP
* Implement malloc/free without previous lowering pass.
* Make use of new forms of MachineOperand
* Implement _long_ support!
* Fix many bugs in FP support
* Change branch from je/jne to je/jmp
* Simplify code generated for GEP instructions

llvm-svn: 5223
2003-01-13 00:32:26 +00:00
Chris Lattner 661841c49b Fix references to functions
llvm-svn: 5222
2003-01-13 00:27:23 +00:00
Chris Lattner 0d5644bb6d Start renaming MachineInstrInfo -> TargetInstrInfo
llvm-svn: 5221
2003-01-13 00:26:36 +00:00
Chris Lattner cbedb8b400 * Use the PHI Elimination pass
llvm-svn: 5220
2003-01-13 00:26:08 +00:00
Chris Lattner bfa5319eb2 * Convert to use LiveVariable analysis
* Convert to use PHIElimination pass
* Don't spill values which have just been reloaded (big win reducing spills)
* Add experimental support for eliminating spills before TwoAddress
  instructions.  It currently is broken so it is #ifdef'd out.
* Use new "is terminator" flag on instructions instead of looking for
  branches and returns explicitly.

llvm-svn: 5219
2003-01-13 00:25:40 +00:00
Chris Lattner 8d2a07ab2f Convert to MachineFunctionPass
llvm-svn: 5218
2003-01-13 00:23:41 +00:00
Chris Lattner a2ad874c95 Add support for 3 new forms of MachineOperand
llvm-svn: 5217
2003-01-13 00:23:24 +00:00
Chris Lattner c6807e8f5d Add support for constant pool
Add helper methods for MachineFrameInfo

llvm-svn: 5216
2003-01-13 00:23:03 +00:00
Chris Lattner 6178ee9b36 Add support for global address by string and constant pool values
llvm-svn: 5215
2003-01-13 00:22:37 +00:00
Chris Lattner b63ba57411 Rename MachineInstrInfo -> TargetInstrInfo
llvm-svn: 5214
2003-01-13 00:21:32 +00:00
Chris Lattner deca2b5272 * Start renaming MachineInstrInfo -> TargetInstrInfo
* Add new M_TERMINATOR_FLAG

llvm-svn: 5213
2003-01-13 00:21:19 +00:00
Chris Lattner 936402bbb2 Add new getName method
llvm-svn: 5212
2003-01-13 00:19:44 +00:00
Chris Lattner 5d72e6cb69 Simplify interface to creating a register
llvm-svn: 5211
2003-01-13 00:19:18 +00:00
Chris Lattner 6cd144e676 * Add support for new types of operands
llvm-svn: 5210
2003-01-13 00:18:44 +00:00
Chris Lattner c32a3ba53d * Add 3 new types of MachineOperand: ConstantPoolIndex ExternalSymbol and GlobalAddress's
* Add new isPCRelative modifier flag which should be used in place of MO_PCRelativeDisp type.
* Fix a bug in isPhysicalRegister
* Add new setOpcode and RemoveOperand methods

llvm-svn: 5209
2003-01-13 00:18:17 +00:00
Chris Lattner ea1f103e5c * Add a constant pool to hold per-function constants which must be spilled to memory
llvm-svn: 5208
2003-01-13 00:16:10 +00:00
Chris Lattner 55f00fa00f * Add utility methods which make common cases easier
llvm-svn: 5207
2003-01-13 00:15:24 +00:00
Chris Lattner 5d4b55f69f * Add support for values in the constant pool
* Add support for functions referenced by name

llvm-svn: 5206
2003-01-13 00:14:55 +00:00
Chris Lattner 78133df9ac Add an option (which will go away in the future) signfifying that there is a JIT under Linux
llvm-svn: 5205
2003-01-13 00:13:19 +00:00
Chris Lattner f9781b59ab More renamings of Target/Machine*Info to Target/Target*Info
llvm-svn: 5204
2002-12-29 03:13:05 +00:00
Chris Lattner 42d59219c7 Rename MachineOptInfo to TargetoptInfo
Rename MachineCacheInfo to TargetCacheInfo

llvm-svn: 5203
2002-12-29 02:50:35 +00:00
Chris Lattner 83d835da2a Rename MachineOptInfo to TargetoptInfo
Rename MachineCacheInfo to TargetCacheInfo

llvm-svn: 5202
2002-12-29 02:50:33 +00:00
Chris Lattner 26c23467c5 Rename FunctionFrameInfo to MachineFrameInfo
llvm-svn: 5201
2002-12-28 21:08:28 +00:00
Chris Lattner ca4362fee7 Rename FunctionFrameInfo to MachineFrameInfo
llvm-svn: 5200
2002-12-28 21:08:26 +00:00
Chris Lattner 871e591e34 Rename MachineFrameInfo to TargetFrameInfo.h
llvm-svn: 5199
2002-12-28 21:00:25 +00:00
Chris Lattner c8b36e6362 Initial checkin of Prolog/Epilog code inserter, which is an important part
of the abstract frame representation

llvm-svn: 5198
2002-12-28 20:43:30 +00:00
Chris Lattner 2ca5e23403 Put class in anonymous namespace
llvm-svn: 5197
2002-12-28 20:42:56 +00:00
Chris Lattner bf9d12ac8b * Convert to be a MachineFunctionPass instance
* Use new FunctionFrameInfo object to manage stack slots instead of doing
  it directly
* Adjust to new MRegisterInfo API
* Don't take a TM as a ctor argument
* Don't keep track of which callee saved registers are modified
* Don't emit prolog/epilog code or spill/restore code for callee saved regs
* Use new allocation_order_begin/end iterators to simplify dramatically the
  logic for picking registers to allocate
* Machine PHI nodes can no longer contain constant arguments

* Use a bitvector to keep track of registers used instead of a set
* Fix problem where explicitly referenced registers would be added to
  regsused set and never removed

llvm-svn: 5196
2002-12-28 20:42:14 +00:00
Chris Lattner b4e4111d75 * Convert to be a MachineFunctionPass instance
* Use new FunctionFrameInfo object to manage stack slots instead of doing
  it directly
* Adjust to new MRegisterInfo API
* Don't take a TM as a ctor argument
* Don't keep track of which callee saved registers are modified
* Don't emit prolog/epilog code or spill/restore code for callee saved regs
* Use new allocation_order_begin/end iterators to simplify dramatically the
  logic for picking registers to allocate
* Machine PHI nodes can no longer contain constant arguments

llvm-svn: 5195
2002-12-28 20:40:43 +00:00
Chris Lattner fd1ecadb1d * Add printing support for FrameIndex operands
llvm-svn: 5194
2002-12-28 20:37:37 +00:00
Chris Lattner 32525647e1 * A bunch of functionality and data was removed from MachineFunction and put
into a new MachineFunctionInfo class
* Implement new FunctionFrameInfo class

llvm-svn: 5193
2002-12-28 20:37:16 +00:00
Chris Lattner 0733616ec7 Frame info moved out of MachineFunction into a seperate object
llvm-svn: 5192
2002-12-28 20:35:34 +00:00
Chris Lattner 0ccedc254c Eliminate unneccesary file
llvm-svn: 5191
2002-12-28 20:34:47 +00:00
Chris Lattner d2577010d5 Capture more information in ctor
llvm-svn: 5190
2002-12-28 20:34:18 +00:00
Chris Lattner 362b26c37e Implement the TargetFrameInfo interface
llvm-svn: 5189
2002-12-28 20:33:52 +00:00
Chris Lattner 9a81e69439 * Initialize new FrameInfo member
* most pass ctors no longer take TM arguments
* New prolog/epilog insertion pass

llvm-svn: 5188
2002-12-28 20:33:32 +00:00
Chris Lattner e6fb194716 Changes to match new MRegisterInfo api
llvm-svn: 5187
2002-12-28 20:32:54 +00:00
Chris Lattner 1d79b4ce86 *** Implement frame pointer elimination on X86!
* Include contents of X86RegisterClasses.cpp into here
* Adjustments to register api to work with new frame manager
* Eliminate moveImm2Reg, getFramePointer, and getStackPointer
* Cleanup and simplify prolog/epilog code generation
* Prolog/epilog are MUCH more efficient now.

llvm-svn: 5186
2002-12-28 20:32:28 +00:00