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

302 Commits

Author SHA1 Message Date
Evan Cheng
1da5ee8485 Rename
llvm-svn: 31364
2006-11-01 23:18:32 +00:00
Evan Cheng
b1ac9f6c12 Added getTiedToSrcOperand() to check for two-address'ness.
llvm-svn: 31360
2006-11-01 23:00:31 +00:00
Evan Cheng
c566892bd5 Add operand constraints to TargetInstrInfo.
llvm-svn: 31333
2006-11-01 00:27:05 +00:00
Chris Lattner
dcfee77788 add another target hook for branch folding.
llvm-svn: 31262
2006-10-28 17:29:57 +00:00
Chris Lattner
bc4f0e8b56 update comment
llvm-svn: 31165
2006-10-24 17:41:22 +00:00
Rafael Espindola
b35e4b16ae fix assert comment
llvm-svn: 31154
2006-10-24 14:47:28 +00:00
Chris Lattner
7353b07275 expose DWARF_LABEL opcode# so the branch folder can update debug info properly.
llvm-svn: 31024
2006-10-17 22:41:45 +00:00
Chris Lattner
ea84388ac0 update comment
llvm-svn: 31023
2006-10-17 22:12:15 +00:00
Chris Lattner
b441d8e8ce it is easier to implement these when they are virtual
llvm-svn: 30944
2006-10-13 21:02:27 +00:00
Chris Lattner
520bf168f5 allow branch reversal to fail
llvm-svn: 30943
2006-10-13 20:59:31 +00:00
Chris Lattner
f8eaaded24 replace the existing branch inspection/modification APIs with something more
useful and general.

llvm-svn: 30940
2006-10-13 20:44:01 +00:00
Jim Laskey
a67adda697 Use an enumeration to eliminate data relocations.
llvm-svn: 29249
2006-07-21 20:57:35 +00:00
Evan Cheng
6909286861 Clean up
llvm-svn: 28851
2006-06-17 01:42:20 +00:00
Evan Cheng
276a39d956 Avoid undesirable behavior when assert is not enabled.
llvm-svn: 28793
2006-06-15 08:10:27 +00:00
Evan Cheng
07d8ccec50 Instructions with variable operands (variable_ops) can have a number required
operands. e.g.
def CALL32r : I<0xFF, MRM2r, (ops GR32:$dst, variable_ops),
                "call {*}$dst", [(X86call GR32:$dst)]>;
TableGen should emit operand informations for the "required" operands.

Added a target instruction info flag M_VARIABLE_OPS to indicate the target
instruction may have more operands in addition to the minimum required
operands.

llvm-svn: 28791
2006-06-15 07:22:16 +00:00
Evan Cheng
00c1318055 lib/Target/Target.td
llvm-svn: 28386
2006-05-18 20:42:07 +00:00
Evan Cheng
0b8e4bca80 Add capability to scheduler to commute nodes for profit.
If a two-address code whose first operand has uses below, it should be commuted
when possible.

llvm-svn: 28230
2006-05-12 01:58:24 +00:00
Chris Lattner
6a2ec2cd3b Remove a bunch of dead stuff, shrinkifying TargetInstrDescriptor significantly.
llvm-svn: 27897
2006-04-20 18:32:02 +00:00
Chris Lattner
5fd145d9c4 add a hook to insert a noop
llvm-svn: 26560
2006-03-05 23:48:51 +00:00
Chris Lattner
6684ba101f Move isLoadFrom/StoreToStackSlot from MRegisterInfo to TargetInstrInfo,
a far more logical place.  Other methods should also be moved if anyone
is interested. :)

llvm-svn: 25912
2006-02-02 20:11:55 +00:00
Chris Lattner
b234392bc5 Add a common INLINEASM opcode
llvm-svn: 25667
2006-01-26 23:27:02 +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
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
Chris Lattner
fd72abe85b Add a new instruction flag
llvm-svn: 23093
2005-08-26 20:31:24 +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
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
Chris Lattner
2a03fa3a5c Add a new method, described in the comment.
llvm-svn: 19683
2005-01-19 06:53:02 +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
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
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
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
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
Brian Gaeke
69f47e236f getResultPos() is dead.
llvm-svn: 15484
2004-08-04 08:06:30 +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
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
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
Brian Gaeke
7246d4efd0 Fix typos in comments.
llvm-svn: 11333
2004-02-11 19:47:43 +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
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
John Criswell
16c6cda9d5 Added LLVM copyright header (for lack of a better term).
llvm-svn: 9304
2003-10-20 20:19:47 +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
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
Chris Lattner
be4a5081d1 #include <cassert> as necessary...
llvm-svn: 7315
2003-07-25 17:58:41 +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
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
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
b27d60ccf1 Rename MachineInstrInfo -> TargetInstrInfo
llvm-svn: 5272
2003-01-14 22:00:31 +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
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
b44ebe2588 Add comment
llvm-svn: 5141
2002-12-25 05:01:46 +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
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
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
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
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
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
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
Misha Brukman
142795fd17 Changed MachineCodeForMethod' to MachineFunction'.
llvm-svn: 4301
2002-10-28 00:28:31 +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
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
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
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
055207a945 Add new function MachineInstrInfo::CreateZeroExtensionInstructions.
llvm-svn: 3582
2002-09-05 18:36:41 +00:00
Vikram S. Adve
4543e3c252 Minor change in comments.
llvm-svn: 2853
2002-07-10 21:29:22 +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
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
Chris Lattner
71af76aa1d Remove #include
move typedefs here

llvm-svn: 1639
2002-02-03 07:17:37 +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
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
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
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
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
45b91e38e5 Add method CreateCodeToCopyIntToFloat.
Include handle to TargetMachine in each Machine...Info object.

llvm-svn: 1200
2001-11-08 05:22:15 +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
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
Vikram S. Adve
ed85a627bc Make class TargetMachine the common interface to all target-dependent
information, including instr, sched, and reg information.
Rename files to match the primary classes they provide.

llvm-svn: 602
2001-09-18 12:38:31 +00:00