Commit Graph

121 Commits

Author SHA1 Message Date
Bill Wendling
7d9e97c2ac As per feedback, revised comments to (hopefully) make the different side effect
flags clearer.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45120 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-17 21:02:07 +00:00
Bill Wendling
6b1da9c39f Add flags to indicate that there are "never" side effects or that there "may be"
side effects for machine instructions.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45022 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-14 01:48:59 +00:00
Evan Cheng
6e141fd048 Implicit def instructions, e.g. X86::IMPLICIT_DEF_GR32, are always re-materializable and they should not be spilled.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44960 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-12 23:12:09 +00:00
Owen Anderson
20ab29068d Add a flag for indirect branch instructions.
Target maintainers: please check that the instructions for your target are correctly marked.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44012 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-12 07:39:39 +00:00
Anton Korobeynikov
2e7eedf382 Clarify the meaning of '-2' register number
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43998 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-11 19:53:50 +00:00
Anton Korobeynikov
f191c80cd7 Use TableGen to emit information for dwarf register numbers.
This makes DwarfRegNum to accept list of numbers instead.
Added three different "flavours", but only slightly tested on x86-32/linux.
Please check another subtargets if possible,


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43997 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-11 19:50:10 +00:00
Evan Cheng
a3ca3149f2 Add CopyCost to TargetRegisterClass. This specifies the cost of copying a value
between two registers in the specific class.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42123 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-19 01:35:01 +00:00
Evan Cheng
071a279e94 Remove (somewhat confusing) Imp<> helper, use let Defs = [], Uses = [] instead.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41863 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-11 19:55:27 +00:00
Christopher Lamb
08d52071ba Add target independent MachineInstr's to represent subreg insert/extract in MBB's. PR1350
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40518 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-26 07:48:21 +00:00
Evan Cheng
ffbaccae02 No more noResults.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40132 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-21 00:34:19 +00:00
Evan Cheng
64d80e3387 Change instruction description to split OperandList into OutOperandList and
InOperandList. This gives one piece of important information: # of results
produced by an instruction.
An example of the change:
def ADD32rr  : I<0x01, MRMDestReg, (ops GR32:$dst, GR32:$src1, GR32:$src2),
                 "add{l} {$src2, $dst|$dst, $src2}",
                 [(set GR32:$dst, (add GR32:$src1, GR32:$src2))]>;
