Commit Graph

367 Commits

Author SHA1 Message Date
Misha Brukman
242e94ab26 Move function implementations to a .cpp file, avoid #including <cstdlib> here.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12296 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-11 23:52:03 +00:00
Brian Gaeke
323819e4e1 make -print-machineinstrs work for both SparcV9 and X86
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12122 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-04 19:16:23 +00:00
Chris Lattner
2bed9ecc4b Add a new constructor
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12087 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-03 02:12:47 +00:00
Brian Gaeke
05b15fb075 TargetCacheInfo has been removed; its only uses were to propagate a constant
(16) into certain areas of the SPARC V9 back-end. I'm fairly sure the US IIIi's
dcache has 32-byte lines, so I'm not sure where the 16 came from. However, in
the interest of not breaking things any more than they already are, I'm going
to leave the constant alone.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12043 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-01 06:43:29 +00:00
Brian Gaeke
6ac5300fbc Remove dead member variables of SparcV9SchedInfo and TargetSchedInfo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11994 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-29 08:40:03 +00:00
Chris Lattner
bceb68807f Eliminate the distinction between "real" and "unreal" instructions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11986 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-29 06:31:16 +00:00
Chris Lattner
450b6d2998 Scrap a huge layer of cruft out of this interface.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11980 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-29 05:57:21 +00:00
Chris Lattner
3da5117334 Add hook for V8 target
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11961 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-28 19:54:16 +00:00
Alkis Evlogimenos
71e353ed35 Uncomment assertions that register# != 0 on calls to
MRegisterInfo::is{Physical,Virtual}Register. Apply appropriate fixes
to relevant files.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11882 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-26 22:00:20 +00:00
Chris Lattner
c814937115 Make TargetData no longer use annotations!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11874 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-26 08:01:57 +00:00
Alkis Evlogimenos
4c50715e9e Temporarily comment out asserts as they break things. I will uncomment
them when all the problem areas are fixed.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11855 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-25 23:56:36 +00:00
Alkis Evlogimenos
332d5d0a68 Duh, forgot to close the parenthesis.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11843 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-25 22:07:14 +00:00
Alkis Evlogimenos
338ce3d64e Add assert to isPhysicalRegister and isVirtualRegister to fail when
passed the special 'register' 0.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11842 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-25 22:04:28 +00:00
Alkis Evlogimenos
4d0d864be3 Add DenseMap template and actually use it for for mapping virtual regs
to objects.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11840 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-25 21:55:45 +00:00
Brian Gaeke
150666fd82 Great renaming part II: Sparc --> SparcV9 (also includes command-line options and Makefiles)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11827 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-25 19:08:12 +00:00
Alkis Evlogimenos
04319bb2bd This is needed by assignment verification in linear-scan.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11618 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-19 01:10:55 +00:00
Chris Lattner
8026a6982e Simplify and document the new interface
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11524 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-17 05:54:26 +00:00
Alkis Evlogimenos
b499866c05 Add API to check and fold memory operands into instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11519 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-17 04:33:18 +00:00
Chris Lattner
8604e75721 The prologue/epilogue related method calls have no reason to return a value,
make them return void.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11447 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-14 19:49:05 +00:00
Chris Lattner
8ff9a8639a Make sure to provide a prototype for the cbackend
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11419 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-13 23:36:03 +00:00
Alkis Evlogimenos
be766c7246 Remove getAllocatedRegNum(). Use getReg() instead.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11393 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-13 21:01:20 +00:00
Alkis Evlogimenos
ab8672c8bb Add parent pointer to MachineInstr that points to owning
MachineBasicBlock. Also change opcode to a short and numImplicitRefs
to an unsigned char so that overall MachineInstr's size stays the
same.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11357 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-12 18:49:07 +00:00
Alkis Evlogimenos
024126ee23 Change interface so that we can add to the end of a basic block
without getting an assertion from ilist that we are dereferencing
ilist<T>::end().


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11345 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-12 08:11:04 +00:00
Alkis Evlogimenos
c0b9dc5be7 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11340 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-12 02:27:10 +00:00
Brian Gaeke
e28adaa633 Fix typos in comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11333 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-11 19:47:43 +00:00
Brian Gaeke
2d62c896a5 Add prototype for llvm::allocatePowerPCTargetMachine().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11072 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-02 19:05:08 +00:00
Alkis Evlogimenos
93aa52a8a9 Add MRegisterInfo::getNumRegs().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11058 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-01 17:14:20 +00:00
Chris Lattner
bd490d919b Add two static methods to avoid having client code explicitly compare against
FirstVirtualRegister


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11031 91177308-0d34-0410-b5e6-96231b3b80d8
2004-01-31 19:57:11 +00:00
Misha Brukman
61eec1573a If you call abort(), #include <cstdlib>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10941 91177308-0d34-0410-b5e6-96231b3b80d8
2004-01-21 22:50:12 +00:00
Chris Lattner
f70e0c216c Clean up a lot of the code I added yesterday by exposing the IntrinsicLowering
implementation from the TargetMachine directly.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10636 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-28 21:23:38 +00:00
Alkis Evlogimenos
5e30002af7 Add TargetInstrInfo::isMoveInstr() to support coalescing in register
allocation.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10633 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-28 17:35:08 +00:00
Chris Lattner
cd824d7678 We may now pass IntrinsicLowering implementations into these methods
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10630 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-28 09:48:17 +00:00
Chris Lattner
b0404c7a6c Doxygenize methods, add new getIntPtrType method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10578 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-22 05:00:45 +00:00
Chris Lattner
1e60a9165d Rip JIT specific stuff out of TargetMachine, as per PR176
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10542 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-20 01:22:19 +00:00
Chris Lattner
459ccab002 Add new getJITStubForFunction method, which may optionally be implemented by
targets for better performance.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10429 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-12 07:10:32 +00:00
Brian Gaeke
d0fde30ce8 Put all LLVM code into the llvm namespace, as per bug 109.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9903 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-11 22:41:34 +00:00
Misha Brukman
80f0b57b5d Since this function returns an int, let's actually return something.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9734 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-05 19:48:05 +00:00
Alkis Evlogimenos
4dad76cea0 Update documentation since it was misleading: make it clear that a
negative instruction count is returned if instructions are removed
from a basic block.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9705 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-04 23:07:00 +00:00
Alkis Evlogimenos
e668dab5b3 Change all machine basic block modifier functions in MRegisterInfo to
return the number of instructions added to/removed from the basic block
passed as their first argument.

