Commit Graph

355 Commits

Author SHA1 Message Date
Brian Gaeke
3d8d9f7e72 It doesn't appear that we need to #include these.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7291 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-24 17:48:53 +00:00
Brian Gaeke
b3011a01b5 Constify most methods. We could have constified doInitialization and
doFinalization too except that would have made them shadow, not override,
the parent class :-P.

Allow *any* constant cast expression between pointers and longs,
or vice-versa, or any widening (not just same-size) conversion that
isLosslesslyConvertibleTo approves. This fixes oopack.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7288 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-24 17:30:45 +00:00
Brian Gaeke
de420aee32 Printer.cpp: Ditch addRequired/getAnalysis, because they leave
Printer::doFinalization() out in the cold.  Now we pass in a TargetMachine
  to Printer's constructor and get the TargetData from the TargetMachine.
 Don't pass TargetMachine or MRegisterInfo objects around in the Printer.
 Constify TargetData references.
X86.h: Update comment and prototype of createX86CodePrinterPass().
X86TargetMachine.cpp: Update callers of createX86CodePrinterPass().


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7275 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-23 20:25:08 +00:00
Brian Gaeke
92bdfe6951 Add, rewrite, and/or reformat many comments.
Stop passing ostreams around: we already have one perfectly good ostream
and we can all share it.

Stop stashing a pointer to TargetData in the Pass object, because that will
lead to a crash if there are no functions in the module (ouch!)  Instead,
use addRequired() and getAnalysis(), like we always should have done.

Move the check for ConstantExpr up before the check for isPrimitiveType,
because we need to be able to catch e.g. ubyte (cast bool false to ubyte),
whose type is primitive but which is nevertheless a ConstantExpr, by calling
our specialized handler instead of the AsmWriter. This would result in
assembler errors when we would try to output something like ".byte (cast
bool false to ubyte)".

GC some unused variable declarations.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7265 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-23 18:37:06 +00:00
Chris Lattner
c07736a397 Simplify code by using ConstantInt::getRawValue instead of checking to see
whether the constant is signed or unsigned, then casting


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7252 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-23 15:22:26 +00:00
Brian Gaeke
d461505efd Please, save your applause^H^H^H^H^H^H^H^Hflames for the end...
Avoid a fall-through in the (stubby) treatment of the longjmp intrinsic
call which causes llc & lli to core-dump.

Add a sort-of treatment of cast double to ulong. I am not really sure
what a user should expect to see upon casting a negative FP value to
unsigned long long. But with what is given here, I was able to write
a program that could cast -123.456 to ulong and back and get -123.0,
which seems like a step in the right direction.  GCC seems to give you
0. I don't know if I'd consider that useful.

These cases were coming up in GNU coreutils-5.0.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7205 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-18 20:23:43 +00:00
Brian Gaeke
bfedb912cd Use getClassB for load and store; we don't want to abort when we
try to load or store through a bool*.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7195 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-17 21:30:06 +00:00
Brian Gaeke
0517c5ac92 If we have a constant pointer reference to a function, we were printing
out the entire llvm disassembly for the function at global constant-output
time, which caused the assembler to barf in 164.gzip. This fixes that
particular problem (though 164.gzip has other problems with X86 llc.)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7168 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-11 21:57:01 +00:00
Brian Gaeke
1aa476edf0 Fix some serious floating-point bugs (fixes test cases such as Oscar,
Fhourstones, McCat-vor, and many others...)

Printer.cpp: Print implicit uses for AddRegFrm instructions.  Break gas
bug workarounds up into separate stanzas of code for each bug.  Add new
workarounds for fild and fistp.

