1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 19:42:54 +02:00
Commit Graph

1498 Commits

Author SHA1 Message Date
Misha Brukman
8e2f8de3c3 Moved definition of invertPPCBranchOpcode() into PowerPCInstrInfo class.
Patch by Nate Begeman.

llvm-svn: 15281
2004-07-27 18:34:11 +00:00
Misha Brukman
0fe1f5d880 Add PowerPCBranchSelector to discover which are `long' branches.
Contributed by Nate Begeman.

llvm-svn: 15280
2004-07-27 18:33:06 +00:00
Misha Brukman
c22bbdd36d Fixed saving/restoring LR unconditionally, only done as necessary.
llvm-svn: 15275
2004-07-27 17:17:48 +00:00
Misha Brukman
adb86dba29 Save and restore LR just like any other register and ONLY if we actually modify
it (due to calls or globals access).  We now compile `void empty(){}' to `blr'.

llvm-svn: 15274
2004-07-27 17:17:18 +00:00
Misha Brukman
6fec7336fe LR is a 32-bit int reg
llvm-svn: 15273
2004-07-27 17:15:32 +00:00
Misha Brukman
93b0ea58a2 MovePCtoLR (which is `bl' in disguise) modifies LR implicitly
llvm-svn: 15272
2004-07-27 17:15:05 +00:00
Misha Brukman
4be6841bc0 Register LR is callee-saved
llvm-svn: 15271
2004-07-27 17:14:34 +00:00
Misha Brukman
a3ac216fce Add IMPLICIT_DEF of LR for branch-and-link instrs (calls and global accesses)
llvm-svn: 15270
2004-07-27 17:13:58 +00:00
Misha Brukman
6272268028 Do not store the stack pointer if the stack size is 0.
Also, convert C-style comments to C++ and make sure code wraps at 80 cols.

llvm-svn: 15245
2004-07-26 22:00:26 +00:00
Misha Brukman
a979e8a08a ADDI can take several forms, including:
addi r1, r2, 0
  addi r1, <frame index #n>, 0

so we must check for the second parameter being a register for this instruction
to be considered a reg-to-reg copy.

llvm-svn: 15244
2004-07-26 21:50:38 +00:00
Misha Brukman
a2cf775362 assert() on MachineInstr properties instead of checking them dynamically
llvm-svn: 15243
2004-07-26 21:35:58 +00:00
Misha Brukman
73687cfcc6 * Recognize `addi r1, r2, 0' a move instruction
* List formats of instructions currently recognized as moves

llvm-svn: 15242
2004-07-26 21:29:00 +00:00
Misha Brukman
288289f9a7 * Rewrote casts
* Implemented GEP folding
* Dynamically output global address stuff once per function
* Fix casting fp<->short/byte

Patch contributed by Nate Begeman.

llvm-svn: 15237
2004-07-26 18:13:24 +00:00
Misha Brukman
bf2ad22ff6 Increment the label number in runOnFunction() rather than while printing out
some instruction.  Patch by Nate Begeman.

llvm-svn: 15236
2004-07-26 16:28:33 +00:00
Misha Brukman
796cc48f99 More notes on bugs, unimplemented features, and suggested code improvements.
Written by Nate Begeman.

llvm-svn: 15235
2004-07-26 16:23:55 +00:00
Misha Brukman
29efda2e6b Fix subtracting values > 2^15 in the prologue/epilogue, by Nate Begeman.
llvm-svn: 15234
2004-07-26 16:22:52 +00:00
Misha Brukman
c1e23e1939 Running list of bugs, unimplemented features, currently broken tests, until we
have a nightly tester set up for PowerPC.

llvm-svn: 15147
2004-07-23 22:37:22 +00:00
Misha Brukman
c7291558eb Eliminate spurious empty space; make code easier to page through.
llvm-svn: 15146
2004-07-23 22:35:49 +00:00
Misha Brukman
eaac0bbed7 Simplify boolean test.
llvm-svn: 15145
2004-07-23 21:43:26 +00:00
Misha Brukman
a899694208 Implement casting a floating point to 32-bit unsigned value
llvm-svn: 15143
2004-07-23 20:32:59 +00:00
Misha Brukman
ef73e28236 * Codegen of GEPs dramatically improved by folding multiplies and adds
* Function pointers implemented correctly using appropriate stubs

Contributed by Nate Begeman.

llvm-svn: 15133
2004-07-23 16:08:20 +00:00
Misha Brukman
2ad2adf8cb Bool alignment on MacOSX/PowerPC is 4 bytes.
llvm-svn: 15122
2004-07-23 01:11:46 +00:00
Misha Brukman
3f338d98a6 * Change class of BoolTy back to cInt
* Fix indentation back to 2 spaces

llvm-svn: 15121
2004-07-23 01:11:19 +00:00
Misha Brukman
1109566c8d * Change bool from cInt to cByte (for now)
* Don't allow negative immediates to users of unsigned immediates
* Fix long compares
* Support <const int>, op as a potential immediate candidate
* Fix sign extension of short and byte loads
* Fix and improve integer casts
* Fix passing of doubles as vararg functions

Patch contributed by Nate Begeman.

llvm-svn: 15109
2004-07-22 15:58:04 +00:00
Misha Brukman
28e92a3fde * Add the lost fix to define the second reg of a 2-reg representation of longs
* Fix opcode RLWNM -> RLWINM since it uses an immediate const shift value

llvm-svn: 15087
2004-07-21 20:30:18 +00:00
Misha Brukman
9543849102 * Speed up canUseAsImmediateForOpcode() by comparing Operand before
dyn_cast<>ing and checking Constant's value
* Convert tabs to spaces

llvm-svn: 15086
2004-07-21 20:22:06 +00:00
Misha Brukman
7507403c2b * Fix printing of signed immediate values (Nate Begeman)
* Fix printing of `zeroinitializer'
* Fix printing of `linkonce' globals, complete with stubs

llvm-svn: 15084
2004-07-21 20:11:11 +00:00
Misha Brukman
64f203922d * Fix printing of signed immediate values
* Generation of opcodes that take 16 bit immediates
* Rewrote multiply to be correct for 64 bit values
* Rewrote all the long handling to be correct for PowerPC
* Fix visitSelectInst() to define the upper register of the pair of regs
  representing a long value

Patch contributed by Nate Begeman.

llvm-svn: 15083
2004-07-21 20:09:08 +00:00
Misha Brukman
752584b520 Use addSImm() instead of addImm() for stack offsets, which may be negative.
llvm-svn: 15081
2004-07-21 19:36:57 +00:00
Misha Brukman
3d395cbda3 Add SUBI instruction
llvm-svn: 15077
2004-07-21 15:53:04 +00:00
Misha Brukman
3e3d141a92 Shorts are aligned to 2 bytes, bools to 1 byte (in structs).
llvm-svn: 15048
2004-07-20 20:59:57 +00:00
Misha Brukman
6283677946 Treat external variables similarly to those with weak linkage: load indirect.
llvm-svn: 15047
2004-07-20 20:43:05 +00:00
Misha Brukman
f47940855d Differentiate between global and weak symbol loads
llvm-svn: 15037
2004-07-20 15:52:25 +00:00
Misha Brukman
fe769110a0 * Differentiate between global and weak symbol loads
* Fix functions that take more than 32 bytes of args
* Alignment of doubles in structs is 4 bytes, not 8
* Fix passing long args: rN = hi, rN+1 = lo
* Rewrite signed divide
* Rewrite Intrinsic::returnaddress

Patch courtesy of Nate Begeman.

llvm-svn: 15036
2004-07-20 15:51:37 +00:00
Misha Brukman
5b5aff390a Differentiate between global and weak symbol loads
llvm-svn: 15035
2004-07-20 15:45:27 +00:00
Misha Brukman
1942534307 Double alignment in structs is 4 bytes, not 8. Patch by Nate Begeman.
llvm-svn: 15034
2004-07-20 15:43:25 +00:00
Misha Brukman
0a12f91274 Fix stack frame layout in prologue/epilogue. Patch courtesy of Nate Begeman.
llvm-svn: 15026
2004-07-20 02:23:09 +00:00
Misha Brukman
6baf9045f6 Move handing of GlobalValues from getReg() to copyConstantToRegister(), this
will avoid extra register-to-register copies.  Thanks to Chris for the idea.

llvm-svn: 15019
2004-07-20 00:59:38 +00:00
Misha Brukman
bec77933fa * Fn args passed in registers are now recorded as used by the call instruction
`-> asm printer updated to not print out those registers with the call instr

All of Shootout tests now work.  Great thanks to Nate Begeman for the patch!

llvm-svn: 15015
2004-07-20 00:42:19 +00:00
Misha Brukman
fdc633a29b * cFP class split into cFP32 and cFP64
* Fn args passed in registers are now recorded as used by the call instruction
`-> asm printer updated to not print out those registers with the call instr
* Stack frame layout in prolog/epilog fixed, spills and vararg fns now work
* float/double to signed int codegen now correct
* various single precision float codegen bugs fixed
* const integer multiply codegen fixed
* select and setcc blocks inserted into the correct place in machine CFG
* load of integer constant code optimized

All of Shootout tests now work.  Great thanks to Nate Begeman for the patch!

llvm-svn: 15014
2004-07-20 00:41:46 +00:00
Chris Lattner
8eb32809bc Fix infinite loop
llvm-svn: 14971
2004-07-18 18:45:01 +00:00
Chris Lattner
c62e642a1a CPR Fixes
llvm-svn: 14961
2004-07-18 07:29:35 +00:00
Misha Brukman
c52cf4db44 We don't really need to #include IPO.h into this file.
llvm-svn: 14911
2004-07-17 18:37:46 +00:00
Misha Brukman
36bf6aa37c * Use LI(S) to copy constants into registers intead of ADDI(S) as the latter is
a funky way to "use" R0 for a 0-valued operand
* Add IMPLICIT_DEFs for incoming function arguments via registers to help the
  register allocator not clobber those registers
* Implement comparisons with longs
* Teach emitSelectOperation() to fold the SetCC operation

Patch contributed by Nate Begeman

llvm-svn: 14901
2004-07-16 21:06:24 +00:00
Misha Brukman
3a720bbeaa * Store all non-volatile int registers R13-31 on the stack, restore on exit
* Fix comment formatting

llvm-svn: 14900
2004-07-16 20:55:20 +00:00
Misha Brukman
2fd8a66d40 Fix code formatting
llvm-svn: 14899
2004-07-16 20:54:25 +00:00
Misha Brukman
d2ddc81a25 Implement PowerPCInstrInfo::isMoveInstr(), patch by Nate Begeman
llvm-svn: 14898
2004-07-16 20:51:55 +00:00
Misha Brukman
2bfd750278 Add prototype for TargetInstrInfo::isMoveInstr()
llvm-svn: 14897
2004-07-16 20:50:55 +00:00
Misha Brukman
468900296b * Enable allocation of registers r2-r10
* Allocate registers 13-31 backwards (to be able to store them all at once)

llvm-svn: 14896
2004-07-16 20:35:20 +00:00
Misha Brukman
f93e5532d5 Add IMPLICIT_DEFS pseudo-instruction; patch by: Nate Begeman
llvm-svn: 14895
2004-07-16 20:33:41 +00:00
Misha Brukman
4b944fcdf9 The generated instruction selector isn't (yet) functional
llvm-svn: 14894
2004-07-16 20:31:13 +00:00
Misha Brukman
c3c9dc04ac * Output non-lazy linking stubs for external global variables
* Get rid of dead and #if 0'd code
* Minor for loop speed-up: save end iterator instead of querying every time

llvm-svn: 14893
2004-07-16 20:29:04 +00:00
Misha Brukman
0d35548f37 Define double alignment as 8 bytes now that assert(DoubleAlignment == PointerSize)
has been eliminated

llvm-svn: 14891
2004-07-16 19:32:12 +00:00
Misha Brukman
0a92212542 * Add spaces between words and numbers in comments printed out for longs/floats
* Print out IMPLICIT_DEFS as comments in the assembly, patch by Nate Begeman

llvm-svn: 14890
2004-07-16 19:01:13 +00:00
Brian Gaeke
53dc31efcd Do IMPLICIT_DEFs on incoming args' hard regs, to avoid confusing the regalloc.
Support single-fp incoming args.
Support single-fp outgoing args ('call' operands).
Support double-fp return values.

llvm-svn: 14880
2004-07-16 10:31:25 +00:00
Chris Lattner
60fb3d60a8 The powerpc is now gone. However it is now just known as the Skeleton target.
llvm-svn: 14877
2004-07-16 07:14:34 +00:00
Chris Lattner
b9ec0b791c Revert stuff that I didn't mean to checkin
llvm-svn: 14844
2004-07-15 02:33:38 +00:00
Chris Lattner
c4888ccda7 Patches towards fixing PR341
llvm-svn: 14841
2004-07-15 02:14:30 +00:00
Misha Brukman
d6a9646f29 Make sure MTSPR instruction is inserted into the BasicBlock
llvm-svn: 14822
2004-07-14 18:26:31 +00:00
Misha Brukman
0f42826f30 Don't define the same register twice when loading a ConstantPointerRef to a reg
llvm-svn: 14819
2004-07-14 17:57:04 +00:00
Misha Brukman
73d729838f * Fix multiplication by powers of two and otherwise
* Clarify variable name (StoreInst SI instead of LI)

llvm-svn: 14818
2004-07-14 15:29:51 +00:00
Misha Brukman
79b089abff * Specify that FP arith options have 3 operands
* Correctly load FP constants from the constant pool, should be refactored

llvm-svn: 14799
2004-07-13 15:35:45 +00:00
Misha Brukman
449715a57d Correctly load FP constants out of the constant pool.
llvm-svn: 14782
2004-07-12 23:49:47 +00:00
Misha Brukman
b7f3d7b04b Implement getModuleMatchQuality and getJITMatchQuality() for PowerPC
llvm-svn: 14780
2004-07-12 23:36:12 +00:00
Chris Lattner
773f2d65c2 Delete the allocate*TargetMachine function, which is now dead.
The shared command line options are now in a header that makes sense.

llvm-svn: 14757
2004-07-11 04:17:58 +00:00
Chris Lattner
6331eb6bbe Delete the allocate*TargetMachine function, which is now dead .
The shared command line options are now in a header that makes sense.

llvm-svn: 14756
2004-07-11 04:17:10 +00:00
Chris Lattner
b67e3b01bc Make these format a bit nicer
llvm-svn: 14747
2004-07-11 03:27:42 +00:00
Chris Lattner
2ada866a78 Auto-registrate target
llvm-svn: 14745
2004-07-11 02:48:49 +00:00
Chris Lattner
164659f141 Add compilability
llvm-svn: 14744
2004-07-11 02:48:28 +00:00
Misha Brukman
f8f753f04b * Add support for indexing into structures, thanks to Chris (x86)
The large diff is because of indentation of a whole region
* Fix querying predecessor blocks in SelectPHINodes(), thanks to Brian (v8)
* Add support for external functions malloc() and free()
* Fix some code indentation

Remember, kids: It's not plagiarism if you "creatively borrow" from your
sources.  It's called "research"!

llvm-svn: 14723
2004-07-09 15:45:07 +00:00
Misha Brukman
1881beb0b3 Read/write the offset value for stack-relative loads via correct instr operand.
llvm-svn: 14722
2004-07-09 15:37:16 +00:00
Misha Brukman
b83ace891d Add support for __fixdfdi(), __floatdisf(), and __floatdidf() external functions
llvm-svn: 14703
2004-07-08 19:41:16 +00:00
Misha Brukman
db4cddea8d * Use several Function* for external functions instead of a std::map
* Non-const FP values must be loaded into int regs (for vararg fns) via memory

llvm-svn: 14701
2004-07-08 18:27:59 +00:00
Misha Brukman
869f2b7219 * Add support for loading FP constants from the constant pool
* Load FP values into int regs as well for vararg functions; without memory ops!

llvm-svn: 14700
2004-07-08 18:02:38 +00:00
Misha Brukman
3bbd3cd1de * Fix header comment, excise references to X86
* Add suport for printing out references to constant pool indices

llvm-svn: 14699
2004-07-08 17:58:04 +00:00
Misha Brukman
93b47cc963 * Use a map for caching lookups to external functions (fp div/rem)
* Tabs to spaces

llvm-svn: 14673
2004-07-07 20:07:22 +00:00
Misha Brukman
f2473e6267 * Wrap long lines (comments and code)
* Tabs to spaces

llvm-svn: 14672
2004-07-07 20:01:36 +00:00
Misha Brukman
d5a439760c Add fmod() to the Module being compiled so that it gets a stub in the asm file
llvm-svn: 14670
2004-07-07 15:36:18 +00:00
Misha Brukman
ef78244e72 * Add support for calling vararg functions (must pass doubles in int regs too)
* Make visitSetCondInst() share condition-generating code with EmitComparison()
* There are 13 FPRs for function-passing arguments, not 8
* Do not rely on registers being sequential, use an array lookup
* In unimplemented switch cases, send an error and abort instead of silent
  fall-through
* Add doInitialization() for adding function prototypes for external math fns
* Minor changes: fix indentation, spacing, code clarity

llvm-svn: 14653
2004-07-06 22:51:53 +00:00
Misha Brukman
4543cea6ae Use the more compact bl' instead of cryptic (but equivalent) bcl 20,31'
llvm-svn: 14652
2004-07-06 22:40:34 +00:00
Misha Brukman
0b6de12a84 * Add utility functions: convert SetCC => PPC opcode and invert PPC opcode
* If SetCondInst is folded into BranchInst (and it is the only user), do not
  emit code for SetCondInst
* Fix assembly opcodes in comments in visitSetCondInst()
* Fix codegen of conditional branches

llvm-svn: 14643
2004-07-06 15:32:44 +00:00
Misha Brukman
607dd868a8 Add FIXME notes for spilling int/fp regs (need to calculate stack space).
llvm-svn: 14581
2004-07-02 17:54:38 +00:00
Chris Lattner
a99a36881f Fix all of those problems that the PPC backend has running 176.gcc :)
llvm-svn: 14565
2004-07-02 05:48:42 +00:00
Misha Brukman
c9ecaeb69d * Follow the PowerPC convention of leaving 24 bytes for linking on the stack.
* Also leave space for spilling integer registers (this should be calculated)

