Commit Graph

5098 Commits

Author SHA1 Message Date
Chris Lattner dc451c6d27 Implicit defs/uses list may be empty.
llvm-svn: 5103
2002-12-18 01:11:14 +00:00
Chris Lattner b54343a64f Add comments, switch uses/defs to match InstrInfo.def file
llvm-svn: 5102
2002-12-18 01:05:54 +00:00
Chris Lattner fc9af85395 Add reg clobber list for direct calls
Represent empty use/def list as a null pointer

llvm-svn: 5101
2002-12-18 01:05:31 +00:00
Chris Lattner 5629397d28 Simplify interface to remove virtual function references
llvm-svn: 5100
2002-12-17 04:20:39 +00:00
Chris Lattner ac5f3b3ed3 Use new reginfo interface
llvm-svn: 5099
2002-12-17 04:19:40 +00:00
Chris Lattner 4cb8af96b3 Update to use new interface for register info
llvm-svn: 5098
2002-12-17 04:19:17 +00:00
Chris Lattner 0eece84186 New file
llvm-svn: 5097
2002-12-17 04:03:08 +00:00
Chris Lattner 0ea32b8dd3 Add prolog/epilog spills/reloads to counters
Move X86 specific alignment gunk to X86 files

llvm-svn: 5096
2002-12-17 03:16:10 +00:00
Chris Lattner eaf58b03b2 Round number of bytes allocated on the stack up to a multiple of 4 so that the
stack remains aligned

llvm-svn: 5095
2002-12-17 03:15:26 +00:00
Chris Lattner d9c6f2a6d3 Local register allocator is now stable enough for use, it passes all tests
llvm-svn: 5094
2002-12-17 02:51:15 +00:00
Chris Lattner 4664bd5798 Fix many bugs, regallocator now saves callee-save registers instead of target
llvm-svn: 5093
2002-12-17 02:50:10 +00:00
Chris Lattner 5afbc4c387 Register allocator is responsible for spilling callee saved regs
llvm-svn: 5092
2002-12-17 02:48:57 +00:00
Chris Lattner 0a9aed1a1b Make testcase return 0 on success
llvm-svn: 5091
2002-12-17 02:02:01 +00:00
Chris Lattner 2e6f17f136 Build add instructions of the correct form!
llvm-svn: 5090
2002-12-16 23:36:57 +00:00
Chris Lattner 4377c67bc6 Add dummy implementation of __main
llvm-svn: 5089
2002-12-16 23:31:48 +00:00
Chris Lattner e92fb346d3 Two fixes:
* Only load incoming arguments into virtual registers once at the
    beginning of the function
  * Assign different virtual registers to each reference to constants/globals

llvm-svn: 5088
2002-12-16 22:54:46 +00:00
Chris Lattner c87fcde854 Fix prolog/epilog in the presence of alloca
llvm-svn: 5087
2002-12-16 22:29:30 +00:00
Chris Lattner e92f1bb011 Make sure stack manipulation refers to ESP the right number of times
llvm-svn: 5086
2002-12-16 22:29:06 +00:00
Chris Lattner 89645751ba New testcase for printing out arguments
llvm-svn: 5085
2002-12-16 20:09:54 +00:00
Chris Lattner 5c59014a1b Add some special cases to make common getelementptr cases easier to read/faster
llvm-svn: 5084
2002-12-16 19:32:50 +00:00
Chris Lattner 6b5ca53493 Finish implementation of alias list impl
llvm-svn: 5083
2002-12-16 19:31:48 +00:00
Chris Lattner 0129b86d55 * Fix a gross X86 hack that was intended to avoid allocating SP and BP
* Implement register alias set support

