Commit Graph

2397 Commits

Author SHA1 Message Date
Misha Brukman
9c661c8e26 Do not set the `link' bit when branching to the first BB of a function, as it
will cause an infinite loop.  The link bit is only used for calling functions.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14466 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-28 17:57:40 +00:00
Misha Brukman
bb4a90820c Fix spacing around function arguments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14463 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-28 15:53:27 +00:00
Brian Gaeke
6bd5551763 Allow saving and restoring of double and float registers.
Allow copying of float registers.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14445 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-27 22:59:56 +00:00
Brian Gaeke
c53105c749 Add FITOS, FITOD, and F{ADD,SUB,MUL,DIV}{S,D}.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14444 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-27 22:53:56 +00:00
Brian Gaeke
8a0ae9e9ca Support printing constant pool indices.
If we see an "unknown operand", abort so it's easier to fix it.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14441 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-27 22:50:44 +00:00
Brian Gaeke
ec3227fe39 Trim whitespace.
Support cast of ints (and narrower) to float and double.
Support cast double to double (using load and store).
Abort if we see a CallInst or SetCondInst with long/fp args, instead
of producing bad code.
Support add, sub, mul, div of float and double.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14440 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-27 22:47:33 +00:00
Chris Lattner
ea104df2b1 This class is no longer an annotation
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14437 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-27 18:50:49 +00:00
Chris Lattner
4aa5b2affb Add a map of MachineCodeForInstruction objects to MachineFunctionInfo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14436 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-27 18:50:30 +00:00
Chris Lattner
159286d60d Make it obvious that this file is bad bad bad
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14432 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-27 18:21:20 +00:00
Chris Lattner
098648af6a There is no reason to print ValueType here
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14425 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-26 19:36:34 +00:00
Misha Brukman
34fa8714a4 Allow debugging machine instrs (by printout) before/after isel and regalloc
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14416 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-25 19:57:47 +00:00
Misha Brukman
c6cc10f48f Combine several if stmts with returns into an if-then-elseif-else chain.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14414 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-25 19:24:52 +00:00
Misha Brukman
d47bbf7ce5 Do not move any values into registers for a void return (there isn't anything).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14413 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-25 19:04:27 +00:00
Misha Brukman
1cbb3ee75f Convert tabs to spaces.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14412 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-25 18:45:07 +00:00
Misha Brukman
972569a22f Fix opcode: no immediate in an `or r1, r2, r3' (all registers) instr.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14411 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-25 18:36:53 +00:00
Misha Brukman
2bf183c092 * Be consistent about MachineBB labels and references to them in instr stream
* Use MachineBB's built-in numbering system instead of reinventing one


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14408 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-25 15:42:10 +00:00
Misha Brukman
22e12076e9 * Initialize the entire array statically, not member-at-a-time
* Remove x86-specific comment re: intel vs. at&t assembly syntax


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14406 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-25 15:11:34 +00:00
Misha Brukman
9ecf3bf708 Fix bug in previous checkin.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14405 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-25 14:57:19 +00:00
Misha Brukman
911afde4ae * Wrap long lines
* Replace silent fall-through FIXME comments with an error to cerr and an abort
* No need to set size of statically initialized arrays


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14404 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-25 14:50:41 +00:00
Misha Brukman
179d97cfa3 Excise X86-specific comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14403 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-25 14:13:26 +00:00
Tanya Lattner
b140762a45 Made a fix so that you can print out MachineInstrs that belong to a 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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14389 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-25 00:13:11 +00:00
Misha Brukman
75afe1f904 Add option to print out machine code before register allocation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14387 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-24 23:55:01 +00:00
Misha Brukman
f3e50bea06 Use DEBUG() guard for printing out debug info.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14386 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-24 23:54:05 +00:00
Misha Brukman
e327e49913 Add a `break' in the switch/case statement between the int/fp sections.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14385 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-24 23:53:24 +00:00
Misha Brukman
7f484a5fff * Lowercase the register names
* Parenthesize assert() expressions correctly
* Fix spacing around for() and if() statements


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14384 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-24 23:51:00 +00:00
Misha Brukman
f54ef97abc * LowercaseString moved to StringExtras.h
* Wrap long line to 80 cols


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14382 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-24 23:38:20 +00:00
Misha Brukman
ca428df792 * Tabs to spaces
* Send an error message to std::cerr before abort()ing


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14381 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-24 23:19:36 +00:00
Misha Brukman
46fd00aec6 * Tabs to spaces
* Remove unnecessary parens, braces, clean up code layout


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14379 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-24 23:04:11 +00:00
Misha Brukman
fadb82f920 Unindent some more code to be consistent.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14377 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-24 22:00:15 +00:00
Misha Brukman
1916bf9427 Unindent some code, it only needs 2 spaces.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14376 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-24 21:56:15 +00:00
Misha Brukman
98649d1796 In emitting code for a GEP instr, iterate over GEPTypes because there is one
more operand in GEPOps than there are types in GEPTypes: the pointer that is the
first operand of the GEP instruction.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14375 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-24 21:54:47 +00:00
Brian Gaeke
57ff2e3ee7 Add FSTOD and FDTOS conversion instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14372 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-24 21:22:09 +00:00
Brian Gaeke
495a0974f4 Support cast float to float, cast double to float, and cast float to double.
(It's not yet clear how to copy doubles from register to register.)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14371 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-24 21:22:08 +00:00
Misha Brukman
05794498d9 * Order #includes
* Use the DEBUG() guard for debug printouts


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14367 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-24 17:31:42 +00:00
Brian Gaeke
60c73e4f23 Make the double-fp pseudo registers be "NamedRegs".
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14366 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-24 09:23:21 +00:00
Brian Gaeke
13dc433df3 Fix a dyn_cast in copyConstantToRegister which should have been a cast.
Compactify the code that emits copies of constant ints into registers.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14365 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-24 09:17:47 +00:00
Brian Gaeke
be81e82afc The long integer pseudo-regs are history. So long, we hardly knew ye.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14364 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-24 08:55:21 +00:00
Brian Gaeke
c7fd0f4675 Use correct add*Imm form in more BuildMI calls.
Fix bug in emitGEPOperation where we weren't passing MBB, IP to getReg.
(hey, wouldn't a constant expression lowering pass be cool? huh huhuhuh)
Fix bug in emitGEPOperation where we might try to OR a constant into a
register which was too big to fit in the immediate field.
Support and, or, xor of longs.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14363 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-24 08:55:09 +00:00
Brian Gaeke
af0492ea52 Rename the load and store opcodes. The non-fp ones only have one
variant worth worrying about; the fp ones have two.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14362 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-24 07:37:12 +00:00
Brian Gaeke
e7f9e0b539 Rename the load and store opcodes. The non-fp ones only have one
variant worth worrying about; the fp ones have two.
Add fp stores.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14361 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-24 07:36:59 +00:00
Brian Gaeke
4473303453 Rename the load and store opcodes. The non-fp ones only have one
variant worth worrying about; the fp ones have two.
Stub out the case analysis of int-to-fp casts (no code yet).
I think the number of operands passed to BuildMI for loads was wrong.
Support load and store of float and double.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14360 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-24 07:36:48 +00:00
Brian Gaeke
7548a540f7 Strange as it may sound, we'll not use LDD/STD to store longs. For reasons of
representational consistency, we want to address the halves of each 64-bit value
separately.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14356 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-24 06:44:57 +00:00
Brian Gaeke
00e514ea6a Support constant cast expressions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14355 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-24 06:33:00 +00:00
Brian Gaeke
a846b729e4 Make the most commonly preselected instructions add to the names of the
instructions they augment, instead of replacing them.  It's good for debugging,
and it's OK for the sparcv9 backend.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14353 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-23 21:41:32 +00:00
Brian Gaeke
f54d912e32 Add pseudo-registers and register class for 64-bit integer values.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14332 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-22 20:14:41 +00:00
Misha Brukman
0280aa9795 Order #includes as per style guide.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14305 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-21 21:54:40 +00:00
Misha Brukman
f90e402af8 Direct declaration of namespace-ified globals does not work, must enclose
them with a namespace declaration.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14303 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-21 21:44:12 +00:00
Misha Brukman
53594deff4 Specify variables' namespace directly instead of using an enclosing namespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14302 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-21 21:21:49 +00:00
Misha Brukman
e67d5fb6fd Move implemented interface header up to the top.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14301 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-21 21:20:23 +00:00
Misha Brukman
3d357441bf Spell out `NoFramePointerElim'.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14300 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-21 21:18:48 +00:00