llvm-svn: 14554
2004-07-01 21:35:00 +00:00
Misha Brukman
f5deab6100 * Get rid of constant-expr handling code: we use the ConstantExpr lowering pass
* Use the SetCC handling code in the format of Brian's V8
* Add FIXMEs where calls to functions are being made without adding them to the
  Module first... they cause missing symbols at assembly-time.

llvm-svn: 14553
2004-07-01 21:34:10 +00:00
Misha Brukman
1546c2e9c0 Wrap long line
llvm-svn: 14552
2004-07-01 21:27:59 +00:00
Misha Brukman
e409874a9f * Do not allocate r0 as we use it indiscriminantly in the instr selector.
* Do not define CR register class because we don't (yet) have the i4 type

llvm-svn: 14551
2004-07-01 21:24:50 +00:00
Misha Brukman
b296163bb1 Check if operand has an allocated reg before requesting it.
llvm-svn: 14550
2004-07-01 21:09:12 +00:00
Misha Brukman
efcb6b8c2c * Coalesce the handy CALL* alias opcodes with the standard ones
* Congregate more branch-and-link opcodes together
* Mark FP, CPR, and special registers as volatile across calls

llvm-svn: 14511
2004-06-30 22:00:45 +00:00
Misha Brukman
7089b3d426 * Allow more registers to be allocated from the general register pool
* Define the condition register class

