1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-26 22:42:46 +02:00
Commit Graph

665 Commits

Author SHA1 Message Date
Chris Lattner
ab8e0e40f9 Add a method for inline asm support.
llvm-svn: 25656
2006-01-26 20:27:33 +00:00
Nate Begeman
c29fac7fce First part of bug 680:
Remove TLI.LowerVA* and replace it with SDNodes that are lowered the same
way as everything else.

llvm-svn: 25606
2006-01-25 18:21:52 +00:00
Evan Cheng
f4b53efbb2 Add a enum to specify target scheduling preference: SchedulingForLatency or
SchedulingForRegPressure. Added corresponding methods to set / get the value.

llvm-svn: 25598
2006-01-25 09:09:02 +00:00
Chris Lattner
b64d2919c7 Add a new InvalidateStructLayoutInfo method and some comments.
llvm-svn: 25303
2006-01-14 00:06:42 +00:00
Chris Lattner
8fe9dd16fb Provide an interface for Targets to specify their stack pointer register
for llvm.stacksave/restore.

llvm-svn: 25275
2006-01-13 17:47:52 +00:00
Jeff Cohen
8727139340 Oh oh... Unix is case sensitive.
llvm-svn: 24928
2005-12-22 01:46:59 +00:00
Jeff Cohen
8afabfd8f1 Make it compile with VC++.
llvm-svn: 24927
2005-12-22 01:44:51 +00:00
Evan Cheng
822f360f84 Added TargetLowering::isMaskedValueZeroForTargetNode() declaration.
llvm-svn: 24923
2005-12-21 23:15:41 +00:00
Evan Cheng
44e4e6a57f Added a hook to print out names of target specific DAG nodes.
llvm-svn: 24877
2005-12-20 06:22:03 +00:00
Nate Begeman
811a41a87c Support multiple ValueTypes per RegisterClass, needed for upcoming vector
work.  This change has no effect on generated code.

llvm-svn: 24563
2005-12-01 04:51:06 +00:00
Nate Begeman
a1c2df2471 Add the majority of the vector machien value types we expect to support,
and make a few changes to the legalization machinery to support more than
16 types.

llvm-svn: 24511
2005-11-29 05:45:29 +00:00
Nate Begeman
5784fb4adf Teach the type lowering code about turning packed types into vector types.
Next step: generating vector dag nodes, and legalizing them into scalar
code.

llvm-svn: 24404
2005-11-17 21:44:42 +00:00
Chris Lattner
bb448515ae Add a new option to indicate we want the code generator to emit code quickly,
not spending tons of time microoptimizing it.  This is useful for an -O0
style of build.

llvm-svn: 24235
2005-11-08 02:12:47 +00:00
Jeff Cohen
16669485c1 <cassert> no longer required to make VC++ happy.
llvm-svn: 24177
2005-11-04 02:59:16 +00:00
Duraid Madina
feeaabd6f1 change NULL to 0, unbreaks the ppc target when building on ia64
llvm-svn: 24176
2005-11-04 01:45:04 +00:00
Jim Laskey
42681c1d58 1. Remove ranges from itinerary data.
2. Tidy up the subtarget emittined code.

llvm-svn: 24172
2005-11-03 22:47:41 +00:00
Jeff Cohen
ae39880d3a Keep VC++ happy.
llvm-svn: 24148
2005-11-02 04:03:16 +00:00
Jim Laskey
4cb1e29b27 Allow itineraries to be passed through the Target Machine.
llvm-svn: 24139
2005-11-01 20:06:59 +00:00
Jim Laskey
03f8b2a366 Structures used to hold scheduling information.
llvm-svn: 24049
2005-10-27 18:18:05 +00:00
Jim Laskey
b377b32a58 Preparation of supporting scheduling info. Need to find info based on selected
CPU.

llvm-svn: 23974
2005-10-25 15:15:28 +00:00
Chris Lattner
79ea8acebc Move static functions to .cpp file, reduce #includes, pass strings by
const&.

llvm-svn: 23890
2005-10-23 05:25:19 +00:00
Nate Begeman
6c42f509bc Invert the TargetLowering flag that controls divide by consant expansion.
Add a new flag to TargetLowering indicating if the target has really cheap
  signed division by powers of two, make ppc use it.  This will probably go
  away in the future.
Implement some more ISD::SDIV folds in the dag combiner
Remove now dead code in the x86 backend.

llvm-svn: 23853
2005-10-21 00:02:42 +00:00
Nate Begeman
2b0b27775d Enable targets to say that integer divide is expensive, which will trigger
an upcoming optimization in the DAG Combiner.

llvm-svn: 23834
2005-10-20 02:14:14 +00:00
Nate Begeman
ee581735d9 Add the ability to lower return instructions to TargetLowering. This
allows us to lower legal return types to something else, to meet ABI
requirements (such as that i64 be returned in two i32 regs on Darwin/ppc).

llvm-svn: 23802
2005-10-18 23:23:37 +00:00
Chris Lattner
4bb574585f Fix case of path
llvm-svn: 23605
2005-10-03 03:32:39 +00:00
Chris Lattner
3a47224042 This member can be const too
llvm-svn: 23600
2005-10-03 00:21:25 +00:00
Chris Lattner
b19d4e5584 Expose the actual valuetype of each register class
llvm-svn: 23583
2005-10-02 06:23:19 +00:00
Chris Lattner
c744d9398f Rename MRegisterDesc -> TargetRegisterDesc for consistency
llvm-svn: 23564
2005-09-30 17:49:27 +00:00
Chris Lattner
6124aae803 trim down the target info structs now that we have a preferred spill register class for each callee save register
llvm-svn: 23560
2005-09-30 17:35:22 +00:00
Chris Lattner
18454e037b expose a new virtual method
llvm-svn: 23555
2005-09-30 07:06:37 +00:00
Chris Lattner
ec85d13393 Change these methods to take RC's
llvm-svn: 23535
2005-09-30 01:28:14 +00:00
Chris Lattner
62922d5727 Add a new flag for targets where setjmp/longjmp saves/restores the signal mask,
and _setjmp/_longjmp should be used instead (for llvm.setjmp/llvm.longjmp).

llvm-svn: 23479
2005-09-27 22:13:36 +00:00
Chris Lattner
e8cb4e7356 add a new callback
llvm-svn: 23373
2005-09-17 01:02:45 +00:00
Jim Laskey
1f9c40400c Add help support for -mcpu and -mattr.
llvm-svn: 23222
2005-09-02 19:27:43 +00:00
Chris Lattner
49eef12127 Move a bunch of non-deprecated methods above the "deprecated line"
llvm-svn: 23216
2005-09-02 18:16:20 +00:00
Jeff Cohen
930e81f03b Fix VC++ build errors
llvm-svn: 23210
2005-09-02 02:51:42 +00:00
Jim Laskey
f32ef9a37f 1. Use SubtargetFeatures in llc/lli.
2. Propagate feature "string" to all targets.

3. Implement use of SubtargetFeatures in PowerPCTargetSubtarget.

llvm-svn: 23192
2005-09-01 21:38:21 +00:00
Jim Laskey
09a731071f This new class provides support for platform specific "features". The intent
is to manage processor specific attributes from the command line.  See examples
of use in llc/lli and PowerPCTargetSubtarget.

llvm-svn: 23191
2005-09-01 21:36:18 +00:00
Reid Spencer
31b20389f9 Change the names of member variables per Chris' instructions, and document
them more clearly.