Note: This is only needed because we use a std::vector instead of an
ilist to keep MachineBasicBlock instructions. Inserting an instruction
to a MachineBasicBlock invalidates all iterators to the basic
block. The return value can be used to update an index to the machine
basic block instruction vector and circumvent the iterator elimination
problem but this is really not needed if we move to a better
representation.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9704 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-04 22:57:09 +00:00
John Criswell
6fbcc26f14 Added LLVM copyright header (for lack of a better term).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9304 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-20 20:19:47 +00:00
Brian Gaeke
a42649e3dd Make replaceMachineCodeForFunction return void.
Make it assert by default.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9287 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-20 15:14:33 +00:00
Brian Gaeke
5358bc39c1 Add stub version of replaceMachineCodeForFunction. It will live here until
we have a better place for it to go.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9197 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-17 18:26:45 +00:00
Chris Lattner
48486893f4 Standardize header file comments
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8782 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-30 18:37:50 +00:00
Chris Lattner
4f98928d58 Remove dead file
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8313 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-01 20:41:21 +00:00
Chris Lattner
c5dc890596 No longer require an OptInfo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8310 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-01 20:40:43 +00:00
Chris Lattner
e3ac7565a0 Targets should configure themselves based on the module, not some wierd flags
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8131 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-24 19:49:07 +00:00
Misha Brukman
ef6a6a69ff The word dependent' has no a'.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8030 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-21 22:14:26 +00:00
Misha Brukman
5560c9d49c Spell `necessary' correctly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7944 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-18 14:43:39 +00:00
Chris Lattner
960ff04a09 Remove extraneous #include
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7881 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-15 05:21:30 +00:00
Brian Gaeke
8844a0ba89 addPassesToJITCompile and addPassesToEmitMachineCode now take a
FunctionPassManager, to support function-at-a-time compilation and
 emission of code.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7821 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-13 18:17:27 +00:00
Chris Lattner
9ca5a2a33e The NOOP instruction is no longer needed. Instead, use the
TargetInstrInfo::isNOPinstr method


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7530 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-03 18:52:15 +00:00
Chris Lattner
92988ecdb6 Code generation passes don't need access to raw LLVM types, this method is unnecessary.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7412 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-30 05:29:45 +00:00
Vikram S. Adve
588668d468 Unify all constant evaluations that depend on register size
in TargetInstrInfo::ConvertConstantToIntType.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7398 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-29 20:30:20 +00:00
Vikram S. Adve
ceb7d2f4f8 Moved insertCallerSavingCode() to PhyRegAlloc and
moved isRegVolatile and modifiedByCall here: they are all
machine independent.  Remove all uses of PhyRegAlloc.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7387 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-29 19:41:23 +00:00
Chris Lattner
5d7407cbef Move value type enums to CodeGen/ValueTypes.h
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7376 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-29 05:13:34 +00:00
Vikram S. Adve
523eb3f768 Change the way unused regs. are marked and found to consider regType
info (since multiple reg types may share the same reg class).
Remove machine-specific regalloc. methods that are no longer needed.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7328 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-25 21:01:43 +00:00
Chris Lattner
be67780f31 #include <cassert> as necessary...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7315 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-25 17:58:41 +00:00
Anand Shukla
6da69e75ec Added special consideration for instrumentation strategy
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7208 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-20 15:39:30 +00:00
Misha Brukman
bc0e998c49 The word separate' only has one e'.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7173 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-14 17:20:40 +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
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
Chris Lattner
3889a2cb05 Remove a ton of extraneous #includes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6842 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-22 03:08:05 +00:00
John Criswell
be583b914d Included assert.h so that the code compiles under newer versions of GCC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6682 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-11 14:01:36 +00:00
Chris Lattner
17035c0edf Remove noncopyableV base classes, as they were confusing the doxygen documentation,
making it harder to read.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6575 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-03 15:28:40 +00:00
Vikram S. Adve
3fd7bf4257 Made a single common InvalidRegNum = -1.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6473 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-31 07:44:07 +00:00
Misha Brukman
e5841daa79 Fixed misspelling and broke a line that was wrapping.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6391 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-29 05:00:14 +00:00
Misha Brukman
504905fd4b Allow allocation of a Sparc TargetMachine.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6364 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-27 21:46:07 +00:00
Vikram S. Adve
bfebd79dd1 (1) Added special register class containing (for now) %fsr.
Fixed spilling of %fcc[0-3] which are part of %fsr.

(2) Moved some machine-independent reg-class code to class TargetRegInfo
    from SparcReg{Class,}Info.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6343 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-27 00:07:13 +00:00
Vikram S. Adve
28fc440bc6 Make case of GetNumOfInt/FloatArgRegs functions to be use lower case
like all the other functions.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6326 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-25 16:02:05 +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
00b05bd703 NOP instructions are pseudo-instructions. We should not have them explicitly in
our representation, since they are usually special cases of already-existing
instructions.

This abstracts away methods that let a pass create and verify a NOP instruction,
without relying on a `NOP' enum to be in existence in the target's instruction
info descriptor.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6319 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-24 00:08:39 +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
322bc2b5aa Fix method name type-o
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5933 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-25 05:23:27 +00:00
Chris Lattner
d6cbe339af Default ctor doesn't provide name
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5921 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-25 02:50:19 +00:00
Chris Lattner
4bc8e640b8 Add new targetdata ctor to create a targetdata appropriate to the module
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5902 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-24 19:08:45 +00:00
Misha Brukman
4bd8b24470 Must use std::pair instead of just 'pair'.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5767 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-07 00:25:09 +00:00
Guochun Shi
681220dc3c added a function and a member to the TargetSchedInfo class
which is used  by Modulo Scheduling pass


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5766 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-07 00:00:36 +00:00
Chris Lattner
0a166155e7 Simplify the interface
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5313 91177308-0d34-0410-b5e6-96231b3b80d8
2003-01-15 21:13:32 +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
cb09cc268b Move annotation to support library
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5268 91177308-0d34-0410-b5e6-96231b3b80d8
2003-01-14 21:29:58 +00:00
Chris Lattner
2584ba5867 Rename MachineInstrInfo -> TargetInstrInfo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5214 91177308-0d34-0410-b5e6-96231b3b80d8
2003-01-13 00:21:32 +00:00
Chris Lattner
075b4a066d * Start renaming MachineInstrInfo -> TargetInstrInfo
* Add new M_TERMINATOR_FLAG


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5213 91177308-0d34-0410-b5e6-96231b3b80d8
2003-01-13 00:21:19 +00:00
Chris Lattner
09d4fd57de Add new getName method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5212 91177308-0d34-0410-b5e6-96231b3b80d8
2003-01-13 00:19:44 +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
5b927c790e * doxygenize comment
* rename MachineFrameInfo to TargetFrameInfo


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5170 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-28 20:13:29 +00:00
Chris Lattner
5fa01b9c7a Sparc specific methods default to abort rather than being pure virtual
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5169 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-28 20:12:54 +00:00
Chris Lattner
fd529d2e4a Expose some very simple information about the frame, rather than in-depth
target specific information.  Rename MachineFrameInfo to TargetFrameInfo


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5168 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-28 20:12:10 +00:00
Chris Lattner
f9b332b59d * Keep track of register alignment as well as register size
* Add comments
* Add a new allocation_order iterator for register classes which targets may
  use to control the register order and available registers based on properties
  of the function being compiled.