llvm-svn: 14510
2004-06-30 21:54:50 +00:00
Misha Brukman
08a07e969f * Inquire about the number of operands from the instruction directly
* Only check for a register if we are sure the instruction has one allocated

llvm-svn: 14509
2004-06-30 21:54:12 +00:00
Misha Brukman
49e6aa1ba7 Always assume a function may have calls because the printer may add `bl' to get
the PC in a code sequence for global variables.

llvm-svn: 14506
2004-06-30 00:09:12 +00:00
Misha Brukman
3422760e16 * Don't save LR when outputting globals: it's already saved on the stack once
for the function
* Registers aren't necessarily sequential wrt their enums, don't rely on it
  when emitting function arguments into sequential registers
* Remove X86-specific comments about AL/BL/AH/BH/EDX/etc
* Add an abort() for an unimplemented signed right shift
* The src operand for a GEP was never emitted!  Fixed.
* We can skip zero-valued GEP indices as they are no-ops.

"Hello, World!" now works.

llvm-svn: 14505
2004-06-29 23:45:05 +00:00
Misha Brukman
e9166fd352 * Stop using BBNumbering, we don't really need it
* Only increment labelNumber once, because it's used by both Load{hi,lo}Addr
* There is no .bss section on PowerPC
* Use .align 2 instead of other random numbers

llvm-svn: 14504
2004-06-29 23:40:57 +00:00
Misha Brukman
79a92e35b4 Set up the prologue and epilogue to be more like the manual and GCC output.
llvm-svn: 14502
2004-06-29 23:38:26 +00:00
Misha Brukman
2242e8d27f * Use LA instead of LWZ for LoadLoAddr
* Specify the isCall bit and caller-save registers for some call instrs

llvm-svn: 14501
2004-06-29 23:37:36 +00:00
Misha Brukman
a0721ac147 Only allocate non-volatile registers R13-31 (for now).
llvm-svn: 14500
2004-06-29 23:35:32 +00:00
Misha Brukman
ddf07d1c08 Lower ConstantExpressions before the code generator.
llvm-svn: 14497
2004-06-29 23:33:20 +00:00
Misha Brukman
01841234e8 * Fix saving LR in function prologue
* Adjust epilogue restore sequence to match the PowerPC documentation

llvm-svn: 14480
2004-06-29 17:14:42 +00:00
Misha Brukman
08f6a46ce2 Assembly syntax/comment fixes by Nate Begeman.
llvm-svn: 14479
2004-06-29 17:13:26 +00:00
Chris Lattner
dda82ce624 The code generator should work with unreachable blocks. If not, then this
is a bug that should be fixed in the code generator, not papered over with
the simplifycfg pass.  Eliminating this makes bugpoint much more useful

llvm-svn: 14477
2004-06-29 07:20:16 +00:00
Misha Brukman
7627e1ff1a Can't print out machine code before it is constructed.
llvm-svn: 14472
2004-06-28 21:16:57 +00:00
Misha Brukman
92cc94a0e5 Fix the assembly opcode on LOADLoAddr, courtesy of Nate Begeman.
llvm-svn: 14470
2004-06-28 18:27:08 +00:00
Misha Brukman
2f7332b752 Set isBranch and isTerminator bits on all branch instructions.
llvm-svn: 14469
2004-06-28 18:23:35 +00:00
Misha Brukman
8f1e58dfe3 Fix loading and storing PC-relative static variables, courtesy of Nate Begeman.
llvm-svn: 14468
2004-06-28 18:20:59 +00:00
Misha Brukman
2eccf504e2 No need to generate a lazy-linking stub for internal functions, they can be
resolved by the static linker.

llvm-svn: 14467
2004-06-28 18:03:37 +00:00
Misha Brukman
5a52b7aa36 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.

llvm-svn: 14466
2004-06-28 17:57:40 +00:00
Misha Brukman
02ac5488d5 Fix spacing around function arguments.
llvm-svn: 14463
2004-06-28 15:53:27 +00:00
Misha Brukman
aef8fec73f Allow debugging machine instrs (by printout) before/after isel and regalloc
llvm-svn: 14416
2004-06-25 19:57:47 +00:00
Misha Brukman
64c1484679 Combine several if stmts with returns into an if-then-elseif-else chain.
llvm-svn: 14414
2004-06-25 19:24:52 +00:00
Misha Brukman
d903511cdf Do not move any values into registers for a void return (there isn't anything).
llvm-svn: 14413
2004-06-25 19:04:27 +00:00
Misha Brukman
981cf1f1b4 Convert tabs to spaces.
llvm-svn: 14412
2004-06-25 18:45:07 +00:00
Misha Brukman
8f9b970b80 Fix opcode: no immediate in an `or r1, r2, r3' (all registers) instr.
llvm-svn: 14411
2004-06-25 18:36:53 +00:00
Misha Brukman
d635cd485a * Be consistent about MachineBB labels and references to them in instr stream
* Use MachineBB's built-in numbering system instead of reinventing one