X86InstrInfo.def: Add O_ST0 implicit uses for more FP instrs where they
obviously apply. Also add PrintImplUses flags for FP instrs where they
are necessary for gas to understand the output.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7165 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-11 18:18:35 +00:00
Brian Gaeke
b44210d768 Insert workaround for GAS bug in assembling FLD/FSTP XWORD PTR [...]
instructions, by outputting them as bytes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7115 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-07 18:34:20 +00:00
John Criswell
7a73b80b90 Merged in autoconf branch. This provides configuration via the autoconf
system.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7014 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-30 21:59:07 +00:00
Chris Lattner
eb093fbf6f Setjmp should always return zero if we don't implement longjmp. This avoids
leaving trash in the register, fixing anagram


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7013 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-30 19:35:54 +00:00
Chris Lattner
c151e4f415 Until there is a setjmp/longjmp transformation pass, codegen setjmp as a noop
and longjmp as an abort!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6977 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-29 16:42:32 +00:00
Brian Gaeke
d7908f679e Nice tasty llc fixes. These should fix LLC for x86 for everything in
SingleSource except oopack and Oscar.  (Sorry, Oscar.)

include/llvm/Target/TargetInstrInfo.h: Remove virtual print method. Add
 accessors for ImplicitUses/Defs.
lib/Target/TargetInstrInfo.cpp: Remove virtual print method. If you
 really wanted this, just use MI->print(O, TM); instead...
lib/Target/X86:
FloatingPoint.cpp: ...like this.
X86InstrInfo.h: Remove virtual print method. Define the PrintImplUses
 target-specific flag bit.
X86InstrInfo.def: Add the PrintImplUses flag to all the instructions
 which implicitly use CL, because the assembler needs to see the CL in
 order to generate the right instruction.
Printer.cpp: Ditch fnIndex at Chris's request. Now we use CurrentFnName
  to name constants in the constant pool for each function instead. This
  avoids keeping state between runOnMachineFunction() invocations, which
  is a no-no. Having MangledGlobals be global is a bogon I'd like to get
  rid of too, but making it a static member of Printer causes link errors
  (why???).
 Make NumberForBB into a member of Printer instead of a global, too.
 Make printOp and printMemReference into methods of Printer.
 X86InstrInfo::print is now Printer::printMachineInstruction, because
  TargetInstrInfo::print is history. (Because of this, we have to qualify
  the names of some TargetInstrInfo methods we call.)
 Print out the ImplicitUses field of any instruction we print that has
  the PrintImplUses bit set.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6924 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-27 00:00:48 +00:00
Brian Gaeke
5e00157c5a Number constants from constant pool as CPIf_i where f is the function index
and i is the constant pool index.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6920 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-26 18:02:30 +00:00
Brian Gaeke
bc601fe3e7 Integrate the C writer's name mangler.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6908 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-25 22:00:39 +00:00
Brian Gaeke
01d79ff86d First draft of X86 LLC backend. This should be OK for small programs like
Shootout, but it has some issues with bigger programs. Work in progress.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6907 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-25 18:01:07 +00:00
Chris Lattner
7b52c036f4 Do not use the inefficient, fixed function, CBW, CDQ, ... instructions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6844 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-22 03:31:18 +00:00
Chris Lattner
034acf0a3d Minor simplification to 64-bit instsel
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6831 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-21 18:15:27 +00:00
Chris Lattner
0f1c461423 For 16 and 32-bit multiplies, use the IMUL instruction instead of the MUL instruction.
This allows us to not force the use of the EAX/AX registers!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6830 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-21 17:16:58 +00:00
Chris Lattner
a8cb100706 Add IMULr16 & IMULr32 instructions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6829 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-21 17:13:35 +00:00
Chris Lattner
f58544712b Generate code for LONG indexes to getelementptr instructions more efficiently
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6828 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-21 16:01:24 +00:00
Brian Gaeke
3387e7f7a2 Fix output bug: Intel asm comment character is #, not ;.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6792 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-19 19:58:32 +00:00
Brian Gaeke
088fa1162d RECAPITALIZE all the names of pseudo-instructions, and add a comment explaining
the convention.

:-)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6791 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-19 19:41:13 +00:00
Brian Gaeke
96b07e54dd Rename many instructions to their Intel asm-compatible names. This
involves removing the [bwl] suffixes from instruction names, as well
as some other distinguishing marks (32/64/80 on fp insns, _i suffixes, etc.)

Lowercase all instr. names as well for consistency's sake.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6790 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-19 19:34:44 +00:00
Brian Gaeke
9e474c4ec8 Add Initialization and Finalization methods for the Printer pass,
to print various things on a module-by-module basis (currently, only the
former is used).