* Remove access to FP and SP registers
* Add new callframe setup opcode support
* Eliminate moveImm2Reg method
* Revamp frame offset handling and prolog/epilog code generation


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5167 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-28 20:10:23 +00:00
Chris Lattner
8c5d47da98 Simplify spill interface methods
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5142 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-25 05:02:00 +00:00
Chris Lattner
13a6e1e5a1 Add comment
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5141 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-25 05:01:46 +00:00
Chris Lattner
434c86dd3f Allow the target machines to specify endianness and pointer size
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5128 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-24 00:02:17 +00:00
Chris Lattner
8797caac84 Simplify interface to remove virtual function references
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5100 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-17 04:20:39 +00:00
Chris Lattner
00032bf6cc Add support for register alias set description
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5080 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-16 16:39:14 +00:00
Chris Lattner
70535c608d Export well known instruction opcodes usable by target independant passes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5063 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-15 22:16:08 +00:00
Chris Lattner
198ab640bb Simplify interfaces used by regalloc to insert code
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5052 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-15 20:06:35 +00:00
Chris Lattner
0f24e33b73 Simplify TargetRegisterClass a bit, also eliminating virtual function call
overhead


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5049 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-15 19:29:14 +00:00
Chris Lattner
aa8dad5561 * Rename const_regclass_begin/end to just regclass_begin/end
* Regclass iterators need an extra level of pointerness to work right
* Pull inverse mapping code out of target description files


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5046 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-15 18:40:01 +00:00
Misha Brukman
2b46e8eccc Added moveReg2Reg() and moveImm2Reg() to accomodate moving data around due to
PHI nodes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5001 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-13 09:54:12 +00:00
Misha Brukman
9ada014ec0 Define the 2-address flag used by X86 instructions (add,sub,and,or,xor) that
need to be declared as such.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4975 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-12 23:19:51 +00:00
Misha Brukman
9da4d263b9 Added prototypes for emitting prologue and epilogue for function code
generation.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4927 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-04 23:55:56 +00:00
Misha Brukman
a361c8417b storeReg2RegOffset() and loadRegOffset2Reg() now take the iterator by value
instead of by reference, since they return the modified iterator.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4914 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-04 17:14:13 +00:00
Misha Brukman
0af0d5bd3e Moved buildReg2RegClassMap() into from X86RegisterInfo to MRegisterInfo, since
it is target-independent.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4911 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-04 16:47:04 +00:00
Chris Lattner
08053e46be Expose target data through a method for uniformity
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4901 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-04 05:20:12 +00:00
Misha Brukman
44662a783b RegisterInfo now supports handing out caller- and callee-save registers, as
well as building a map from a physical register to its register class.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4896 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-03 23:09:53 +00:00
Chris Lattner
f6d12fbd9c Add entries to track information about implicit uses and definitions of
the instructions


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4875 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-03 05:41:32 +00:00
Chris Lattner
b7a2d2256f The hopefully final version of addPassesToEmitMachineCode which does not
have any question about ownership


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4863 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-02 21:15:42 +00:00
Chris Lattner
dc095240c9 Add comment about ownership semantics
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4859 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-02 21:13:45 +00:00
Chris Lattner
9f729a30b2 Add stub to emit machine code for JIT
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4856 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-02 21:00:50 +00:00
Misha Brukman
f6a132c7a0 Added virtual functions for storing and retrieving values from the stack.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4824 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-22 22:41:23 +00:00
Misha Brukman
282ec57c4c MRegisterInfo.h - Added prototypes for functions we need to map a register to
an appropriate TargetRegisterClass, also adds TargetRegisterClass definition.
TargetMachine.h - speling.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4781 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-20 18:54:53 +00:00
Chris Lattner
fe30dd3f23 Make sure that print gets a targetmachine
CVS: ----------------------------------------------------------------------


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4735 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-17 23:21:45 +00:00
Chris Lattner
9bca50d6dd Add machine independant printer interface
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4729 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-17 22:54:55 +00:00
Chris Lattner
75e961ae6b * Add new "Target Specific Flags" field to instruction descriptor
* Rename iclass to Flags


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4439 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-30 01:06:53 +00:00
Chris Lattner
478df7a7ae Add new optional getRegisterInfo to TargetMachine
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4436 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-30 00:53:02 +00:00
Chris Lattner
272ba1d0ad Eliminate virtual methods that are sparc specific
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4419 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-29 22:01:26 +00:00
Chris Lattner
c56406c236 * Privatize the TargetName
* Move optSizeForSubWordData to TargetData
* Remove unused fields


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4417 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-29 21:48:17 +00:00
Chris Lattner
6334205cb5 Allow TargetMachine to refuse static code gen
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4415 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-29 21:12:46 +00:00
Chris Lattner
a74db854a3 Rename Sparc.h to TargetMachineImpls.h. Add hook for X86 target
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4412 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-29 20:51:29 +00:00
Chris Lattner
5c1b5244b9 Add hook for JIT compiler
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4411 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-29 20:51:10 +00:00
Chris Lattner
5f9a61a598 Move to TargetMachineImpls.h
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4405 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-29 20:44:18 +00:00
Chris Lattner
c1f49e4b35 Merge to MachineInstrInfo.h
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4402 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-29 20:10:19 +00:00
Chris Lattner
f1757c414c Move TargetInstrDescriptors extern to the one .cpp file that refers to it:
MachineInstr.cpp


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4392 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-29 17:40:30 +00:00
Chris Lattner
4683f9bfb4 Rename opCodeString to Name, add new getName() method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4388 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-29 17:35:09 +00:00
Chris Lattner
e30eeaaf72 Rename MachineInstrInfo::getDescriptor to MachineInstrInfo::get
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4387 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-29 17:26:26 +00:00
Chris Lattner
d020801aea MachineInstrInfo doesn't need a TargetMachine member
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4371 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-29 15:44:40 +00:00
Chris Lattner
de0e87bb83 Minor cleanups, remove noncopyable so dot doesn't cluster unrelated stuff
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4365 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-28 23:54:23 +00:00
Chris Lattner
2cc214c06c Strip a bunch of #includes from the file, move some virtual functions to
.cpp file


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4364 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-28 23:53:56 +00:00
Chris Lattner
534124d0e3 Inline some code from the cpp file
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4363 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-28 23:53:32 +00:00
Chris Lattner
9a8e4121aa Remove all traces of the "Opcode Mask" field in the MachineInstr class
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4359 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-28 21:17:20 +00:00
Chris Lattner
c7e65fb7d8 * s/unsigned int/unsigned
* Make MachineInstrDescriptor only keep a const char * instead of a string
  for the opcode name.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4335 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-28 04:55:56 +00:00
