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

52 Commits

Author SHA1 Message Date
Evan Cheng
8bd004b033 Add a pseudo instruction REG_SEQUENCE that takes a list of registers and
sub-register indices and outputs a single super register which is formed from
a consecutive sequence of registers.

This is used as register allocation / coalescing aid and it is useful to
represent instructions that output register pairs / quads. For example,
v1024, v1025 = vload <address>
where v1024 and v1025 forms a register pair.

This really should be modelled as
v1024<3>, v1025<4> = vload <address>
but it would violate SSA property before register allocation is done.

Currently we use insert_subreg to form the super register:
v1026 = implicit_def
v1027 - insert_subreg v1026, v1024, 3
v1028 = insert_subreg v1027, v1025, 4
...
      = use v1024
      = use v1028

But this adds pseudo live interval overlap between v1024 and v1025.

We can now modeled it as
v1024, v1025 = vload <address>
v1026 = REG_SEQUENCE v1024, 3, v1025, 4
...
      = use v1024
      = use v1026

After coalescing, it will be
v1026<3>, v1025<4> = vload <address>
...
      = use v1026<3>
      = use v1026

llvm-svn: 102815
2010-05-01 00:28:44 +00:00
Chris Lattner
80b41881bc rename llvm::llvm_report_error -> llvm::report_fatal_error
llvm-svn: 100709
2010-04-07 22:58:41 +00:00
Chris Lattner
b929ca1352 change Target.getInstructionsByEnumValue to return a reference
to a vector that CGT stores instead of synthesizing it on every 
call.

llvm-svn: 98910
2010-03-19 00:34:35 +00:00
Chris Lattner
3e5af02a79 look up instructions by record, not by name.
llvm-svn: 98904
2010-03-19 00:07:20 +00:00
Chris Lattner
7acf9be6c4 move target-independent opcodes out of TargetInstrInfo
into TargetOpcodes.h.  #include the new TargetOpcodes.h
into MachineInstr.  Add new inline accessors (like isPHI())
to MachineInstr, and start using them throughout the 
codebase.

llvm-svn: 95687
2010-02-09 19:54:29 +00:00
Dale Johannesen
c396179c7e Remove DEBUG_DECLARE, looks like we don't need it.
Also, DEBUG_VALUE has side effects.

llvm-svn: 93498
2010-01-15 01:50:44 +00:00
Dale Johannesen
0e21161e32 Add DEBUG_DECLARE. Not used yet.
llvm-svn: 93040
2010-01-09 01:24:25 +00:00
Dale Johannesen
610f0ce9aa Add DEBUG_VALUE. Not used yet.
llvm-svn: 93030
2010-01-08 23:51:25 +00:00
Dan Gohman
1b3e6a82f8 Revert 90628, which was incorrect.
llvm-svn: 91448
2009-12-15 20:21:44 +00:00
Dan Gohman
247374da74 Minor code simplification.
llvm-svn: 90628
2009-12-05 00:05:43 +00:00
Jakob Stoklund Olesen
31fcbdefbb Introduce the TargetInstrInfo::KILL machine instruction and get rid of the
unused DECLARE instruction.

KILL is not yet used anywhere, it will replace TargetInstrInfo::IMPLICIT_DEF
in the places where IMPLICIT_DEF is just used to alter liveness of physical
registers.

llvm-svn: 83006
2009-09-28 20:32:26 +00:00
Torok Edwin
980729667e Convert more abort() calls to llvm_report_error().
Also remove trailing semicolon.

llvm-svn: 75027
2009-07-08 19:04:27 +00:00
Daniel Dunbar
95f6034ab6 Replace std::iostreams with raw_ostream in TableGen.
- Sorry, I can't help myself.

 - No intended functionality change.

llvm-svn: 74742
2009-07-03 00:10:29 +00:00
Dan Gohman
8393d29bc8 Rename COPY_TO_SUBCLASS to COPY_TO_REGCLASS, and generalize
it accordingly. Thanks to Jakob Stoklund Olesen for pointing
out how this might be useful.