Don't print < > around names. The assembler can't take it.

Print pseudoinstructions only as comments. The poor little assembler can't
take that, either.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6789 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-19 19:32:32 +00:00
Brian Gaeke
de3aa4f77f lib/Target/X86/X86TargetMachine.{cpp,h}: Add initial version
(non-working) of llc guts for X86, and add a prototype for it.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6779 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-18 21:43:21 +00:00
Brian Gaeke
ad95d9ef50 Isolate machine-dependent use of <alloca.h> in "Support/Alloca.h",
so that we can easily change its use to be conditional on the result of
an autoconf test later.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6723 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-16 21:54:01 +00:00
Chris Lattner
30d002bd66 Fix warnings on Sparc
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6658 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-06 18:25:33 +00:00
Chris Lattner
302de59001 Add statistic for # machine instrs emitted
Add GROSS HACK to get CompilationCallback to work when compiled in release mode


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6646 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-06 04:00:05 +00:00
Chris Lattner
333864d81b Implement generation of cmp R, C to not use an extra register
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6627 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-05 19:30:30 +00:00
Chris Lattner
35333e16ee Special case simple binary operator X op C
This avoid generating a register to hold C, which in turn speeds up the
  register allocator by a lot: ~9% on 164.gzip and ~17% on 256.bzip2.  This
  also speeds up other passes.  This also speeds up execution of the program
  marginally, and makes the asm much easier to read. :)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6626 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-05 18:28:55 +00:00