llvm-svn: 14408
2004-06-25 15:42:10 +00:00
Misha Brukman
4f15d2830a * Initialize the entire array statically, not member-at-a-time
* Remove x86-specific comment re: intel vs. at&t assembly syntax

llvm-svn: 14406
2004-06-25 15:11:34 +00:00
Misha Brukman
fb9eb50899 Fix bug in previous checkin.
llvm-svn: 14405
2004-06-25 14:57:19 +00:00
Misha Brukman
4e610581b0 * 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

llvm-svn: 14404
2004-06-25 14:50:41 +00:00
Misha Brukman
167dd03c82 Excise X86-specific comments.
llvm-svn: 14403
2004-06-25 14:13:26 +00:00
Misha Brukman
854b18fd19 Add option to print out machine code before register allocation.
llvm-svn: 14387
2004-06-24 23:55:01 +00:00
Misha Brukman
91ffab9644 Use DEBUG() guard for printing out debug info.
llvm-svn: 14386
2004-06-24 23:54:05 +00:00
Misha Brukman
1d7c31b2c1 Add a `break' in the switch/case statement between the int/fp sections.
llvm-svn: 14385
2004-06-24 23:53:24 +00:00
Misha Brukman
4e3d5069db * Lowercase the register names
* Parenthesize assert() expressions correctly
* Fix spacing around for() and if() statements

llvm-svn: 14384
2004-06-24 23:51:00 +00:00
Misha Brukman
5d0be46fb7 * Tabs to spaces
* Send an error message to std::cerr before abort()ing

llvm-svn: 14381
2004-06-24 23:19:36 +00:00
Misha Brukman
b312aa9f4b * Tabs to spaces
* Remove unnecessary parens, braces, clean up code layout

llvm-svn: 14379
2004-06-24 23:04:11 +00:00
Misha Brukman
2faa0989d0 Unindent some more code to be consistent.
llvm-svn: 14377
2004-06-24 22:00:15 +00:00
Misha Brukman
021bf53a50 Unindent some code, it only needs 2 spaces.
llvm-svn: 14376
2004-06-24 21:56:15 +00:00
Misha Brukman
ec698da314 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.

llvm-svn: 14375
2004-06-24 21:54:47 +00:00
Misha Brukman
0e076dbd7a * Order #includes
* Use the DEBUG() guard for debug printouts

llvm-svn: 14367
2004-06-24 17:31:42 +00:00
Misha Brukman
ae07b686fa Spell out `NoFramePointerElim'.
llvm-svn: 14300
2004-06-21 21:18:48 +00:00
Misha Brukman
a2ac4e4345 Use the common `NoFPElim' setting instead of our own.
llvm-svn: 14298
2004-06-21 21:10:24 +00:00
Misha Brukman
a79674d478 * Make indentation consistent at 2 chars
* Doxygenify function comments
* Wrap code at 80 cols

llvm-svn: 14295
2004-06-21 20:22:03 +00:00
Misha Brukman
4424ef9dd1 This file is no longer applicable.
llvm-svn: 14294
2004-06-21 20:17:41 +00:00
Misha Brukman
3d93b9ccca llvm/IntrinsicLowering.h => llvm/CodeGen/IntrinsicLowering.h
llvm-svn: 14292
2004-06-21 18:30:31 +00:00
Misha Brukman
36089f7034 Intrinsic::isnan has gone away, support for it commented out.
Intrinsic::isunordered has arrived, and we just use the standard lowering
pass for it.

llvm-svn: 14290
2004-06-21 17:58:36 +00:00
Misha Brukman
1c26b2e29d Convert tabs to spaces.
llvm-svn: 14289
2004-06-21 17:41:12 +00:00
Misha Brukman
30e1885192 Type::getPrimitiveID() -> getTypeID()
llvm-svn: 14288
2004-06-21 17:25:55 +00:00
Misha Brukman
76b4796e7c Type::getPrimitiveID() -> getTypeID()
llvm-svn: 14287
2004-06-21 17:19:08 +00:00
Misha Brukman
269034c151 Initial revision
llvm-svn: 14283
2004-06-21 16:55:25 +00:00
Misha Brukman
130e02f232 Add file comment.
llvm-svn: 14172
2004-06-14 15:13:59 +00:00
Chris Lattner
1f0e0d55c4 Fix the fixed stack offset, patch contributed by Vladimir Prus
llvm-svn: 14110
2004-06-10 06:19:25 +00:00
Chris Lattner
5effdb67b7 fine grainify namespacification
llvm-svn: 11959
2004-02-28 19:53:18 +00:00
Alkis Evlogimenos
e8f9647831 Add back machine code deleter pass until we get a MachineCode pass
that will be responsible for the creation of MachineFunctions and will
be required by all MachineFunctionPass passes.

llvm-svn: 11453
2004-02-15 00:03:15 +00:00
Alkis Evlogimenos
b755d35fd2 Change MachineBasicBlock's vector of MachineInstr pointers into an
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
2004-02-12 02:27:10 +00:00
Brian Gaeke
355bc299b7 Include PowerPC.h. Flesh out the stub versions of addPassesToEmitAssembly()
and addPassesToJITCompile() slightly.

llvm-svn: 11076
2004-02-02 19:06:36 +00:00
Brian Gaeke
24f70fa16d Add comments describing how you would add prototypes for factory methods for
PowerPC-specific passes here.

llvm-svn: 11073
2004-02-02 19:05:28 +00:00
Brian Gaeke
bc72431950 Add the JITInfo object, accessor & initializer.
llvm-svn: 10972
2004-01-23 06:39:30 +00:00
Brian Gaeke
2757ec5b94 Add CodeEmitter and JITInfo stubs. Dump the old
PowerPCTargetMachine::addPassesToJITCompile() method, in favor of the
TargetJITInfo interface.

llvm-svn: 10971
2004-01-23 06:35:43 +00:00
Brian Gaeke
764f1b476a Import of skeletal PowerPC backend I have had laying around for months...
llvm-svn: 10937
2004-01-21 21:13:19 +00:00