Chris Lattner
c188b733ba Make scheduling class variables be 'unsigned' instead of 'int'
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4334 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-28 04:53:18 +00:00
Chris Lattner
67e4132caa Remvoe a bunch of unneeded forward decls
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4326 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-28 02:27:07 +00:00
Chris Lattner
4a63b72df9 Don't #include <Support/*>, #include "Support/*"
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4325 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-28 02:11:53 +00:00
Chris Lattner
ebb1af16be * Doxygenify comments
* Move addPassesToEmitAssembly back to Sparc.cpp because it really is
  sparc specific


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4306 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-28 01:02:24 +00:00
Misha Brukman
fce1143bcf Changed MachineCodeForMethod' to MachineFunction'.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4301 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-28 00:28:31 +00:00
Chris Lattner
3d7771a387 Initial checkin of target support for X86 backend.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4287 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-25 23:00:40 +00:00
Chris Lattner
502374a58f * Remove unneccesary #includes
* Fix typeo in the (unused) MachineInstrInfo::isArith method


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4275 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-24 22:34:41 +00:00
Chris Lattner
85131c8277 - Add an endianness field to the TargetData datastructure
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4174 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-14 22:41:13 +00:00
Vikram S. Adve
5aefcad35b Use vectors instead of hash_maps for issueGaps and conflictLists.
These hash lookups were a major sink of time because they happen so often!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4136 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-13 00:37:46 +00:00
Vikram S. Adve
9d0168d2d5 Minor change to interface for Create{Zero,Sign}ExtensionsInstructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3979 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-29 21:53:31 +00:00
Vikram S. Adve
106604ea6d Simplified code that handles call args and rets, so it no longer
needs the RegClass list to be passed in.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3964 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-28 16:56:59 +00:00
Chris Lattner
2da7afb963 Convert TargetData to be an ImmutablePass
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3928 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-25 23:46:56 +00:00
Chris Lattner
2d23785852 There are no implicit gep forms of load and store anymore
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3901 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-24 00:08:01 +00:00
Vikram S. Adve
d55697cf13 Added class MachineOptInfo as interface to target-specific
routines supporting machine code optimization.
Also added method MachineInstrInfo::getNOPOpCode().


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3845 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-20 00:52:09 +00:00
Vikram S. Adve
2542d9a183 Interface to target-specific routines that support machine code optimization.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3844 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-20 00:49:21 +00:00
Chris Lattner
214bf54175 Fix compile problem on linux. Noone should ever #include <inttypes.h>
directly.  Instead, include Support/DataTypes.h


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3766 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-16 20:44:19 +00:00
Vikram S. Adve
aa500f3f43 Add method adjustAlignment so that stack slot alignments can be computed
in a target-dependent manner (because of the dang OFFSET in Sparc v9).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3745 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-16 15:57:43 +00:00
Vikram S. Adve
4900116ab0 Add methods to query about the representation of LLVM quantities (e.g.,
constants).  Useful for target-dependent LLVM transformations like
Preselection.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3743 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-16 15:56:01 +00:00
Vikram S. Adve
ebc7511e86 *** empty log message ***
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3741 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-16 15:39:35 +00:00
Vikram S. Adve
68f716190b Add new function MachineInstrInfo::CreateZeroExtensionInstructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3582 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-05 18:36:41 +00:00
Chris Lattner
6ef3369321 Return const char * const instead of std::string from get register name method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3294 91177308-0d34-0410-b5e6-96231b3b80d8
2002-08-12 21:24:55 +00:00
Chris Lattner
035dfbe7f2 * Removed extraneous #includes
* Fixed file headers to be consistent with the rest of LLVM
* Other minor fixes


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3278 91177308-0d34-0410-b5e6-96231b3b80d8
2002-08-09 20:08:06 +00:00
Chris Lattner
39d69009d0 *** empty log message ***
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3067 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-24 22:20:06 +00:00
Chris Lattner
cb6289a73d *** empty log message ***
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3058 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-24 21:21:33 +00:00
Chris Lattner
09ff1126da *** empty log message ***
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3056 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-24 21:21:32 +00:00
Anand Shukla
24787fa2ed added std:: to vector
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2874 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-11 00:16:28 +00:00
Vikram S. Adve
9d22cd4535 Put caller-saving code *before* argument copying code!
(This file has a minor change required for this fix.)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2854 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-10 21:30:17 +00:00
Vikram S. Adve
bba2485c70 Minor change in comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2853 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-10 21:29:22 +00:00
Vikram S. Adve
5023bd4a64 cpMem<->Reg functions now support CC registers (int and FP) correctly.
A scratch register has to be provided when needed to do the copy.
Also, cpMem<->Reg functions now return a vector of machine instructions.

