Commit Graph

46 Commits

Author SHA1 Message Date
Alkis Evlogimenos 68cff6bf4d Remove floating point killer pass. This is now implemented in the
instruction selector by adding a new pseudo-instruction
FP_REG_KILL. This instruction implicitly defines all x86 fp registers
and is a terminator so that passes which add machine code at the end
of basic blocks (like phi elimination) do not add instructions between
it and the branch or return instruction.

llvm-svn: 10562
2003-12-20 16:22:59 +00:00
Chris Lattner 452597611f Finally, _actually delete the machine code_ for a function, after it has
been emitted.  Also, since the FPK pass is causing memory access violations,
disable it.

llvm-svn: 10559
2003-12-20 10:20:19 +00:00
Chris Lattner ddec71c3b6 A minor cleanup for better encapsulation
llvm-svn: 10545
2003-12-20 02:03:14 +00:00
Chris Lattner 833c3c2597 Rip JIT specific stuff out of TargetMachine, as per PR176
llvm-svn: 10542
2003-12-20 01:22:19 +00:00
John Criswell c6efb11f02 Modified cast so that it converts the int to a long before casting to
a pointer.  This evades a warning emitted by GCC when we cast from
unsigned int (32 bit) to void * (64 bit) on SparcV9.

llvm-svn: 10435
2003-12-12 19:57:48 +00:00
Chris Lattner 2e7416cb04 Implement the TargetMachine::getJITStubForFunction method for X86, finegrainify
namespacification.

llvm-svn: 10430
2003-12-12 07:11:18 +00:00
Brian Gaeke 960707c335 Put all LLVM code into the llvm namespace, as per bug 109.
llvm-svn: 9903
2003-11-11 22:41:34 +00:00
John Criswell 482202a601 Added LLVM project notice to the top of every C++ source file.
Header files will be on the way.

llvm-svn: 9298
2003-10-20 19:43:21 +00:00
Chris Lattner 97e1b55723 * Rename X86::IMULr16 -> X86::IMULrr16
* Implement R1 = R2 * C where R1 and R2 are 32 or 16 bits. This avoids an
  extra copy into a register, reducing register pressure.