Chris Lattner
76594014f2 Add instructions for (add|sub|and|or|xor)ri(8|16|32)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6625 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-05 18:25:08 +00:00
Chris Lattner
8cc72d2968 Remove usage of typedef
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6583 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-03 15:41:58 +00:00
Chris Lattner
ff3261ae86 Add namespace comments for doxygen
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6581 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-03 15:31:23 +00:00
Misha Brukman
bc80b2249a Eliminated a compiler warning due to casting to a different-sized datatype.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6531 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-02 04:13:58 +00:00
Misha Brukman
cd60313915 Renamed MachineCodeEmitter.cpp -> X86CodeEmitter.cpp as it conflicts with the
target-independent lib/CodeGen/MachineCodeEmitter.cpp; preserved CVS history.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6528 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-02 03:28:00 +00:00
Chris Lattner
04b0b309c4 Move X86 specific code out of the JIT into the X86 backend
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6516 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-01 23:23:50 +00:00
Chris Lattner
20772547c5 * Implement cast (long|ulong) to bool
* Fix cast of (short|ushort|int|uint) to bool to work right


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6510 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-01 03:38:24 +00:00
Chris Lattner
6c8125fa56 Add RR forms of test instruction
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6509 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-01 03:37:46 +00:00
Chris Lattner
9171ef5e8d Add support for shl and shr for 64 bit integer types
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6499 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-01 01:56:54 +00:00
Chris Lattner
3f7905bdec Add definitions for TEST instructions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6498 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-01 01:56:39 +00:00
Chris Lattner
8d8e0c6e83 Add new cmovne32 instruction
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6496 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-01 00:05:15 +00:00
Vikram S. Adve
49cab03c81 Renamed opIsDef to opIsDefOnly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6340 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-27 00:03:17 +00:00
Misha Brukman
12745c55e1 Reword to remove reference to how things worked in the past.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6323 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-24 01:08:43 +00:00
Misha Brukman
e9d883828a Implement the TargetInstrInfo's createNOPinstr() and isNOPinstr() interface.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6320 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-24 00:09:50 +00:00
Chris Lattner
67580ed715 Clean up #includes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6173 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-13 20:21:19 +00:00
Chris Lattner
9d6d118837 Make abort more explicit
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6151 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-12 21:16:26 +00:00
Chris Lattner
b70c1381b4 Remove the assertion failure of course... doh
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6150 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-12 20:39:39 +00:00
Chris Lattner
4d5a50a7a6 Implement casts from unsigned integers to floating point
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6148 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-12 20:36:13 +00:00
Chris Lattner
c53544af06 Make error messages more useful than jsut an abort
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6146 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-12 20:16:58 +00:00
Chris Lattner
a6e73f1956 Do not insert multiple initializations for the same value in a PHI node
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6113 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-12 14:22:21 +00:00
Chris Lattner
992ab561f0 This blank line has GOT to go.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6057 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-09 03:28:13 +00:00
Chris Lattner
b515f6d2c8 Add support for Add, Sub, And, Or, & Xor constant exprs
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6049 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-08 20:49:25 +00:00
Chris Lattner
eca195e7b4 Add support for variable argument functions!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6046 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-08 19:44:13 +00:00
Chris Lattner
c248903b2a IMPLICIT_DEF was not the beautiful elegant solution I thought it was going
to be.  In fact, it made stuff worse.  :(


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6013 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-07 19:21:28 +00:00
Chris Lattner
dbd7372665 Emit pseudo instructions to indicate that some registers are live on entrance
and exit of the function.  This fixes bug: Jello/2003-05-06-LivenessClobber.llx
and the Fhourstones benchmark


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6010 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-06 21:32:22 +00:00
Chris Lattner
9dedbcc3d5 Don't have a cow with new pseudo instructions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6009 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-06 21:31:47 +00:00
Chris Lattner
eab49345cb Add two new pseudo instructions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6008 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-06 21:31:31 +00:00
Misha Brukman
48196b3813 The Hyphenation-Adding Committee is now in session.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5986 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-03 02:18:17 +00:00
Chris Lattner
10daaa1416 Remove two fields from TargetData which are target specific.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5963 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-26 20:11:09 +00:00
Chris Lattner
8bdd129c8a Fix bogus assert
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5949 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-25 21:58:54 +00:00
Chris Lattner
98938f83d5 Fix compatibility bug: X86 aligns doubles to 4 bytes, not 8!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5935 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-25 06:05:57 +00:00
Chris Lattner
3907d11200 Fix iterator invalidation problem with cast instructions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5876 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-23 17:57:48 +00:00
Chris Lattner
548f61d66a Implement the constantexpr CAST instruction correctly
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5875 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-23 17:22:12 +00:00
Chris Lattner
155e68feea Add support for the Switch instruction by running the lowerSwitch pass first
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5867 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-23 16:24:55 +00:00
Misha Brukman
8829dcd15b It's "necessary"...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5848 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-22 20:20:11 +00:00
Misha Brukman
baf0607cbc It's "necessary" to spell "necessarily" correctly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5833 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-22 17:54:23 +00:00
Chris Lattner
4b12cdec01 Add support for a simple constantexpr: cast of one ptr type to another
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5829 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-21 21:33:44 +00:00
Chris Lattner
ddd5b417c6 Rename -no-* to -disable-*
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5642 91177308-0d34-0410-b5e6-96231b3b80d8
2003-02-26 20:00:41 +00:00
Chris Lattner
55f6fab9f1 Don't emit unneccesary branch instructions!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5328 91177308-0d34-0410-b5e6-96231b3b80d8
2003-01-16 18:07:23 +00:00
Chris Lattner
ee3e4356fc Fix problem with invalidated iterator
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5327 91177308-0d34-0410-b5e6-96231b3b80d8
2003-01-16 18:07:13 +00:00
Chris Lattner
6d40c191ee Implement optimization folding setcc into branch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5324 91177308-0d34-0410-b5e6-96231b3b80d8
2003-01-16 16:43:00 +00:00
Chris Lattner
b037ee822c Add more flavors of branch instructions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5323 91177308-0d34-0410-b5e6-96231b3b80d8
2003-01-16 16:42:45 +00:00
Chris Lattner
f158da2f78 Implement code to keep the stack pointer aligned to an 8 byte boundary.
This improves the performance of the power benchmark by a few percent.
This will be neccesary for SSE code, which requires 16 byte alignment of
the stack.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5320 91177308-0d34-0410-b5e6-96231b3b80d8
2003-01-16 02:20:12 +00:00
Chris Lattner
eafa423881 Handle frame offset due to return address pushed on the stack
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5319 91177308-0d34-0410-b5e6-96231b3b80d8
2003-01-15 22:57:35 +00:00
Chris Lattner
1a57ccdfbf X86 backend should never use addMReg
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5288 91177308-0d34-0410-b5e6-96231b3b80d8
2003-01-15 00:04:14 +00:00
Chris Lattner
3501feab81 Rename MachineInstrInfo -> TargetInstrInfo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5272 91177308-0d34-0410-b5e6-96231b3b80d8
2003-01-14 22:00:31 +00:00
Chris Lattner
a960d95253 New files
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5260 91177308-0d34-0410-b5e6-96231b3b80d8
2003-01-13 01:01:59 +00:00
Chris Lattner
d91d86f3a6 * No longer need lowerallocation pass
* Add X86 Stackifier pass
* Add peephole optimizer pass


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5233 91177308-0d34-0410-b5e6-96231b3b80d8
2003-01-13 00:51:23 +00:00
Chris Lattner
a849056a37 rename FP -> fp*
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5232 91177308-0d34-0410-b5e6-96231b3b80d8
2003-01-13 00:50:46 +00:00
Chris Lattner
d264bec88a * 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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5231 91177308-0d34-0410-b5e6-96231b3b80d8
2003-01-13 00:50:33 +00:00
Chris Lattner
0c514f4e27 * Some instructions take 64 bit integers, add an Arg type for it
* Add flags for different types of FP pseudo instrs


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5230 91177308-0d34-0410-b5e6-96231b3b80d8
2003-01-13 00:49:24 +00:00
Chris Lattner
20862b970e * 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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5229 91177308-0d34-0410-b5e6-96231b3b80d8
2003-01-13 00:48:46 +00:00
Chris Lattner
987e8baf12 Add support for frame and constant pool references
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5228 91177308-0d34-0410-b5e6-96231b3b80d8
2003-01-13 00:45:53 +00:00
Chris Lattner
31ad5dd67f Move passes out to Passes.h
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5227 91177308-0d34-0410-b5e6-96231b3b80d8
2003-01-13 00:45:29 +00:00
Chris Lattner
70445403c3 Add speculation
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5226 91177308-0d34-0410-b5e6-96231b3b80d8
2003-01-13 00:35:08 +00:00
Chris Lattner
b708944fc2 * 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
*


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5225 91177308-0d34-0410-b5e6-96231b3b80d8
2003-01-13 00:35:03 +00:00
Chris Lattner
e831b6b802 * 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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5224 91177308-0d34-0410-b5e6-96231b3b80d8
2003-01-13 00:33:59 +00:00
Chris Lattner
3e130a2a77 * 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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5223 91177308-0d34-0410-b5e6-96231b3b80d8
2003-01-13 00:32:26 +00:00
Chris Lattner
d0f166a486 More renamings of Target/Machine*Info to Target/Target*Info
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5204 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-29 03:13:05 +00:00
Chris Lattner
f27eeea54f Rename MachineOptInfo to TargetoptInfo
Rename MachineCacheInfo to TargetCacheInfo


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5203 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-29 02:50:35 +00:00
Chris Lattner
aa09b75d22 Rename FunctionFrameInfo to MachineFrameInfo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5201 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-28 21:08:28 +00:00
Chris Lattner
8bd66e6907 Rename MachineFrameInfo to TargetFrameInfo.h
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5199 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-28 21:00:25 +00:00
Chris Lattner
fde4b51baa Implement the TargetFrameInfo interface
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5189 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-28 20:33:52 +00:00
Chris Lattner
d282cfef61 * Initialize new FrameInfo member
* most pass ctors no longer take TM arguments
* New prolog/epilog insertion pass


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5188 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-28 20:33:32 +00:00
Chris Lattner
128aff4f95 Changes to match new MRegisterInfo api
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5187 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-28 20:32:54 +00:00
Chris Lattner
3c1c03d7a7 *** 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5186 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-28 20:32:28 +00:00
Chris Lattner
e0a3fcb304 Contents merged with X86RegisterInfo.cpp
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5185 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-28 20:30:15 +00:00
Chris Lattner
0ef73f3e29 * Remove implementations of previously pure virtual functions that are not any longer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5184 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-28 20:29:41 +00:00