Added several get{Class,Type} functions.

Suggest/Color methods may modify the MachineInstr (and always did),
so don't make that argument const!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2824 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-08 22:44:14 +00:00
Anand Shukla
4a9f933751 changes to make it compatible with 64bit gcc
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2786 91177308-0d34-0410-b5e6-96231b3b80d8
2002-06-25 20:22:25 +00:00
Chris Lattner
85c5465e07 Convert RegClass::IsColorUsedArr from a dynamically allocated array to
a vector.  This makes asserting on array bounds easier.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2731 91177308-0d34-0410-b5e6-96231b3b80d8
2002-05-23 15:50:03 +00:00
Vikram S. Adve
14e3c44486 Added parameter IntRegSize for standard general-purpose register size.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2652 91177308-0d34-0410-b5e6-96231b3b80d8
2002-05-19 15:44:07 +00:00
Vikram S. Adve
c864fde15c New function CreateSignExtensionInstructions.
Methods now take MachineCodeForInstruction& as an argument and record
temporary values in it directly, instead of return the temps.
Really simplifies callers.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2651 91177308-0d34-0410-b5e6-96231b3b80d8
2002-05-19 15:43:31 +00:00
Vikram S. Adve
febfae46a7 Many functions that returned a single MachineInstr now take a
vector of MachineInstr* to return multiple ones.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2650 91177308-0d34-0410-b5e6-96231b3b80d8
2002-05-19 15:42:21 +00:00
Vikram S. Adve
f66723fc4b Add integer register size field.
Make all sizes and offsets uint64_t instead of uint.
Fixed GetIndexedOffset to handle mixed array and struct indices.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2641 91177308-0d34-0410-b5e6-96231b3b80d8
2002-05-19 15:28:02 +00:00
Chris Lattner
b6dcbfc6d1 Use forward decl instead of #include
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2380 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-28 20:40:25 +00:00
Vikram S. Adve
a8ac3fca6f Added functions to compute the offset of a given incoming or outgoing
argument. These are no longer allocated as they are discovered.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2320 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-25 04:48:54 +00:00
Chris Lattner
dbc3b00df5 Free memory when done with it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2198 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-09 15:04:37 +00:00
Vikram S. Adve
d0bac69792 Add method getCallInstIndirectAddrVal() to add call interference
for this value.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2072 91177308-0d34-0410-b5e6-96231b3b80d8
2002-03-31 18:58:49 +00:00
Chris Lattner
e7506a366e Rename Method to Function
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1957 91177308-0d34-0410-b5e6-96231b3b80d8
2002-03-23 22:51:58 +00:00
Vikram S. Adve
851597c3b3 Added machine-independent value for INVALID_MACHINE_OPCODE.
Just cosmetic changes otherwise.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1898 91177308-0d34-0410-b5e6-96231b3b80d8
2002-03-18 03:19:38 +00:00
Vikram S. Adve
80347ecb14 Add function getRegClassIDOfType.
getRegClassIDOfValue is now just a wrapper around this.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1897 91177308-0d34-0410-b5e6-96231b3b80d8
2002-03-18 03:18:28 +00:00
Chris Lattner
bc53c04789 * Minor cleanups
* Reduce number of #includes
* Delete blank lines at end of files
* Remove blatently misleading qualifiers (how do you have an inlined pure virtual function?)
* Remove unnecesary & ignored qualifiers (const int argument vs int argument)
* Remove LARGE chunks of "inline" code out to .cpp file
* s/unsigned int/unsigned/


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1673 91177308-0d34-0410-b5e6-96231b3b80d8
2002-02-04 05:55:10 +00:00
Chris Lattner
ccca2ed854 Revamp compilation to be pass based instead of being monolithic so that
backend's can customize compilation as much as they want


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1661 91177308-0d34-0410-b5e6-96231b3b80d8
2002-02-03 23:40:22 +00:00
Chris Lattner
88e2fbc4bb Add methods to TargetMachine to:
* Output assembly code a method at a time instead of building it all up then emitting it as a whole module
* Release memory contained in various annotations.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1641 91177308-0d34-0410-b5e6-96231b3b80d8
2002-02-03 07:24:05 +00:00
Chris Lattner
871b1939b5 * Trim #includes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1640 91177308-0d34-0410-b5e6-96231b3b80d8
2002-02-03 07:20:47 +00:00
Chris Lattner
f3aaadf482 Remove #include
move typedefs here


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1639 91177308-0d34-0410-b5e6-96231b3b80d8
2002-02-03 07:17:37 +00:00
Chris Lattner
9aab9ec321 Remove extranous #include
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1638 91177308-0d34-0410-b5e6-96231b3b80d8
2002-02-03 07:15:36 +00:00
Chris Lattner
7012bcd61b Fix for problem that caused both HUGE and INVALID latencies to be negative
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1513 91177308-0d34-0410-b5e6-96231b3b80d8
2002-01-21 22:42:49 +00:00
Chris Lattner
697954c15d Changes to build successfully with GCC 3.02
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1503 91177308-0d34-0410-b5e6-96231b3b80d8
2002-01-20 22:54:45 +00:00
Ruchira Sasanka
6011e2eead Added more comments
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1495 91177308-0d34-0410-b5e6-96231b3b80d8
2002-01-07 19:57:37 +00:00
Ruchira Sasanka
c1a29f10a6 MachineRegInfo: Added a method to get the size of a register pushed on to stack.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1492 91177308-0d34-0410-b5e6-96231b3b80d8
2002-01-07 19:17:41 +00:00
Vikram S. Adve
dd08e32deb getIndexedOffset() shd take vector of Values, not of Constants!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1484 91177308-0d34-0410-b5e6-96231b3b80d8
2001-12-15 00:35:48 +00:00
Chris Lattner
e9bb2df410 Rename ConstPoolVal -> Constant
Rename ConstPool*   -> Constant*
Rename ConstPoolVals.h -> ConstantVals.h


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1407 91177308-0d34-0410-b5e6-96231b3b80d8
2001-12-03 22:26:30 +00:00
Chris Lattner
cee8f9ae67 Create a new #include "Support/..." directory structure to move things
from "llvm/Support/..." that are not llvm dependant.