=>
def ADD32rr  : I<0x01, MRMDestReg, (outs GR32:$dst), (ins GR32:$src1, GR32:$src2),
                 "add{l} {$src2, $dst|$dst, $src2}",
                 [(set GR32:$dst, (add GR32:$src1, GR32:$src2))]>;


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40033 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-19 01:14:50 +00:00
Evan Cheng
2bf821c4bf Remove clobbersPred.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@38500 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-10 18:07:08 +00:00
Evan Cheng
49ce02e408 Do away with ImmutablePredicateOperand.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37959 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-06 23:21:02 +00:00
Evan Cheng
e496d78f16 Add OptionalDefOperand to stand for optionally defined result.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37930 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-06 01:00:16 +00:00
Evan Cheng
2aa133ef72 - Added zero_reg def to stand for register 0.
- Added two variants of PredicateOperand: ImmutablePredicateOperand, whose predicate does not change after isel; PredicateDefOperand, which represent a predicate defintion operand.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37892 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-05 07:09:09 +00:00
Dan Gohman
d45eddd214 Revert the earlier change that removed the M_REMATERIALIZABLE machine
instruction flag, and use the flag along with a virtual member function
hook for targets to override if there are instructions that are only
trivially rematerializable with specific operands (i.e. constant pool
loads).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37728 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-26 00:48:07 +00:00
Dan Gohman
82a87a0172 Replace M_REMATERIALIZIBLE and the newly-added isOtherReMaterializableLoad
with a general target hook to identify rematerializable instructions. Some
instructions are only rematerializable with specific operands, such as loads
from constant pools, while others are always rematerializable. This hook
allows both to be identified as being rematerializable with the same
mechanism.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37644 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-19 01:48:05 +00:00
Evan Cheng
eaa91b0a1f Replace TargetInstrInfo::CanBeDuplicated() with a M_NOT_DUPLICABLE bit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37643 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-19 01:26:51 +00:00
Christopher Lamb
a321125e8b Add support to tablegen for specifying subregister classes on a per register class basis.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37572 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-13 22:20:15 +00:00
Evan Cheng
c1d7384cb0 Added clobbersPred.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37466 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-06 10:15:28 +00:00
Evan Cheng
064d7cdd3c Added isPredicable bit to class Instruction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37117 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-16 20:47:01 +00:00
Evan Cheng
f88b3a5698 PredicateOperand can be used as a normal operand for isel.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36947 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-08 21:06:08 +00:00
Bill Wendling
4222d806fa Add an "implies" field to features. This indicates that, if the current
feature is set, then the features in the implied list should be set also.
The opposite is also enforced: if a feature in the implied list isn't set,
then the feature that owns that implies list shouldn't be set either.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36756 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-04 20:38:40 +00:00
Chris Lattner
a7ad3d1ed3 expose HonorSignDependentRoundingFPMathOption to .td files
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36658 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-03 00:27:11 +00:00
Nate Begeman
7bf1c272ab llvm bug #1350, parts 1, 2, and 3.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36618 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-01 05:57:02 +00:00
Evan Cheng
3cafbf7e5f Add sub-registers sets.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36278 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-20 21:13:46 +00:00
Evan Cheng
e2e9e44d8f Added isReMaterializable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35160 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-19 06:22:07 +00:00
Chris Lattner
d637a8b436 Add calling convention info
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34661 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-27 06:59:52 +00:00
Dan Gohman
e26bff22db Fix typos in comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34456 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-20 20:52:03 +00:00
Jim Laskey
1ee2925742 Make LABEL a builtin opcode.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33537 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-26 14:34:52 +00:00
Evan Cheng
e77d10df41 Comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33114 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-12 07:25:16 +00:00
Chris Lattner
fa326c709f add a new field needed by the code emitter generator.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31768 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-15 22:55:04 +00:00
Chris Lattner
60a09a5d6d initial steps to getting the predicate on PPC::BLR right.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31437 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-03 23:52:18 +00:00
Chris Lattner
e69c436e6f remove dead var
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31436 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-03 23:50:15 +00:00
Evan Cheng
2f15c063ba Add constraints to Instruction class.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31332 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-01 00:26:27 +00:00
Chris Lattner
33e4869ba0 Move the Imp tblgen class from the X86 backend to common code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30907 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-12 17:49:27 +00:00
Evan Cheng
e6f32034db Add code size to target instruction use it as the 3rd isel sorting tie-breaker.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29193 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-19 00:24:41 +00:00
Evan Cheng
ffd4364bb0 Added a Flags field to TargetOperandInfo. Currently the only flag is
M_LOOK_UP_PTR_REG_CLASS which allows the register class of the operand to be
resolved via a callback at runtime.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28387 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-18 20:44:26 +00:00
Evan Cheng
0cfd73a9c1 Remove CalleeSavedRegisters from class Target.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28377 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-18 00:09:53 +00:00
Evan Cheng
c01d497255 Remove PointerType from class Target
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28368 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-17 21:20:27 +00:00
Vladimir Prus
e438c2a466 Replace "../whatever.td" with "whatever.td", so that out-of-tree backends
can just add lib/Target to TableGen includes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28318 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-16 06:39:36 +00:00
Chris Lattner
94ae9d3d2d Improve comment, patch provided by Vladimir Prus!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28307 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-15 18:35:02 +00:00
Chris Lattner
506efdaef6 Update comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28283 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-14 02:05:19 +00:00
Chris Lattner
de321a8014 Put PHI/INLINEASM into the correct namespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28037 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-01 17:00:49 +00:00
Evan Cheng
f5e1dc278b Renamed AddedCost to AddedComplexity.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27843 91177308-0d34-0410-b5e6-96231b3b80d8
2006-04-19 20:38:28 +00:00
Evan Cheng
5941320c0d Allow "let AddedCost = n in" to increase pattern complexity.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27834 91177308-0d34-0410-b5e6-96231b3b80d8
2006-04-19 18:07:24 +00:00
Jim Laskey
8da17b242f Add support for dwarf register numbering.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27080 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-24 21:13:21 +00:00
Chris Lattner
da10f19d5c Shuffle some includes around
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27073 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-24 18:52:35 +00:00
Chris Lattner
a8309ae1cb Split the valuetypes out of Target.td into ValueTypes.td
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26490 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-03 01:55:26 +00:00
Evan Cheng
f338dd881f New type v2f32.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26435 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-01 01:06:22 +00:00