llvm-svn: 5082
2002-12-16 17:44:42 +00:00
Chris Lattner 1d84f0a461 Keep the stack frame aligned.
llvm-svn: 5081
2002-12-16 17:42:40 +00:00
Chris Lattner b74c150efc Add support for register alias set description
llvm-svn: 5080
2002-12-16 16:39:14 +00:00
Chris Lattner e0c25aaf99 Add mechanism to select register allocator to use
llvm-svn: 5079
2002-12-16 16:15:51 +00:00
Chris Lattner 101b8cd9b6 Initial checkin of "local" register allocator. Bugs are still present.
llvm-svn: 5078
2002-12-16 16:15:28 +00:00
Chris Lattner d44d25323d Try #2 to get alias set stuff to work
llvm-svn: 5077
2002-12-16 16:14:51 +00:00
Chris Lattner 9b83781030 Add comments
llvm-svn: 5076
2002-12-16 15:57:44 +00:00
Chris Lattner 36d6f4a303 Add info about register aliases, add prototype for createLocalRegisterAllocator
llvm-svn: 5075
2002-12-16 15:55:51 +00:00
Chris Lattner 4cf76c23e8 Add info about register file aliasing
llvm-svn: 5074
2002-12-16 15:55:25 +00:00
Chris Lattner 855b784523 Add information about register file aliasing
llvm-svn: 5073
2002-12-16 15:54:59 +00:00
Chris Lattner e5bbc24516 Add call clobber info
llvm-svn: 5072
2002-12-16 15:54:42 +00:00
Chris Lattner 0b9f0b5faf Rename createSimpleX86RegisterAllocator to createSimpleRegisterAllocator
llvm-svn: 5071
2002-12-16 14:38:13 +00:00
Chris Lattner c63d63a7c7 Rename createSimpleX86RegisterAllocator to createSimpleRegisterAllocator.
Remvoe some dead code

llvm-svn: 5070
2002-12-16 14:37:00 +00:00
Brian Gaeke 6ebe959530 brg
Fix some bugs in use of MBB vs. BB and iterators that are invalidated before
we use them.

Reference targetClass by enum name, not by number.

llvm-svn: 5069
2002-12-16 04:23:29 +00:00
Vikram S. Adve 879874e602 Use -Wl,-x instead of -s: it is more portable, and in particular,
is needed on BSD (MacOS).
Also, use -Ldir instead of -L dir on the link line.  Same reason...

llvm-svn: 5068
2002-12-16 01:31:18 +00:00
Chris Lattner bc1e6700eb Some simpliciations to the spill/reload interface
llvm-svn: 5067
2002-12-15 23:01:26 +00:00
Chris Lattner 4e560ee65b Simplify PHI node elimination significantly by doing it as a prepass to
register allocation

llvm-svn: 5066
2002-12-15 22:39:53 +00:00
Chris Lattner 3c1b59ca59 Correct the setting of Def flags on registers that are modified!
llvm-svn: 5065
2002-12-15 22:38:47 +00:00
Chris Lattner 292083aaf5 Variety of small or trivial simplifications to the code, completely eliminated
the dependence on PhysRegClassMap

llvm-svn: 5064
2002-12-15 22:19:19 +00:00
Chris Lattner 050d0ce094 Export well known instruction opcodes usable by target independant passes
llvm-svn: 5063
2002-12-15 22:16:08 +00:00
Chris Lattner 432447fed1 Add new opIsUse method
llvm-svn: 5062
2002-12-15 22:05:02 +00:00
Chris Lattner 2af545d034 Remove unused savePhysRegToStack method
llvm-svn: 5061
2002-12-15 21:33:51 +00:00
Chris Lattner ed594b6b20 Localize a map, remove another
llvm-svn: 5060
2002-12-15 21:24:30 +00:00
Chris Lattner d06650ade1 Give passes nice names!
llvm-svn: 5059
2002-12-15 21:13:40 +00:00
Chris Lattner 1499e5a92c Give simple reg allocator a nice Pass Name
llvm-svn: 5058
2002-12-15 21:13:12 +00:00
Chris Lattner 2979a85984 Add a big assert making sure 2 address instructions are formed right
llvm-svn: 5057
2002-12-15 21:02:20 +00:00
Chris Lattner 22213f0027 Add new testcase for repeated preds
llvm-svn: 5056
2002-12-15 20:52:08 +00:00
Chris Lattner 02e835bf9a Fix a problem that occurs when PHI nodes have multiple entries for the same predecessor
llvm-svn: 5055
2002-12-15 20:48:03 +00:00
Chris Lattner dfa238f665 Grab bag of minor cleanups. Export some statistics about the number of
spills and reloads emitted

llvm-svn: 5054
2002-12-15 20:36:09 +00:00