llvm-svn: 9278
2003-10-20 03:42:58 +00:00
Brian Gaeke c05684ad22 Fix typo in comment.
llvm-svn: 9187
2003-10-16 23:45:05 +00:00
Misha Brukman 7eb05a170a Spell `necessary' correctly.
llvm-svn: 7944
2003-08-18 14:43:39 +00:00
Brian Gaeke 845b5af4d4 addPassesToJITCompile and addPassesToEmitMachineCode now take a
FunctionPassManager, to support function-at-a-time compilation and
 emission of code.

llvm-svn: 7821
2003-08-13 18:17:27 +00:00
Chris Lattner 7c257321c7 This is the real fix for the previous register allocator problem.
Physical registers should not float around.

llvm-svn: 7587
2003-08-05 00:48:47 +00:00
Chris Lattner 3663901941 Set debug types
llvm-svn: 7532
2003-08-03 21:14:38 +00:00
Chris Lattner 1007f033d4 Move DEBUG to Debug.h
llvm-svn: 7497
2003-08-01 22:21:34 +00:00
Chris Lattner e1b4e68396 We don't modify the LLVM rep, remain const correct
llvm-svn: 7345
2003-07-26 23:06:00 +00:00
John Criswell 3ef61afb76 Merged in autoconf branch. This provides configuration via the autoconf
system.

llvm-svn: 7014
2003-06-30 21:59:07 +00:00
Brian Gaeke 7a719ed20c 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.

llvm-svn: 6723
2003-06-16 21:54:01 +00:00
Chris Lattner 11ecb1d8ca Fix warnings on Sparc
llvm-svn: 6658
2003-06-06 18:25:33 +00:00
Chris Lattner 65d29b87e3 Add statistic for # machine instrs emitted
Add GROSS HACK to get CompilationCallback to work when compiled in release mode

llvm-svn: 6646
2003-06-06 04:00:05 +00:00
Chris Lattner 0addbab5e2 Add namespace comments for doxygen
llvm-svn: 6581
2003-06-03 15:31:23 +00:00
Misha Brukman f9162dc713 Eliminated a compiler warning due to casting to a different-sized datatype.
llvm-svn: 6531
2003-06-02 04:13:58 +00:00
Misha Brukman 29848417f3 Renamed MachineCodeEmitter.cpp -> X86CodeEmitter.cpp as it conflicts with the
target-independent lib/CodeGen/MachineCodeEmitter.cpp; preserved CVS history.

llvm-svn: 6528
2003-06-02 03:28:00 +00:00
Chris Lattner 3bb2a00849 Move X86 specific code out of the JIT into the X86 backend
llvm-svn: 6516
2003-06-01 23:23:50 +00:00
Chris Lattner 74b65ee219 This blank line has GOT to go.
llvm-svn: 6057
2003-05-09 03:28:13 +00:00
Chris Lattner d964c3b9fd IMPLICIT_DEF was not the beautiful elegant solution I thought it was going
to be.  In fact, it made stuff worse.  :(

llvm-svn: 6013
2003-05-07 19:21:28 +00:00
Chris Lattner 4b1e02df8f Don't have a cow with new pseudo instructions
llvm-svn: 6009
2003-05-06 21:31:47 +00:00
Chris Lattner b4d58d7f9e Rename MachineInstrInfo -> TargetInstrInfo
llvm-svn: 5272
2003-01-14 22:00:31 +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 d24f633394 * Convert to a MachineFunctionPass
* ctor doesn't take TM argument
* handle direct ESP references correctly!

llvm-svn: 5179
2002-12-28 20:24:48 +00:00
Chris Lattner 36703cd02a Add support for FP prefixes
llvm-svn: 5151
2002-12-25 05:09:21 +00:00
Chris Lattner e218f7924c Add support for the bswap instruction
llvm-svn: 5114
2002-12-23 23:46:00 +00:00
Chris Lattner 67e555d1ec fix warning
llvm-svn: 5107
2002-12-20 04:12:48 +00:00
Chris Lattner d06650ade1 Give passes nice names!
llvm-svn: 5059
2002-12-15 21:13:40 +00:00
Chris Lattner ce35108606 Use MachineOperand::isFoo methods instead of our own global functions
llvm-svn: 5033
2002-12-15 08:01:39 +00:00
Brian Gaeke 44876fdee4 InstSelectSimple.cpp: Give promote32 a comment. Add initial
implementation of getReg() for arguments.

MachineCodeEmitter.cpp: Fix using EBP with index, scale and no
 displacement (whew!) due to Chris.

Printer.cpp: Fix printing out index and scale in memory references.

llvm-svn: 4998
2002-12-13 07:56:18 +00:00
Chris Lattner e791322602 Emit the right form of mod/rm mod field
llvm-svn: 4986
2002-12-13 05:05:05 +00:00
Chris Lattner ec0bc92146 Rename MemArg* to Arg*
llvm-svn: 4979
2002-12-13 03:51:55 +00:00
Chris Lattner 343e4b1810 Make mem size an assert
Add mem size flags to all instructions using an imm

llvm-svn: 4978
2002-12-13 03:50:13 +00:00
Misha Brukman 2ef75daf78 This is supposed to provide correct size for datatypes. Supposedly.
llvm-svn: 4977
2002-12-13 02:13:15 +00:00
Chris Lattner fb8032dc84 Fix bogus assertion failures
llvm-svn: 4919
2002-12-04 17:32:52 +00:00
Chris Lattner 6425a502a6 Add support for referencing global variables/functions
llvm-svn: 4907
2002-12-04 06:45:19 +00:00
Chris Lattner 8052f8006b Split the machine code emitter completely out of the printer
llvm-svn: 4882
2002-12-03 06:34:06 +00:00
Chris Lattner 15fbd61664 More support for machine code emission: raw instructions
llvm-svn: 4872
2002-12-02 21:56:18 +00:00
Chris Lattner db31bbad6b Start implementing MachineCodeEmitter
llvm-svn: 4870
2002-12-02 21:44:34 +00:00
Chris Lattner 787a9de685 Initial support for machine code emission
llvm-svn: 4866
2002-12-02 21:24:12 +00:00