llvm-svn: 23118
2005-08-27 19:09:02 +00:00
Chris Lattner
e91069c4de add some forward defs
llvm-svn: 23100
2005-08-26 21:06:40 +00:00
Chris Lattner
ac19224b29 spell this right!
llvm-svn: 23097
2005-08-26 20:53:44 +00:00
Chris Lattner
98bd9339ce Add a hook
llvm-svn: 23096
2005-08-26 20:53:09 +00:00
Chris Lattner
fd72abe85b Add a new instruction flag
llvm-svn: 23093
2005-08-26 20:31:24 +00:00
Chris Lattner
b71b78a79d rename hasNativeSupportFor* -> is(Operation|Type)Legal.
llvm-svn: 23011
2005-08-24 16:34:59 +00:00
Chris Lattner
6fcfaee2fc Add a new field to TargetInstrDescriptor for tracking information about
operands.

llvm-svn: 22908
2005-08-19 16:56:26 +00:00
Nate Begeman
a978ae8b7d Remove the X86 and PowerPC Simple instruction selectors; their time has
passed.

llvm-svn: 22886
2005-08-18 23:53:15 +00:00
Chris Lattner
feb0442901 Since getSubtarget() always provides a const Subtarget, dont' require the user
to pass it in.  Also, since it always returns a non-null pointer, make it
return a reference instead for easier use.

llvm-svn: 22686
2005-08-05 21:53:21 +00:00
Jeff Cohen
81980781a1 Eliminate tabs and trailing spaces.
llvm-svn: 22520
2005-07-27 05:53:44 +00:00
Andrew Lenharth
8fc535e9bd allow constants to be relocated like GV (necessary for alpha, as constants are relocated with globals, not with .text), and allow targets to have a GOT managed for them
llvm-svn: 22496
2005-07-22 20:46:42 +00:00
Reid Spencer
40c5ebe4eb For: memory operations -> stores
This is the first incremental patch to implement this feature. It adds no
functionality to LLVM but setup up the information needed from targets in
order to implement the optimization correctly. Each target needs to specify
the maximum number of store operations for conversion of the llvm.memset,
llvm.memcpy, and llvm.memmove intrinsics into a sequence of store operations.
The limit needs to be chosen at the threshold of performance for such an
optimization (generally smallish). The target also needs to specify whether
the target can support unaligned stores for multi-byte store operations.
This helps ensure the optimization doesn't generate code that will trap on
an alignment errors.
More patches to follow.

llvm-svn: 22468
2005-07-19 04:52:44 +00:00
Nate Begeman
0a08ce9c07 Clean up and add comments to the newly implemented subtarget code.
llvm-svn: 22396
2005-07-12 03:04:49 +00:00
Nate Begeman
4d96f2769c Clean up the TargetSubtarget class a bit, removing an unnecessary argument
to the constructor.

llvm-svn: 22392
2005-07-12 02:41:19 +00:00
Nate Begeman
626fb671c8 Implement Subtarget support
Implement the X86 Subtarget.

This consolidates the checks for target triple, and setting options based
on target triple into one place.  This allows us to convert the asm printer
and isel over from being littered with "forDarwin", "forCygwin", etc. into
just having the appropriate flags for each subtarget feature controlling
the code for that feature.

This patch also implements indirect external and weak references in the
X86 pattern isel, for darwin.  Next up is to convert over the asm printers
to use this new interface.

llvm-svn: 22389
2005-07-12 01:41:54 +00:00
Chris Lattner
bf100c8bdb Make several cleanups to Andrews varargs change:
1. Pass Value*'s into lowering methods so that the proper pointers can be
   added to load/stores from the valist
2. Intrinsics that return void should only return a token chain, not a token
   chain/retval pair.
3. Rename LowerVAArgNext -> LowerVAArg, because VANext is long gone.

llvm-svn: 22338
2005-07-05 19:57:53 +00:00
Chris Lattner
82cdeff6db add some new file types
llvm-svn: 22286
2005-06-25 03:31:43 +00:00
Chris Lattner
37688fa81f refactor these interfaces a bit
llvm-svn: 22281
2005-06-25 02:47:50 +00:00
Andrew Lenharth
108f509fb5 header file changes for varargs
llvm-svn: 22253
2005-06-18 18:31:30 +00:00
Tanya Lattner
e8f3fe8b46 Added ModuloSchedSB as a friend class.
llvm-svn: 22237
2005-06-17 03:59:51 +00:00
Chris Lattner
ae59fdbd99 Pass the dag into LowerOperation
llvm-svn: 22005
2005-05-14 05:51:05 +00:00
Chris Lattner
9d788e93a6 Add an isTailCall flag to LowerCallTo
llvm-svn: 21958
2005-05-13 18:50:42 +00:00
Chris Lattner
ccb86c9acc LowerCallTo now takes the cc to use
llvm-svn: 21901
2005-05-12 19:57:08 +00:00
Chris Lattner
045b3f0110 Add a little hook
llvm-svn: 21883
2005-05-12 02:02:21 +00:00
Chris Lattner
05d8a36ba7 Expose an option allowing unsafe math optimizations. Patch contributed by
Morten Ofstad!

llvm-svn: 21630
2005-04-30 04:09:52 +00:00
Reid Spencer
e952b16f37 Shut GCC 4.0 up about classes that have virtual functions but a non-virtual
destructor. Just add the do-nothing virtual destructor.

llvm-svn: 21524
2005-04-25 02:55:55 +00:00
Misha Brukman
353d27c5fc * The aesthetic police is on patrol!!...
* ... but it wasn't so busy as to not smell the roses and doxygenify comments

llvm-svn: 21487
2005-04-23 22:35:26 +00:00
Chris Lattner
9484bc95af Add a helper method
llvm-svn: 21486
2005-04-23 22:20:22 +00:00
Misha Brukman
5e38b1e17e Convert tabs to spaces
llvm-svn: 21438
2005-04-22 03:46:24 +00:00
Misha Brukman
58c97e67f3 Remove trailing whitespace
llvm-svn: 21412
2005-04-21 20:59:05 +00:00
Nate Begeman
ecb5b5c028 Make pattern isel default for ppc
Add new ppc beta option related to using condition registers
Make pattern isel control flag (-enable-pattern-isel) global and tristate
  0 == off
  1 == on
  2 == target default

llvm-svn: 21309
2005-04-15 22:12:16 +00:00
Chris Lattner
f275f2af41 Allow targets which produce setcc results in non-MVT::i1 registers to describe
what the contents of the top bits of these registers are, in the common cases
of targets that sign and zero extend the results.

llvm-svn: 21145
2005-04-07 19:41:18 +00:00
Nate Begeman
e0ab2218d1 Change LowerCallTo to take a boolean isVarArg argument. This is needed
by the PowerPC backend, and probably others in the future.

llvm-svn: 20843
2005-03-26 01:30:30 +00:00
Chris Lattner
183a6977d2 add a helper method
llvm-svn: 20578
2005-03-13 19:04:04 +00:00
Chris Lattner
2a03fa3a5c Add a new method, described in the comment.
llvm-svn: 19683
2005-01-19 06:53:02 +00:00
Chris Lattner
4938a7c8a1 Move all data members to the end of the class.
Add a hook to find out how the target handles shift amounts that are out of
range.  Either they are undefined (the default), they mask the shift amount
to the size of the register (X86, Alpha, etc), or they extend the shift (PPC).

This defaults to undefined, which is conservatively correct.

llvm-svn: 19676
2005-01-19 03:36:03 +00:00
Chris Lattner
8dd332e4e5 Add comments
Add fields to hold the result type of setcc operations and shift amounts.

llvm-svn: 19618
2005-01-16 23:59:30 +00:00
Chris Lattner
e38f72316d Revamp supported ops. Instead of just being supported or not, we now keep
track of how to deal with it, and provide the target with a hook that they
can use to legalize arbitrary operations in arbitrary ways.