llvm-svn: 68986
2009-04-13 21:06:25 +00:00
Dan Gohman
3873cb7a36 Add a new TargetInstrInfo MachineInstr opcode, COPY_TO_SUBCLASS.
This will be used to replace things like X86's MOV32to32_.

Enhance ScheduleDAGSDNodesEmit to be more flexible and robust
in the presense of subregister superclasses and subclasses. It
can now cope with the definition of a virtual register being in
a subclass of a use.

Re-introduce the code for recording register superreg classes and
subreg classes. This is needed because when subreg extracts and
inserts get coalesced away, the virtual registers are left in
the correct subclass.

llvm-svn: 68961
2009-04-13 15:38:05 +00:00
Chris Lattner
44997d0e3c Fix shift overflow bug that would occur when a field was a full 32-bits
in tblgen.  This is PR2827, thanks to Waldemar Knorr for tracking this
down.

llvm-svn: 57124
2008-10-05 18:31:58 +00:00
Evan Cheng
b3923fd86f Add instruction names as comments to InstBits entries.
llvm-svn: 56275
2008-09-17 06:29:52 +00:00
Evan Cheng
8f1ac64bc9 Eliminate a compile time warning.
llvm-svn: 55878
2008-09-07 09:00:57 +00:00
Evan Cheng
9817be2f96 Change getBinaryCodeForInstr prototype. First operand MachineInstr& should be const. Make corresponding changes.
llvm-svn: 55623
2008-09-02 06:51:36 +00:00
Dan Gohman
c8097f8c8c Split ISD::LABEL into ISD::DBG_LABEL and ISD::EH_LABEL, eliminating
the need for a flavor operand, and add a new SDNode subclass,
LabelSDNode, for use with them to eliminate the need for a label id
operand.

Change instruction selection to let these label nodes through
unmodified instead of creating copies of them. Teach the MachineInstr
emitter how to emit a MachineInstr directly from an ISD label node.

This avoids the need for allocating SDNodes for the label id and
flavor value, as well as SDNodes for each of the post-isel label,
label id, and label flavor.

llvm-svn: 52943
2008-07-01 00:05:16 +00:00
Christopher Lamb
b4f4b41048 Make insert_subreg a two-address instruction, vastly simplifying LowerSubregs pass. Add a new TII, subreg_to_reg, which is like insert_subreg except that it takes an immediate implicit value to insert into rather than a register.
llvm-svn: 48412
2008-03-16 03:12:01 +00:00
Evan Cheng
11d2c09adc Replace all target specific implicit def instructions with a target independent one: TargetInstrInfo::IMPLICIT_DEF.
llvm-svn: 48380
2008-03-15 00:03:38 +00:00
Evan Cheng
c57ec111f2 SDIsel processes llvm.dbg.declare by recording the variable debug information descriptor and its corresponding stack frame index in MachineModuleInfo. This only works if the local variable is "homed" in the stack frame. It does not work for byval parameter, etc.
Added ISD::DECLARE node type to represent llvm.dbg.declare intrinsic. Now the intrinsic calls are lowered into a SDNode and lives on through out the codegen passes.
For now, since all the debugging information recording is done at isel time, when a ISD::DECLARE node is selected, it has the side effect of also recording the variable. This is a short term solution that should be fixed in time.

llvm-svn: 46659
2008-02-02 04:07:54 +00:00
Chris Lattner
c4006845a6 remove attributions from utils.
llvm-svn: 45419
2007-12-29 20:37:13 +00:00
Christopher Lamb
9a0d88efde Add target independent MachineInstr's to represent subreg insert/extract in MBB's. PR1350
llvm-svn: 40518
2007-07-26 07:48:21 +00:00
Jim Laskey
1bab68f592 Files missing from LABEL check in.
llvm-svn: 33539
2007-01-26 17:29:20 +00:00
Bill Wendling
f13d78d3b8 What should be the last unnecessary <iostream>s in the library.
llvm-svn: 32333
2006-12-07 22:21:48 +00:00
Chris Lattner
4a2af4e374 Remove the isTwoAddress property from the CodeGenInstruction class. It should
not be used for anything other than backwards compat constraint handling.