Move files and fix #includes


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1400 91177308-0d34-0410-b5e6-96231b3b80d8
2001-11-27 00:03:19 +00:00
Chris Lattner
360e17eaf1 Move DataTypes.h from llvm/Support to just Support
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1399 91177308-0d34-0410-b5e6-96231b3b80d8
2001-11-26 23:04:08 +00:00
Vikram S. Adve
4c5fe2d3ed Add function returning which operand holds immediate constant
for a given opcode.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1307 91177308-0d34-0410-b5e6-96231b3b80d8
2001-11-14 18:48:36 +00:00
Ruchira Sasanka
b9f550ddfb added isPseudoInstr()
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1302 91177308-0d34-0410-b5e6-96231b3b80d8
2001-11-14 15:35:51 +00:00
Ruchira Sasanka
8486cdd3f9 Changed for adding Phi Elimination code
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1266 91177308-0d34-0410-b5e6-96231b3b80d8
2001-11-12 14:46:00 +00:00
Ruchira Sasanka
984adc25c9 Made isPhi const
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1251 91177308-0d34-0410-b5e6-96231b3b80d8
2001-11-10 20:58:58 +00:00
Vikram S. Adve
40abd3fab8 Cache parameters for target machine.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1222 91177308-0d34-0410-b5e6-96231b3b80d8
2001-11-09 02:11:25 +00:00
Vikram S. Adve
4938d4528f Added class MachineCacheInfo.
Also added function to convert float to int by copying via memory.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1221 91177308-0d34-0410-b5e6-96231b3b80d8
2001-11-09 02:11:03 +00:00
Vikram S. Adve
9b19894da9 Add handle to object MachineFrameInfo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1202 91177308-0d34-0410-b5e6-96231b3b80d8
2001-11-08 05:23:45 +00:00
Vikram S. Adve
1c84e2a7d3 Include handle to TargetMachine in each Machine...Info class.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1201 91177308-0d34-0410-b5e6-96231b3b80d8
2001-11-08 05:22:43 +00:00
Vikram S. Adve
44508e333c Add method CreateCodeToCopyIntToFloat.
Include handle to TargetMachine in each Machine...Info object.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1200 91177308-0d34-0410-b5e6-96231b3b80d8
2001-11-08 05:22:15 +00:00
Vikram S. Adve
7cffcaaa48 Machine-independent interface to target's stack frame layout parameters.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1190 91177308-0d34-0410-b5e6-96231b3b80d8
2001-11-08 04:52:27 +00:00
Ruchira Sasanka
0d3ea0268f Moved InsertCallerSaveInstr to the SparcRegInfo.cpp and made machine independent
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1107 91177308-0d34-0410-b5e6-96231b3b80d8
2001-11-03 17:14:13 +00:00
Ruchira Sasanka
78d63ee313 Moved callerSaving code to machine specific classes since we have to handle
%ccr reg differently.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@991 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-28 18:14:15 +00:00
Ruchira Sasanka
b3b6f5338c Added support for both call/jmpl instructions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@930 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-21 16:43:41 +00:00