llvm-svn: 19609
2005-01-16 07:27:49 +00:00
Chris Lattner
605b9a23a2 Improve compatiblity with HPUX on Itanium, patch by Duraid Madina
llvm-svn: 19586
2005-01-16 01:31:31 +00:00
Chris Lattner
1d0e1ffe02 Move some information out of LegalizeDAG into the generic Target interface.
llvm-svn: 19581
2005-01-16 01:10:58 +00:00
Chris Lattner
98611ce291 Add a new target-independent code generator flag.
llvm-svn: 19567
2005-01-15 06:00:32 +00:00
Chris Lattner
42dd85fc56 Add interfaces to lower varargs and return/frame address intrinsics.
llvm-svn: 19406
2005-01-09 00:00:31 +00:00
Chris Lattner
2a75da3851 Make LowerCallTo more generic and useful.
llvm-svn: 19373
2005-01-08 19:25:39 +00:00
Chris Lattner
01ed041b94 First draft of a new Target interface
llvm-svn: 19323
2005-01-07 07:44:22 +00:00
Chris Lattner
a008165daa Add some bits that can be set on instructions. Renumber existing bits so
they are dense.  Add a virtual method that targets can choose to implement.

llvm-svn: 19242
2005-01-02 02:28:31 +00:00
Chris Lattner
ed19f4fe7d Fix a warning
llvm-svn: 18083
2004-11-21 04:42:32 +00:00
Chris Lattner
ebb79ba538 Add new methods that a target should implement
llvm-svn: 18060
2004-11-20 23:50:02 +00:00
Chris Lattner
bae6c00a15 Allow targets to implement relocation support.
llvm-svn: 18032
2004-11-20 03:43:27 +00:00
Chris Lattner
dd0094e4ed Convert 'struct' to 'class' in various places to adhere to the coding standards
and work better with VC++.  Patch contributed by Morten Ofstad!

llvm-svn: 17281
2004-10-27 16:14:51 +00:00
Nate Begeman
2a64d462d9 Move destructor out of line to avoid vtable emission in every file that includes the header. Thanks to sabre.
llvm-svn: 17278
2004-10-27 06:00:53 +00:00
Nate Begeman
a6fafb1f64 Fix the build by eliminating some more dead code. That'll learn me not to listen to Reid
llvm-svn: 17275
2004-10-27 05:44:23 +00:00
Nate Begeman
3a55e171f1 Remove dead data member in MRegisterInfo class. Thanks sabre!
llvm-svn: 17274
2004-10-27 04:51:58 +00:00
Nate Begeman
4363d6203f Remove method getRegClass from MRegisterInfo, as it is no longer used.
llvm-svn: 17243
2004-10-26 06:00:31 +00:00
Chris Lattner
94f00d243c Remove a dead class. Thanks to Morten Ofstad for pointing this out.
llvm-svn: 17222
2004-10-25 19:07:43 +00:00
Chris Lattner
89a80a46f1 Be consistent with our naming
llvm-svn: 16552
2004-09-28 18:37:00 +00:00
Chris Lattner
c92b280e0d Capture information about whether the target instructions have delay slots
llvm-svn: 16550
2004-09-28 18:33:50 +00:00
Alkis Evlogimenos
adea49eec0 Use class instead of struct for defining classes. This unbreaks the
build on windows. Patch contributed by Paolo Invernizzi!

llvm-svn: 16531
2004-09-28 01:59:17 +00:00
Reid Spencer
c4abcbefb1 Changes For Bug 352
Move include/Config and include/Support into include/llvm/Config,
include/llvm/ADT and include/llvm/Support. From here on out, all LLVM
public header files must be under include/llvm/.

llvm-svn: 16137
2004-09-01 22:55:40 +00:00
Nate Begeman
440c16066f Update doxygen comment now that getSpillSize is supposed to return value in bits
llvm-svn: 16101
2004-08-29 21:59:26 +00:00
Alkis Evlogimenos
100c89e9ea Add getAllocatableSet() function.
llvm-svn: 16059
2004-08-26 22:21:04 +00:00
Brian Gaeke
9e089c115d M_DUMMY_PHI_FLAG is no longer used to distinguish V9::PHI. Get rid of it and
its TargetInstrInfo accessor.

llvm-svn: 15907
2004-08-18 20:04:28 +00:00
Brian Gaeke
af14dcae5d M_PSEUDO_FLAG is no longer used. Get rid of it and its accessor.
llvm-svn: 15902
2004-08-18 17:44:17 +00:00
Chris Lattner
41fd07b81e Add punctuation, add a new method
llvm-svn: 15886
2004-08-17 19:12:44 +00:00
Chris Lattner
94c82ae3a2 Flags and TSFlags were (thankfully) never used, so remove them. But wait,
not so fast, add some fields for spill slot size and alignment

llvm-svn: 15803
2004-08-16 01:07:53 +00:00
Chris Lattner
0d16641abb Add new TargetRegisterClass::contains method
llvm-svn: 15783
2004-08-15 22:19:38 +00:00
Chris Lattner
6f1512829d Implement a long overdue FIXME, by changing these methods to return void.
llvm-svn: 15778
2004-08-15 22:14:19 +00:00
Chris Lattner
9e7147dc23 Eliminate the RegisterClass argument, since it can easily be derived from
the regno

llvm-svn: 15773
2004-08-15 21:55:29 +00:00
Alkis Evlogimenos
dbe432aee7 Make this compile on gc 3.4.1 (static_cast to non-const type was not
allowed).

llvm-svn: 15766
2004-08-15 09:18:55 +00:00
Nate Begeman
cbc21460f2 Elminiate MachineFunction& argument from eliminateFrameIndex
llvm-svn: 15736
2004-08-14 22:00:10 +00:00
Chris Lattner
009bda369a Allow targets to specify particular stack slots that certain physregs must
be spilled into.

llvm-svn: 15702
2004-08-12 19:01:55 +00:00
Chris Lattner
837ab8fcf6 Remove dead methods
llvm-svn: 15698
2004-08-12 18:37:15 +00:00
Chris Lattner
8af864daa3 Remove dead methods
llvm-svn: 15691
2004-08-12 17:58:27 +00:00
Misha Brukman
eac800ff93 Add new constructor.
llvm-svn: 15632
2004-08-10 23:10:21 +00:00
Brian Gaeke
69f47e236f getResultPos() is dead.
llvm-svn: 15484
2004-08-04 08:06:30 +00:00
Tanya Lattner
763a90b5fa Adding friend MSSchedule for ModuloScheduling pass.
llvm-svn: 15407
2004-08-01 18:57:38 +00:00
Chris Lattner
e8b9d3f67c Fix warning
llvm-svn: 15406
2004-08-01 18:17:36 +00:00
Alkis Evlogimenos
e28642a6a5 Change signature to take two basic blocks: the target and the one
where the goto will be appended.

llvm-svn: 15361
2004-07-31 09:37:52 +00:00
Alkis Evlogimenos
b338ca7306 Doxygenify some comments.
llvm-svn: 15360
2004-07-31 08:57:27 +00:00
Alkis Evlogimenos
6308a8a8e0 Remove const from iterators passed by value.
llvm-svn: 15359
2004-07-31 08:55:23 +00:00
Alkis Evlogimenos
2ca8d29454 Add declarations for insertGoto and reverseBranchCondition.
llvm-svn: 15358
2004-07-31 08:52:30 +00:00
Chris Lattner
d46a44390f Add new M_BARRIER_FLAG flag, and isBarrier() method to TargetInstrInfo
opCode -> Opcode

llvm-svn: 15353
2004-07-31 02:06:48 +00:00
Brian Gaeke
99f18cc97f TargetInstrInfo::hasOperandInterlock() is always true, because it is
never overridden by any target.

llvm-svn: 15308
2004-07-28 19:24:48 +00:00
Brian Gaeke
1ec15e0428 ConstantTypeMustBeLoaded has been incorporated into SparcV9PreSelection, its
only user.