Add support for a new DisableEncoding property which contains a list of
registers that should not be encoded by the generated code emitter.  Convert
the codeemitter generator to use this, fixing some PPC JIT regressions.

llvm-svn: 31769
2006-11-15 23:23:02 +00:00
Reid Spencer
da581ac715 Remove an unused variable.
llvm-svn: 31403
2006-11-03 01:48:30 +00:00
Chris Lattner
382ed3f1d9 Fix JIT encoding of two-addr instructions.
llvm-svn: 30111
2006-09-05 03:01:52 +00:00
Jim Laskey
a140e5e06c Clean up.
llvm-svn: 29137
2006-07-13 22:17:08 +00:00
Jim Laskey
a96045b549 1. Simplfy bit operations.
2. Coalesce instruction cases.

llvm-svn: 29135
2006-07-13 21:02:53 +00:00
Jim Laskey
e3cc434032 Move base value of instruction to lookup table to prepare for case reduction.
llvm-svn: 29122
2006-07-12 19:15:43 +00:00
Jim Laskey
9b46a1235a Reduce bloat in target libraries by removing per machine instruction assertion
from code emitter generation.

llvm-svn: 29097
2006-07-11 01:25:59 +00:00
Chris Lattner
d7cabc0f81 Fix miscodegen of V_SET0 in PPC.
llvm-svn: 26836
2006-03-18 00:40:36 +00:00
Chris Lattner
1ec0a10fed Don't emit JIT code for these instructions
llvm-svn: 25669
2006-01-27 01:39:38 +00:00
Chris Lattner
ffa72e8d79 Fix an incompatibility with GCC 4.1, thanks to Vladimir Merzliakov
for pointing this out!

llvm-svn: 23963
2005-10-24 15:04:15 +00:00
Chris Lattner
1685432a06 The code emitter generator only supports targets with 32-bit instruction
words.  There is no way for one of these targets to have a > 32-bit immediate!

llvm-svn: 22897
2005-08-19 01:04:33 +00:00
Misha Brukman
960a8d47d7 Remove trailing whitespace
llvm-svn: 21428
2005-04-22 00:00:37 +00:00
Misha Brukman
4e252ebfa0 * Factor out (into new fn) a loop emitting operand shifts into the instruction
* Reverse instruction bit components for a LittleEndian-style encoding
* Fix some comments and spacing

llvm-svn: 16975
2004-10-14 05:53:01 +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
Chris Lattner
89ebd84bc2 Do not #include files into the llvm namespace
llvm-svn: 15849
2004-08-17 03:08:28 +00:00
Misha Brukman
1087080432 Deleted commented-out code as we now get namespace directly, add comments
llvm-svn: 15627
2004-08-10 20:54:58 +00:00
Misha Brukman
1aa8b19a07 Use the target name instead of hard-coding SparcV9.
llvm-svn: 15616
2004-08-10 18:31:01 +00:00
Chris Lattner
660bc91ec4 This was a good idea, but until this does not break the build of
lib/Target/Sparc, we should not use it.

llvm-svn: 15603
2004-08-10 15:05:18 +00:00
Misha Brukman
7a352cede0 Use the current target name instead of a ClassPrefix.
llvm-svn: 15585
2004-08-09 19:10:43 +00:00
Misha Brukman
ad01c0dbae * Use Classname and ClassPrefix instead of hard-coded V9 values
* Simplify code and shorten lines by not recomputing values

llvm-svn: 15582
2004-08-09 17:47:45 +00:00
Misha Brukman
3a15182b6c * Added documentation in the file header
* Shorten assert() text to make it fit within 80 cols

llvm-svn: 15508
2004-08-04 22:07:54 +00:00
Chris Lattner
2e8beb316b Finegrainify namespacification
llvm-svn: 15381
2004-08-01 03:55:39 +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