llvm-svn: 15294
2004-07-27 21:43:38 +00:00
Brian Gaeke
a71776e676 As it happens, none of these TargetInstrInfo methods which are only
used in the SparcV9 backend really have anything to do with
TargetInstrInfo, so we're converting them into regular old global
functions and moving their declarations to SparcV9InstrSelectionSupport.h.
(They're mostly used as helper functions for SparcV9InstrSelection.)

llvm-svn: 15277
2004-07-27 17:43:22 +00:00
Chris Lattner
de0fddf8ee Add a note
llvm-svn: 15257
2004-07-27 04:00:54 +00:00
Chris Lattner
7d98fd121c Fix out of date comment
llvm-svn: 15256
2004-07-27 03:04:30 +00:00
Misha Brukman
29445f8a8b * Add a BoolAlignment field to TargetData, default is 1 byte
* Fix spacing

llvm-svn: 15119
2004-07-23 01:08:13 +00:00
Chris Lattner
050495885f Add a new listener class for things that want to be informed about new
targets that are loaded

llvm-svn: 14758
2004-07-11 06:02:59 +00:00
Chris Lattner
2ea95d837e Delete the allocate*TargetMachine functions. Move options to a header file
that makes sense.

llvm-svn: 14754
2004-07-11 04:15:52 +00:00
Chris Lattner
2a79beb587 Add a new TargetNameParser class, which is useful for parsing options.
Add two methods which are useful for autoselecting targets.

llvm-svn: 14748
2004-07-11 03:59:46 +00:00
Chris Lattner
195638502a First cut at TargetMachineRegistry and RegisterTarget classes
llvm-svn: 14742
2004-07-11 02:43:43 +00:00
Chris Lattner
8b4d801eab Add two new "virtual static" methods to the TargetMachine class
llvm-svn: 14741
2004-07-11 02:43:07 +00:00
Misha Brukman
3f5007bdd0 * Doxygenify comments
* Tabs-to-spaces

llvm-svn: 14549
2004-07-01 20:42:00 +00:00
Misha Brukman
e38f7ed2cc Spell out `NoFramePointerElim' for readability.
llvm-svn: 14299
2004-06-21 21:17:44 +00:00
Misha Brukman
2b3c4ca665 Make a single `NoFPElim' switch available to all targets.
llvm-svn: 14296
2004-06-21 21:07:51 +00:00
Brian Gaeke
9f7f63256d I'm afraid this doesn't exist.
llvm-svn: 14193
2004-06-16 00:26:45 +00:00
Misha Brukman
4fdc92647b Fix grammar: 's is for possessive only.
llvm-svn: 14155
2004-06-11 16:50:21 +00:00
Chris Lattner
0c385225b2 Add documentation to the TargetFrameInfo class, contributed by Vladimir Prus
llvm-svn: 14060
2004-06-08 06:23:17 +00:00
Chris Lattner
11d0f8d30e Fix a nasty bug that caused areAliases to always return false.
Bug fix courtesy of Anshu Dasgupta

llvm-svn: 14011
2004-06-04 17:03:11 +00:00
Brian Gaeke
e3e792cefa Collapse together the abstract superclass TargetRegInfo and SparcV9RegInfo, its
only concrete implementation.

llvm-svn: 13977
2004-06-03 02:45:09 +00:00
Chris Lattner
2963942e84 Delete the V9 specific findOptimalStorageSize method, inlining it into all callers.
Substantially clean up all target implementations by having the OPTIONAL get*Info
methods return a pointer instead of a reference.  This allows us to have default
implementations!

llvm-svn: 13950
2004-06-02 05:53:25 +00:00
Tanya Lattner
f97f4f8760 Changed CPUResource to allow access to max num users for a resource.
Also added ModuloScheduling as a friend.

llvm-svn: 13426
2004-05-08 16:13:26 +00:00
Tanya Lattner
6332b09438 Sorry, now friend class name should be right!!
llvm-svn: 13294
2004-04-30 20:48:37 +00:00
Tanya Lattner
7a414c92c2 Fixed friend class name for ModuloScheduling.
llvm-svn: 13293
2004-04-30 20:47:59 +00:00
Tanya Lattner
185c13da4c Fixed friend class name for ModuloSched
llvm-svn: 13292
2004-04-30 20:46:40 +00:00
Tanya Lattner
077c819d5a Removing MachineResource class.
llvm-svn: 13291
2004-04-30 20:40:38 +00:00
Brian Gaeke
071e2bce64 Merged this file into the SparcV9 target.
llvm-svn: 13128
2004-04-23 18:17:03 +00:00
Brian Gaeke
cd21d1e40f Add a copy constructor for TargetData.
llvm-svn: 12948
2004-04-14 17:45:48 +00:00
Alkis Evlogimenos
2b94b048a9 Another API change to MRegisterInfo::foldMemoryOperand. Instead of a
MachineBasicBlock::iterator take a MachineInstr*.

llvm-svn: 12392
2004-03-14 20:14:27 +00:00
Alkis Evlogimenos
ff9482b664 Change MRegisterInfo::foldMemoryOperand to return the folded
instruction to make the API more flexible.

llvm-svn: 12386
2004-03-14 07:19:51 +00:00
Misha Brukman
384b4b20d4 Move function implementations to a .cpp file, avoid #including <cstdlib> here.
llvm-svn: 12296
2004-03-11 23:52:03 +00:00
Brian Gaeke
0b913593ae make -print-machineinstrs work for both SparcV9 and X86
llvm-svn: 12122
2004-03-04 19:16:23 +00:00
Chris Lattner
8f80c299f2 Add a new constructor
llvm-svn: 12087
2004-03-03 02:12:47 +00:00
Brian Gaeke
b78f8498f0 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.

llvm-svn: 12043
2004-03-01 06:43:29 +00:00
Brian Gaeke
8303cb575e Remove dead member variables of SparcV9SchedInfo and TargetSchedInfo
llvm-svn: 11994
2004-02-29 08:40:03 +00:00
Chris Lattner
b5f0e162c7 Eliminate the distinction between "real" and "unreal" instructions
llvm-svn: 11986
2004-02-29 06:31:16 +00:00
Chris Lattner
e4db708a7c Scrap a huge layer of cruft out of this interface.
llvm-svn: 11980
2004-02-29 05:57:21 +00:00
Chris Lattner
38ae1362de Add hook for V8 target
llvm-svn: 11961
2004-02-28 19:54:16 +00:00
Alkis Evlogimenos
b15631fcfa Uncomment assertions that register# != 0 on calls to
MRegisterInfo::is{Physical,Virtual}Register. Apply appropriate fixes
to relevant files.

llvm-svn: 11882
2004-02-26 22:00:20 +00:00
Chris Lattner
3235a2b876 Make TargetData no longer use annotations!
llvm-svn: 11874
2004-02-26 08:01:57 +00:00
Alkis Evlogimenos
a198c0148c Temporarily comment out asserts as they break things. I will uncomment
them when all the problem areas are fixed.

llvm-svn: 11855
2004-02-25 23:56:36 +00:00
Alkis Evlogimenos
0865239405 Duh, forgot to close the parenthesis.
llvm-svn: 11843
2004-02-25 22:07:14 +00:00
Alkis Evlogimenos
5b45bf1940 Add assert to isPhysicalRegister and isVirtualRegister to fail when
passed the special 'register' 0.

llvm-svn: 11842
2004-02-25 22:04:28 +00:00
Alkis Evlogimenos
f1516015af Add DenseMap template and actually use it for for mapping virtual regs
to objects.

llvm-svn: 11840
2004-02-25 21:55:45 +00:00
Brian Gaeke
c6de948cd1 Great renaming part II: Sparc --> SparcV9 (also includes command-line options and Makefiles)
llvm-svn: 11827
2004-02-25 19:08:12 +00:00
Alkis Evlogimenos
ef9c4f4339 This is needed by assignment verification in linear-scan.
llvm-svn: 11618
2004-02-19 01:10:55 +00:00
Chris Lattner
affbcb6be5 Simplify and document the new interface
llvm-svn: 11524
2004-02-17 05:54:26 +00:00
Alkis Evlogimenos
c4ec9111bb Add API to check and fold memory operands into instructions.
llvm-svn: 11519
2004-02-17 04:33:18 +00:00
Chris Lattner
b8bfcaff7e The prologue/epilogue related method calls have no reason to return a value,
make them return void.

llvm-svn: 11447
2004-02-14 19:49:05 +00:00
Chris Lattner
8641f2fb58 Make sure to provide a prototype for the cbackend
llvm-svn: 11419
2004-02-13 23:36:03 +00:00
Alkis Evlogimenos
6d6ab846af Remove getAllocatedRegNum(). Use getReg() instead.
llvm-svn: 11393
2004-02-13 21:01:20 +00:00
Alkis Evlogimenos
3ecdcd18c5 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.

llvm-svn: 11357
2004-02-12 18:49:07 +00:00
Alkis Evlogimenos
94cab18bdc 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().

llvm-svn: 11345
2004-02-12 08:11:04 +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
7246d4efd0 Fix typos in comments.
llvm-svn: 11333
2004-02-11 19:47:43 +00:00
Brian Gaeke
a393704706 Add prototype for llvm::allocatePowerPCTargetMachine().
llvm-svn: 11072
2004-02-02 19:05:08 +00:00
Alkis Evlogimenos
0ec32d4118 Add MRegisterInfo::getNumRegs().
llvm-svn: 11058
2004-02-01 17:14:20 +00:00
Chris Lattner
dadbb4da4d Add two static methods to avoid having client code explicitly compare against
FirstVirtualRegister

llvm-svn: 11031
2004-01-31 19:57:11 +00:00
Misha Brukman
26b6be3053 If you call abort(), #include <cstdlib>
llvm-svn: 10941
2004-01-21 22:50:12 +00:00
Chris Lattner
c37577eb9f Clean up a lot of the code I added yesterday by exposing the IntrinsicLowering
implementation from the TargetMachine directly.

llvm-svn: 10636
2003-12-28 21:23:38 +00:00
Alkis Evlogimenos
24b3159dfc Add TargetInstrInfo::isMoveInstr() to support coalescing in register
allocation.

llvm-svn: 10633
2003-12-28 17:35:08 +00:00
Chris Lattner
869549f54b We may now pass IntrinsicLowering implementations into these methods
llvm-svn: 10630
2003-12-28 09:48:17 +00:00
Chris Lattner
07a17d5ffe Doxygenize methods, add new getIntPtrType method
llvm-svn: 10578
2003-12-22 05:00:45 +00:00
Chris Lattner
1cb1efedb3 Rip JIT specific stuff out of TargetMachine, as per PR176
llvm-svn: 10542
2003-12-20 01:22:19 +00:00
Chris Lattner
18e6e48ff0 Add new getJITStubForFunction method, which may optionally be implemented by
targets for better performance.

llvm-svn: 10429
2003-12-12 07:10:32 +00:00
Brian Gaeke
d25f86d683 Put all LLVM code into the llvm namespace, as per bug 109.
llvm-svn: 9903
2003-11-11 22:41:34 +00:00
Misha Brukman
7fa3523f55 Since this function returns an int, let's actually return something.
llvm-svn: 9734
2003-11-05 19:48:05 +00:00
Alkis Evlogimenos
a6f280b483 Update documentation since it was misleading: make it clear that a
negative instruction count is returned if instructions are removed
from a basic block.

llvm-svn: 9705
2003-11-04 23:07:00 +00:00
Alkis Evlogimenos
c6a7c83333 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.

llvm-svn: 9704
2003-11-04 22:57:09 +00:00
John Criswell
16c6cda9d5 Added LLVM copyright header (for lack of a better term).
llvm-svn: 9304
2003-10-20 20:19:47 +00:00
Brian Gaeke
04115cb86a Make replaceMachineCodeForFunction return void.
Make it assert by default.

llvm-svn: 9287
2003-10-20 15:14:33 +00:00
Brian Gaeke
fc52099b3c Add stub version of replaceMachineCodeForFunction. It will live here until
we have a better place for it to go.

llvm-svn: 9197
2003-10-17 18:26:45 +00:00
Chris Lattner
4e4c763dfc Standardize header file comments
llvm-svn: 8782
2003-09-30 18:37:50 +00:00
Chris Lattner
8ec3783590 Remove dead file
llvm-svn: 8313
2003-09-01 20:41:21 +00:00
Chris Lattner
feebbdd6d1 No longer require an OptInfo
llvm-svn: 8310
2003-09-01 20:40:43 +00:00
Chris Lattner
90253d18b1 Targets should configure themselves based on the module, not some wierd flags
llvm-svn: 8131
2003-08-24 19:49:07 +00:00
Misha Brukman
cda7f97dbb The word dependent' has no a'.
llvm-svn: 8030
2003-08-21 22:14:26 +00:00
Misha Brukman
56f7db4178 Spell `necessary' correctly.
llvm-svn: 7944
2003-08-18 14:43:39 +00:00
Chris Lattner
09d58b8157 Remove extraneous #include
llvm-svn: 7881
2003-08-15 05:21:30 +00:00
Brian Gaeke
299cf12f45 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
4c675245b9 The NOOP instruction is no longer needed. Instead, use the
TargetInstrInfo::isNOPinstr method

llvm-svn: 7530
2003-08-03 18:52:15 +00:00
Chris Lattner
1fd37738b6 Code generation passes don't need access to raw LLVM types, this method is unnecessary.
llvm-svn: 7412
2003-07-30 05:29:45 +00:00
Vikram S. Adve
b73a1c0085 Unify all constant evaluations that depend on register size
in TargetInstrInfo::ConvertConstantToIntType.

llvm-svn: 7398
2003-07-29 20:30:20 +00:00
Vikram S. Adve
e02f966e3e Moved insertCallerSavingCode() to PhyRegAlloc and
moved isRegVolatile and modifiedByCall here: they are all
machine independent.  Remove all uses of PhyRegAlloc.

llvm-svn: 7387
2003-07-29 19:41:23 +00:00
Chris Lattner
396841f185 Move value type enums to CodeGen/ValueTypes.h
llvm-svn: 7376
2003-07-29 05:13:34 +00:00
Vikram S. Adve
73f410f53f 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.

llvm-svn: 7328
2003-07-25 21:01:43 +00:00
Chris Lattner
be4a5081d1 #include <cassert> as necessary...
llvm-svn: 7315
2003-07-25 17:58:41 +00:00
Anand Shukla
351c0f6342 Added special consideration for instrumentation strategy
llvm-svn: 7208
2003-07-20 15:39:30 +00:00
Misha Brukman
5de3e14206 The word separate' only has one e'.
llvm-svn: 7173
2003-07-14 17:20:40 +00:00
John Criswell
258dfc0319 Merged in autoconf branch. This provides configuration via the autoconf
system.

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

llvm-svn: 6924
2003-06-27 00:00:48 +00:00
Chris Lattner
6c12776232 Remove a ton of extraneous #includes
llvm-svn: 6842
2003-06-22 03:08:05 +00:00
John Criswell
4781723de6 Included assert.h so that the code compiles under newer versions of GCC.
llvm-svn: 6682
2003-06-11 14:01:36 +00:00
Chris Lattner
347bd5fb6f Remove noncopyableV base classes, as they were confusing the doxygen documentation,
making it harder to read.

llvm-svn: 6575
2003-06-03 15:28:40 +00:00
Vikram S. Adve
9625e27034 Made a single common InvalidRegNum = -1.
llvm-svn: 6473
2003-05-31 07:44:07 +00:00
Misha Brukman
ef428e8dca Fixed misspelling and broke a line that was wrapping.
llvm-svn: 6391
2003-05-29 05:00:14 +00:00
Misha Brukman
2f45624868 Allow allocation of a Sparc TargetMachine.
llvm-svn: 6364
2003-05-27 21:46:07 +00:00
Vikram S. Adve
73ee5ff6b8 (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.

llvm-svn: 6343
2003-05-27 00:07:13 +00:00
Vikram S. Adve
e3af518f95 Make case of GetNumOfInt/FloatArgRegs functions to be use lower case
like all the other functions.

llvm-svn: 6326
2003-05-25 16:02:05 +00:00
Misha Brukman
6ffaa5b188 Reword to remove reference to how things worked in the past.
llvm-svn: 6323
2003-05-24 01:08:43 +00:00
Misha Brukman
151f7484ab 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.

llvm-svn: 6319
2003-05-24 00:08:39 +00:00
Chris Lattner
bbe1aba425 Remove two fields from TargetData which are target specific.
llvm-svn: 5963
2003-04-26 20:11:09 +00:00
Chris Lattner
a550ee6b5d Fix method name type-o
llvm-svn: 5933
2003-04-25 05:23:27 +00:00
Chris Lattner
a106185aa1 Default ctor doesn't provide name
llvm-svn: 5921
2003-04-25 02:50:19 +00:00
Chris Lattner
55a4aea29b Add new targetdata ctor to create a targetdata appropriate to the module
llvm-svn: 5902
2003-04-24 19:08:45 +00:00
Misha Brukman
71aef01e7e Must use std::pair instead of just 'pair'.
llvm-svn: 5767
2003-04-07 00:25:09 +00:00
Guochun Shi
59e61c4ce2 added a function and a member to the TargetSchedInfo class
which is used  by Modulo Scheduling pass

llvm-svn: 5766
2003-04-07 00:00:36 +00:00
Chris Lattner
eac243c414 Simplify the interface
llvm-svn: 5313
2003-01-15 21:13:32 +00:00
Chris Lattner
b27d60ccf1 Rename MachineInstrInfo -> TargetInstrInfo
llvm-svn: 5272
2003-01-14 22:00:31 +00:00
Chris Lattner
ab69d9da2f Move annotation to support library
llvm-svn: 5268
2003-01-14 21:29:58 +00:00
Chris Lattner
8decb3e453 Rename MachineInstrInfo -> TargetInstrInfo
llvm-svn: 5214
2003-01-13 00:21:32 +00:00
Chris Lattner
5fd0d8f44b * Start renaming MachineInstrInfo -> TargetInstrInfo
* Add new M_TERMINATOR_FLAG

llvm-svn: 5213
2003-01-13 00:21:19 +00:00
Chris Lattner
2117077d8f Add new getName method
llvm-svn: 5212
2003-01-13 00:19:44 +00:00
Chris Lattner
dfa3c21f1c More renamings of Target/Machine*Info to Target/Target*Info
llvm-svn: 5204
2002-12-29 03:13:05 +00:00
Chris Lattner
bff4411f3a Rename MachineOptInfo to TargetoptInfo
Rename MachineCacheInfo to TargetCacheInfo

llvm-svn: 5203
2002-12-29 02:50:35 +00:00
Chris Lattner
c3dbf62971 * doxygenize comment
* rename MachineFrameInfo to TargetFrameInfo

llvm-svn: 5170
2002-12-28 20:13:29 +00:00
Chris Lattner
90d1ea29ab Sparc specific methods default to abort rather than being pure virtual
llvm-svn: 5169
2002-12-28 20:12:54 +00:00
Chris Lattner
51c7c172db Expose some very simple information about the frame, rather than in-depth
target specific information.  Rename MachineFrameInfo to TargetFrameInfo

llvm-svn: 5168
2002-12-28 20:12:10 +00:00
Chris Lattner
b525ce97cc * 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

llvm-svn: 5167
2002-12-28 20:10:23 +00:00
Chris Lattner
881ffece47 Simplify spill interface methods
llvm-svn: 5142
2002-12-25 05:02:00 +00:00
Chris Lattner
b44ebe2588 Add comment
llvm-svn: 5141
2002-12-25 05:01:46 +00:00
Chris Lattner
bc5e71ef2f Allow the target machines to specify endianness and pointer size
llvm-svn: 5128
2002-12-24 00:02:17 +00:00
Chris Lattner
079d149fbd Simplify interface to remove virtual function references
llvm-svn: 5100
2002-12-17 04:20:39 +00:00
Chris Lattner
3b7f709ebd Add support for register alias set description
llvm-svn: 5080
2002-12-16 16:39:14 +00:00
Chris Lattner
07cc730ddd Export well known instruction opcodes usable by target independant passes
llvm-svn: 5063
2002-12-15 22:16:08 +00:00
Chris Lattner
4214ac384a Simplify interfaces used by regalloc to insert code
llvm-svn: 5052
2002-12-15 20:06:35 +00:00
Chris Lattner
9b1957fd1e Simplify TargetRegisterClass a bit, also eliminating virtual function call
overhead

llvm-svn: 5049
2002-12-15 19:29:14 +00:00
Chris Lattner
51cf15cf12 * 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

llvm-svn: 5046
2002-12-15 18:40:01 +00:00
Misha Brukman
fb02408496 Added moveReg2Reg() and moveImm2Reg() to accomodate moving data around due to
PHI nodes.

llvm-svn: 5001
2002-12-13 09:54:12 +00:00
Misha Brukman
bc60f65211 Define the 2-address flag used by X86 instructions (add,sub,and,or,xor) that
need to be declared as such.

llvm-svn: 4975
2002-12-12 23:19:51 +00:00
Misha Brukman
32ec427192 Added prototypes for emitting prologue and epilogue for function code
generation.

llvm-svn: 4927
2002-12-04 23:55:56 +00:00
Misha Brukman
101076f586 storeReg2RegOffset() and loadRegOffset2Reg() now take the iterator by value
instead of by reference, since they return the modified iterator.

llvm-svn: 4914
2002-12-04 17:14:13 +00:00
Misha Brukman
6e1c4851ea Moved buildReg2RegClassMap() into from X86RegisterInfo to MRegisterInfo, since
it is target-independent.

llvm-svn: 4911
2002-12-04 16:47:04 +00:00
Chris Lattner
aeb454c30e Expose target data through a method for uniformity
llvm-svn: 4901
2002-12-04 05:20:12 +00:00
Misha Brukman
6b9cb74fdc RegisterInfo now supports handing out caller- and callee-save registers, as
well as building a map from a physical register to its register class.

llvm-svn: 4896
2002-12-03 23:09:53 +00:00
Chris Lattner
866d635098 Add entries to track information about implicit uses and definitions of
the instructions

llvm-svn: 4875
2002-12-03 05:41:32 +00:00
Chris Lattner
920d619d39 The hopefully final version of addPassesToEmitMachineCode which does not
have any question about ownership

llvm-svn: 4863
2002-12-02 21:15:42 +00:00
Chris Lattner
b7073c8c07 Add comment about ownership semantics
llvm-svn: 4859
2002-12-02 21:13:45 +00:00
Chris Lattner
9872f53512 Add stub to emit machine code for JIT
llvm-svn: 4856
2002-12-02 21:00:50 +00:00
Misha Brukman
32d007461d Added virtual functions for storing and retrieving values from the stack.
llvm-svn: 4824
2002-11-22 22:41:23 +00:00
Misha Brukman
45b9648b91 MRegisterInfo.h - Added prototypes for functions we need to map a register to
an appropriate TargetRegisterClass, also adds TargetRegisterClass definition.
TargetMachine.h - speling.

llvm-svn: 4781
2002-11-20 18:54:53 +00:00
Chris Lattner
e138d4fbc8 Make sure that print gets a targetmachine
CVS: ----------------------------------------------------------------------

llvm-svn: 4735
2002-11-17 23:21:45 +00:00
Chris Lattner
9971426ca0 Add machine independant printer interface
llvm-svn: 4729
2002-11-17 22:54:55 +00:00
Chris Lattner
19f27845eb * Add new "Target Specific Flags" field to instruction descriptor
* Rename iclass to Flags

llvm-svn: 4439
2002-10-30 01:06:53 +00:00
Chris Lattner
c7854f4c8f Add new optional getRegisterInfo to TargetMachine
llvm-svn: 4436
2002-10-30 00:53:02 +00:00
Chris Lattner
87eb530014 Eliminate virtual methods that are sparc specific
llvm-svn: 4419
2002-10-29 22:01:26 +00:00
Chris Lattner
5d798b7887 * Privatize the TargetName
* Move optSizeForSubWordData to TargetData
* Remove unused fields

llvm-svn: 4417
2002-10-29 21:48:17 +00:00
Chris Lattner
eec571dce8 Allow TargetMachine to refuse static code gen
llvm-svn: 4415
2002-10-29 21:12:46 +00:00
Chris Lattner
cc026ad4fc Rename Sparc.h to TargetMachineImpls.h. Add hook for X86 target
llvm-svn: 4412
2002-10-29 20:51:29 +00:00
Chris Lattner
8d372a1161 Add hook for JIT compiler
llvm-svn: 4411
2002-10-29 20:51:10 +00:00
Chris Lattner
16081ceef1 Move to TargetMachineImpls.h
llvm-svn: 4405
2002-10-29 20:44:18 +00:00
Chris Lattner
2859640d1c Merge to MachineInstrInfo.h
llvm-svn: 4402
2002-10-29 20:10:19 +00:00
Chris Lattner
b49e35e745 Move TargetInstrDescriptors extern to the one .cpp file that refers to it:
MachineInstr.cpp

llvm-svn: 4392
2002-10-29 17:40:30 +00:00
Chris Lattner
4c00b1bb14 Rename opCodeString to Name, add new getName() method
llvm-svn: 4388
2002-10-29 17:35:09 +00:00
Chris Lattner
4cb6ebc9a1 Rename MachineInstrInfo::getDescriptor to MachineInstrInfo::get
llvm-svn: 4387
2002-10-29 17:26:26 +00:00
Chris Lattner
8869c9be36 MachineInstrInfo doesn't need a TargetMachine member
llvm-svn: 4371
2002-10-29 15:44:40 +00:00
Chris Lattner
d5faf681bb Minor cleanups, remove noncopyable so dot doesn't cluster unrelated stuff
llvm-svn: 4365
2002-10-28 23:54:23 +00:00
Chris Lattner
dce27e5927 Strip a bunch of #includes from the file, move some virtual functions to
.cpp file

llvm-svn: 4364
2002-10-28 23:53:56 +00:00
Chris Lattner
d5953f5c63 Inline some code from the cpp file
llvm-svn: 4363
2002-10-28 23:53:32 +00:00
Chris Lattner
566b2147f9 Remove all traces of the "Opcode Mask" field in the MachineInstr class
llvm-svn: 4359
2002-10-28 21:17:20 +00:00
Chris Lattner
c32337fb08 * s/unsigned int/unsigned
* Make MachineInstrDescriptor only keep a const char * instead of a string
  for the opcode name.

llvm-svn: 4335
2002-10-28 04:55:56 +00:00
Chris Lattner
ec393ff469 Make scheduling class variables be 'unsigned' instead of 'int'
llvm-svn: 4334
2002-10-28 04:53:18 +00:00
Chris Lattner
10a01c1620 Remvoe a bunch of unneeded forward decls
llvm-svn: 4326
2002-10-28 02:27:07 +00:00
Chris Lattner
a7e9d3e90f Don't #include <Support/*>, #include "Support/*"
llvm-svn: 4325
2002-10-28 02:11:53 +00:00
Chris Lattner
8e5f672533 * Doxygenify comments
* Move addPassesToEmitAssembly back to Sparc.cpp because it really is
  sparc specific

llvm-svn: 4306
2002-10-28 01:02:24 +00:00
Misha Brukman
142795fd17 Changed MachineCodeForMethod' to MachineFunction'.
llvm-svn: 4301
2002-10-28 00:28:31 +00:00
Chris Lattner
4eae2fc3ad Initial checkin of target support for X86 backend.
llvm-svn: 4287
2002-10-25 23:00:40 +00:00
Chris Lattner
5ae74dd3ef * Remove unneccesary #includes
* Fix typeo in the (unused) MachineInstrInfo::isArith method

llvm-svn: 4275
2002-10-24 22:34:41 +00:00
Chris Lattner
294eae6735 - Add an endianness field to the TargetData datastructure
llvm-svn: 4174
2002-10-14 22:41:13 +00:00
Vikram S. Adve
7387d96d6a Use vectors instead of hash_maps for issueGaps and conflictLists.
These hash lookups were a major sink of time because they happen so often!

llvm-svn: 4136
2002-10-13 00:37:46 +00:00
Vikram S. Adve
0ab2587056 Minor change to interface for Create{Zero,Sign}ExtensionsInstructions.
llvm-svn: 3979
2002-09-29 21:53:31 +00:00
Vikram S. Adve
1aed35b2e5 Simplified code that handles call args and rets, so it no longer
needs the RegClass list to be passed in.

llvm-svn: 3964
2002-09-28 16:56:59 +00:00
Chris Lattner
8cbeb6c60a Convert TargetData to be an ImmutablePass
llvm-svn: 3928
2002-09-25 23:46:56 +00:00
Chris Lattner
c424fd7af2 There are no implicit gep forms of load and store anymore
llvm-svn: 3901
2002-09-24 00:08:01 +00:00
Vikram S. Adve
ed466a713a Added class MachineOptInfo as interface to target-specific
routines supporting machine code optimization.
Also added method MachineInstrInfo::getNOPOpCode().

llvm-svn: 3845
2002-09-20 00:52:09 +00:00
Vikram S. Adve
8d0bcb9568 Interface to target-specific routines that support machine code optimization.
llvm-svn: 3844
2002-09-20 00:49:21 +00:00
Chris Lattner
45298a4ef3 Fix compile problem on linux. Noone should ever #include <inttypes.h>
directly.  Instead, include Support/DataTypes.h

llvm-svn: 3766
2002-09-16 20:44:19 +00:00
Vikram S. Adve
4aad6090ae Add method adjustAlignment so that stack slot alignments can be computed
in a target-dependent manner (because of the dang OFFSET in Sparc v9).

llvm-svn: 3745
2002-09-16 15:57:43 +00:00
Vikram S. Adve
59b3b6c07b Add methods to query about the representation of LLVM quantities (e.g.,
constants).  Useful for target-dependent LLVM transformations like
Preselection.

llvm-svn: 3743
2002-09-16 15:56:01 +00:00
Vikram S. Adve
354fc692dc *** empty log message ***
llvm-svn: 3741
2002-09-16 15:39:35 +00:00
Vikram S. Adve
055207a945 Add new function MachineInstrInfo::CreateZeroExtensionInstructions.
llvm-svn: 3582
2002-09-05 18:36:41 +00:00
Chris Lattner
050aa81931 Return const char * const instead of std::string from get register name method
llvm-svn: 3294
2002-08-12 21:24:55 +00:00
Chris Lattner
8a4787495a * Removed extraneous #includes
* Fixed file headers to be consistent with the rest of LLVM
* Other minor fixes

llvm-svn: 3278
2002-08-09 20:08:06 +00:00
Chris Lattner
743688359d *** empty log message ***
llvm-svn: 3067
2002-07-24 22:20:06 +00:00
Chris Lattner
5d262d3846 *** empty log message ***
llvm-svn: 3058
2002-07-24 21:21:33 +00:00
Chris Lattner
9860e64083 *** empty log message ***
llvm-svn: 3056
2002-07-24 21:21:32 +00:00
Anand Shukla
3d7a9691cc added std:: to vector
llvm-svn: 2874
2002-07-11 00:16:28 +00:00
Vikram S. Adve
47a8810964 Put caller-saving code *before* argument copying code!
(This file has a minor change required for this fix.)

llvm-svn: 2854
2002-07-10 21:30:17 +00:00
Vikram S. Adve
4543e3c252 Minor change in comments.
llvm-svn: 2853
2002-07-10 21:29:22 +00:00
Vikram S. Adve
bfd03d50ce 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!

llvm-svn: 2824
2002-07-08 22:44:14 +00:00
Anand Shukla
bddcd163a1 changes to make it compatible with 64bit gcc
llvm-svn: 2786
2002-06-25 20:22:25 +00:00
Chris Lattner
e61bc07952 Convert RegClass::IsColorUsedArr from a dynamically allocated array to
a vector.  This makes asserting on array bounds easier.

llvm-svn: 2731
2002-05-23 15:50:03 +00:00
Vikram S. Adve
45eb62b709 Added parameter IntRegSize for standard general-purpose register size.
llvm-svn: 2652
2002-05-19 15:44:07 +00:00
Vikram S. Adve
ee3fd3dda9 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.

llvm-svn: 2651
2002-05-19 15:43:31 +00:00
Vikram S. Adve
8261256950 Many functions that returned a single MachineInstr now take a
vector of MachineInstr* to return multiple ones.

llvm-svn: 2650
2002-05-19 15:42:21 +00:00
Vikram S. Adve
a5968c518f Add integer register size field.
Make all sizes and offsets uint64_t instead of uint.
Fixed GetIndexedOffset to handle mixed array and struct indices.

llvm-svn: 2641
2002-05-19 15:28:02 +00:00
Chris Lattner
884c3d4899 Use forward decl instead of #include
llvm-svn: 2380
2002-04-28 20:40:25 +00:00
Vikram S. Adve
5c851091e5 Added functions to compute the offset of a given incoming or outgoing
argument. These are no longer allocated as they are discovered.

llvm-svn: 2320
2002-04-25 04:48:54 +00:00
Chris Lattner
0448b61465 Free memory when done with it.
llvm-svn: 2198
2002-04-09 15:04:37 +00:00
Vikram S. Adve
6ac730799c Add method getCallInstIndirectAddrVal() to add call interference
for this value.

llvm-svn: 2072
2002-03-31 18:58:49 +00:00
Chris Lattner
c481e92886 Rename Method to Function
llvm-svn: 1957
2002-03-23 22:51:58 +00:00
Vikram S. Adve
6e25a66e75 Added machine-independent value for INVALID_MACHINE_OPCODE.
Just cosmetic changes otherwise.

llvm-svn: 1898
2002-03-18 03:19:38 +00:00
Vikram S. Adve
4d3248ddc4 Add function getRegClassIDOfType.
getRegClassIDOfValue is now just a wrapper around this.

llvm-svn: 1897
2002-03-18 03:18:28 +00:00
Chris Lattner
65e91cf86a * 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/

llvm-svn: 1673
2002-02-04 05:55:10 +00:00
Chris Lattner
41ef705b10 Revamp compilation to be pass based instead of being monolithic so that
backend's can customize compilation as much as they want

llvm-svn: 1661
2002-02-03 23:40:22 +00:00
Chris Lattner
703fff6f92 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.

llvm-svn: 1641
2002-02-03 07:24:05 +00:00
Chris Lattner
3284ca6af7 * Trim #includes
llvm-svn: 1640
2002-02-03 07:20:47 +00:00
Chris Lattner
71af76aa1d Remove #include
move typedefs here

llvm-svn: 1639
2002-02-03 07:17:37 +00:00
Chris Lattner
4fe48ea510 Remove extranous #include
llvm-svn: 1638
2002-02-03 07:15:36 +00:00
Chris Lattner
0834da8b1f Fix for problem that caused both HUGE and INVALID latencies to be negative
llvm-svn: 1513
2002-01-21 22:42:49 +00:00
Chris Lattner
3dc9a2a61f Changes to build successfully with GCC 3.02
llvm-svn: 1503
2002-01-20 22:54:45 +00:00
Ruchira Sasanka
4b78c45328 Added more comments
llvm-svn: 1495
2002-01-07 19:57:37 +00:00
Ruchira Sasanka
0b15dd8a88 MachineRegInfo: Added a method to get the size of a register pushed on to stack.
llvm-svn: 1492
2002-01-07 19:17:41 +00:00
Vikram S. Adve
1d755bccee getIndexedOffset() shd take vector of Values, not of Constants!
llvm-svn: 1484
2001-12-15 00:35:48 +00:00
Chris Lattner
f6b7da2bb5 Rename ConstPoolVal -> Constant
Rename ConstPool*   -> Constant*
Rename ConstPoolVals.h -> ConstantVals.h

llvm-svn: 1407
2001-12-03 22:26:30 +00:00
Chris Lattner
463cc31132 Create a new #include "Support/..." directory structure to move things
from "llvm/Support/..." that are not llvm dependant.

Move files and fix #includes

llvm-svn: 1400
2001-11-27 00:03:19 +00:00
Chris Lattner
cead7793a7 Move DataTypes.h from llvm/Support to just Support
llvm-svn: 1399
2001-11-26 23:04:08 +00:00
Vikram S. Adve
3baa8cefc0 Add function returning which operand holds immediate constant
for a given opcode.

llvm-svn: 1307
2001-11-14 18:48:36 +00:00
Ruchira Sasanka
d7daf6afcd added isPseudoInstr()
llvm-svn: 1302
2001-11-14 15:35:51 +00:00
Ruchira Sasanka
50880b3791 Changed for adding Phi Elimination code
llvm-svn: 1266
2001-11-12 14:46:00 +00:00
Ruchira Sasanka
da9d0c48ba Made isPhi const
llvm-svn: 1251
2001-11-10 20:58:58 +00:00
Vikram S. Adve
1639b0edef Cache parameters for target machine.
llvm-svn: 1222
2001-11-09 02:11:25 +00:00
Vikram S. Adve
440465ad0e Added class MachineCacheInfo.
Also added function to convert float to int by copying via memory.

llvm-svn: 1221
2001-11-09 02:11:03 +00:00
Vikram S. Adve
8e3065c528 Add handle to object MachineFrameInfo.
llvm-svn: 1202
2001-11-08 05:23:45 +00:00
Vikram S. Adve
a63363151d Include handle to TargetMachine in each Machine...Info class.
llvm-svn: 1201
2001-11-08 05:22:43 +00:00
Vikram S. Adve
45b91e38e5 Add method CreateCodeToCopyIntToFloat.
Include handle to TargetMachine in each Machine...Info object.

llvm-svn: 1200
2001-11-08 05:22:15 +00:00
Vikram S. Adve
d985dbcdd8 Machine-independent interface to target's stack frame layout parameters.
llvm-svn: 1190
2001-11-08 04:52:27 +00:00
Ruchira Sasanka
cb3cfedff4 Moved InsertCallerSaveInstr to the SparcRegInfo.cpp and made machine independent
llvm-svn: 1107
2001-11-03 17:14:13 +00:00
Ruchira Sasanka
b1f435fb91 Moved callerSaving code to machine specific classes since we have to handle
%ccr reg differently.

llvm-svn: 991
2001-10-28 18:14:15 +00:00
Ruchira Sasanka
6df15c541f Added support for both call/jmpl instructions
llvm-svn: 930
2001-10-21 16:43:41 +00:00
Vikram S. Adve
b66fc8ac17 Added virtual function to generate an instruction sequence to
load a constant into a register.

llvm-svn: 862
2001-10-18 00:02:06 +00:00
Ruchira Sasanka
26ab9c8e61 Added support for caller saving
llvm-svn: 847
2001-10-16 01:23:19 +00:00