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

135 Commits

Author SHA1 Message Date
Duncan Sands
e8bb2c6d32 Support for trampolines, except for X86 codegen which is
still under discussion.

llvm-svn: 40549
2007-07-27 12:58:54 +00:00
Dan Gohman
c6bdcfa8c0 Add new TargetLowering code to provide the final register type that an
illegal value type will be transformed to, for code that needs the
register type after all transformations instead of just after the first
transformation.

Factor out the code that uses this information to do copy-from-regs and
copy-to-regs for various purposes into separate functions so that they
are done consistently.

llvm-svn: 37781
2007-06-28 23:29:44 +00:00
Dan Gohman
cb89e19a6d Rename ("shrinkify") MVT::isExtendedValueType to MVT::isExtendedVT.
llvm-svn: 37758
2007-06-27 16:08:04 +00:00
Dan Gohman
eea90f90af Replace ?: with if statements, for clarity.
llvm-svn: 37735
2007-06-26 16:19:08 +00:00
Dan Gohman
fb8c9beba3 Simplify the expression for TargetLowering::isTypeLegal.
llvm-svn: 37732
2007-06-26 15:16:27 +00:00
Dan Gohman
354f02e03d Generalize MVT::ValueType and associated functions to be able to represent
extended vector types. Remove the special SDNode opcodes used for pre-legalize
vector operations, and the special MVT::Vector type used with them. Adjust
lowering and legalize to work with the normal SDNode kinds instead, and to
use the normal MVT functions to work with vector types instead of using the
two special operands that the pre-legalize nodes held.

This allows pre-legalize and post-legalize DAGs, and the code that operates
on them, to be more consistent. Pre-legalize vector operators can be handled
more consistently with scalar operators. And, -view-dag-combine1-dags and
-view-legalize-dags now look prettier for vector code.

llvm-svn: 37719
2007-06-25 16:23:39 +00:00
Dan Gohman
a62327ea40 Move ComputeMaskedBits, MaskedValueIsZero, and ComputeNumSignBits from
TargetLowering to SelectionDAG so that they have more convenient
access to the current DAG, in preparation for the ValueType routines
being changed from standalone functions to members of SelectionDAG for
the pre-legalize vector type changes.

llvm-svn: 37704
2007-06-22 14:59:07 +00:00
Dan Gohman
1815e9bdb3 Rename TargetLowering::getNumElements and friends to
TargetLowering::getNumRegisters and similar, to avoid confusion with
the actual number of elements for vector types.

llvm-svn: 37687
2007-06-21 14:42:22 +00:00
Evan Cheng
0dc7a8cac6 Target specific ifcvt code duplication limit.
llvm-svn: 37384
2007-06-01 08:25:24 +00:00
Evan Cheng
3ce37e8d78 Fix comment.
llvm-svn: 37191
2007-05-18 00:00:30 +00:00
Evan Cheng
3163b77d5e Add target hook to specify block size limit for if-conversion.
llvm-svn: 37134
2007-05-16 23:45:53 +00:00
Chris Lattner
5bc24967c1 add a default parameter
llvm-svn: 36529
2007-04-28 05:42:38 +00:00
Anton Korobeynikov
f3e62a428a Removed tabs everywhere except autogenerated & external files. Add make
target for tabs checking.

llvm-svn: 36146
2007-04-16 18:10:23 +00:00
Chris Lattner
461f7ed33b remove dead target hooks.
llvm-svn: 35847
2007-04-09 23:34:08 +00:00
Chris Lattner
ae6e2c0ee5 remove some dead target hooks, subsumed by isLegalAddressingMode
llvm-svn: 35840
2007-04-09 22:27:04 +00:00
Chris Lattner
b31e6eee0c add a default ctor for AddrMode.
llvm-svn: 35832
2007-04-09 21:18:34 +00:00
Chris Lattner
8747705792 switch TL::getValueType to use MVT::getValueType.
llvm-svn: 35527
2007-03-31 04:05:24 +00:00
Chris Lattner
143464e05f add one addressing mode description hook to rule them all.
llvm-svn: 35520
2007-03-30 23:14:50 +00:00
Evan Cheng
a55449c051 Remove isLegalAddressImmediate.
llvm-svn: 35406
2007-03-28 01:53:55 +00:00
Chris Lattner
b19069959d switch TargetLowering::getConstraintType to take the entire constraint,
not just the first letter.  No functionality change.

llvm-svn: 35322
2007-03-25 02:14:49 +00:00
Dale Johannesen
44c0a5d545 repair x86 performance, dejagnu problems from previous change
llvm-svn: 35245
2007-03-21 21:51:52 +00:00
Dale Johannesen
3e422e3b49 do not share old induction variables when this would result in invalid
instructions (that would have to be split later)

llvm-svn: 35227
2007-03-20 21:54:54 +00:00
Evan Cheng
ce8b779c6c Added isLegalAddressExpression hook to test if the given expression can be
folded into target addressing mode for the given type.

llvm-svn: 35121
2007-03-16 08:42:32 +00:00
Evan Cheng
f132fa5bba More flexible TargetLowering LSR hooks for testing whether an immediate is
a legal target address immediate or scale.

llvm-svn: 35071
2007-03-12 23:26:27 +00:00
Anton Korobeynikov
85d6c1ebad Refactoring of formal parameter flags. Enable properly use of
zext/sext/aext stuff.

llvm-svn: 35008
2007-03-07 16:25:09 +00:00
Jim Laskey
655bea55fe Simplify lowering and selection of exception ops.
llvm-svn: 34491
2007-02-22 15:37:19 +00:00
Reid Spencer
e7ff3305d6 For PR1195:
Change use of "packed" term to "vector" in comments, strings, variable
names, etc.

llvm-svn: 34300
2007-02-15 03:39:18 +00:00
Reid Spencer
55e4e98a2a For PR1195:
Rename PackedType -> VectorType, ConstantPacked -> ConstantVector, and
PackedTyID -> VectorTyID. No functional changes.

llvm-svn: 34293
2007-02-15 02:26:10 +00:00
Evan Cheng
1b155ac243 Move SimplifySetCC to TargetLowering and allow it to be shared with legalizer.
llvm-svn: 34065
2007-02-08 22:13:59 +00:00
Anton Korobeynikov
c469cbc2e7 Fixed uninitialized stuff inside LegalizeDAG. Fortunately, the only
affected part is codegen of "memove" inside x86 backend. This fixes
PR1144

llvm-svn: 33752
2007-02-01 08:39:52 +00:00
Evan Cheng
3ec2e08a37 Allow the target to override the ISD::CondCode that's to be used to test the
result of the comparison libcall against zero.

llvm-svn: 33701
2007-01-31 09:29:11 +00:00
Nate Begeman
dc46021355 Finish off bug 680, allowing targets to custom lower frame and return
address nodes.

llvm-svn: 33636
2007-01-29 22:58:52 +00:00
Anton Korobeynikov
611d5e2eda Propagate changes from my local tree. This patch includes:
1. New parameter attribute called 'inreg'. It has meaning "place this
parameter in registers, if possible". This is some generalization of
gcc's regparm(n) attribute. It's currently used only in X86-32 backend.
2. Completely rewritten CC handling/lowering code inside X86 backend.
Merged stdcall + c CCs and fastcall + fast CC.
3. Dropped CSRET CC. We cannot add struct return variant for each
target-specific CC (e.g. stdcall + csretcc and so on).
4. Instead of CSRET CC introduced 'sret' parameter attribute. Setting in
on first attribute has meaning 'This is hidden pointer to structure
return. Handle it gently'.
5. Fixed small bug in llvm-extract + add new feature to
FunctionExtraction pass, which relinks all internal-linkaged callees
from deleted function to external linkage. This will allow further
linking everything together.

NOTEs: 1. Documentation will be updated soon.
       2. llvm-upgrade should be improved to translate csret => sret.
          Before this, there will be some unexpected test fails.
llvm-svn: 33597
2007-01-28 13:31:35 +00:00
Reid Spencer
4fe8454735 Don't #include DerivedTypes.h in this header. Make adjustments to
compensate. Move a function out of line to TargetLowering.cpp

llvm-svn: 33153
2007-01-12 23:21:42 +00:00
Evan Cheng
a8ed507f15 - Move RTLIB::Libcall enum to a separate file.
- Code clean up.

llvm-svn: 33148
2007-01-12 22:49:32 +00:00
Evan Cheng
3e3e3865b8 Silence a bogus compiler warning.
llvm-svn: 33145
2007-01-12 22:30:07 +00:00
Reid Spencer
373d2bccea For PR1064:
Implement the arbitrary bit-width integer feature. The feature allows
integers of any bitwidth (up to 64) to be defined instead of just 1, 8,
16, 32, and 64 bit integers.

This change does several things:
1. Introduces a new Derived Type, IntegerType, to represent the number of
   bits in an integer. The Type classes SubclassData field is used to
   store the number of bits. This allows 2^23 bits in an integer type.
2. Removes the five integer Type::TypeID values for the 1, 8, 16, 32 and
   64-bit integers. These are replaced with just IntegerType which is not
   a primitive any more.
3. Adjust the rest of LLVM to account for this change.

Note that while this incremental change lays the foundation for arbitrary
bit-width integers, LLVM has not yet been converted to actually deal with
them in any significant way. Most optimization passes, for example, will
still only deal with the byte-width integer types.  Future increments
will rectify this situation.

llvm-svn: 33113
2007-01-12 07:05:14 +00:00
Evan Cheng
032a597692 Store default libgcc routine names and allow them to be redefined by target.
llvm-svn: 33105
2007-01-12 02:11:51 +00:00
Reid Spencer
f3265181e2 Rename BoolTy as Int1Ty. Patch by Sheng Zhou.
llvm-svn: 33076
2007-01-11 18:21:29 +00:00
Evan Cheng
38cb858ee5 - Remove isSetCCExpensive() etc. These are no longer used.
- Add isSelectExpensive() etc. It's used to tell codegen that select is expensive for a given target, avoid using it if possible. Currently it's only
used to expand FCOPYSIGN.

llvm-svn: 32939
2007-01-05 23:31:08 +00:00
Reid Spencer
a7eaf62ace For PR950:
Change integer type names for signless integer types

llvm-svn: 32777
2006-12-31 05:23:18 +00:00
Evan Cheng
7684d815d1 Add getTypeToExpandTo() which recursively walks TransformToType to determine
the intrinsic type to expand to.

llvm-svn: 32558
2006-12-13 20:52:00 +00:00
Evan Cheng
2346bdd8c3 Update comments.
llvm-svn: 32532
2006-12-13 06:12:35 +00:00
Evan Cheng
5c6304ca6e Update comments.
llvm-svn: 32531
2006-12-13 06:09:03 +00:00
Anton Korobeynikov
e76b69846d Cleaned setjmp/longjmp lowering interfaces. Now we're producing right
code (both asm & cbe) for Mingw32 target.
Removed autoconf checks for underscored versions of setjmp/longjmp.

llvm-svn: 32415
2006-12-10 23:12:42 +00:00
Evan Cheng
c050bb298f Add a mechanism to specify whether a target supports a particular indexed load / store.
llvm-svn: 31597
2006-11-09 18:56:43 +00:00
Evan Cheng
89ee587963 Rename ISD::MemOpAddrMode to ISD::MemIndexedMode
llvm-svn: 31595
2006-11-09 17:55:04 +00:00
Evan Cheng
6b7d127df9 getPostIndexedAddressParts change: passes in load/store instead of its loaded / stored VT.
llvm-svn: 31584
2006-11-09 04:29:46 +00:00
Evan Cheng
db0add3bcb Added target hook for post-indexed memory ops transformation.
llvm-svn: 31499
2006-11-07 09:04:16 +00:00
Evan Cheng
466e20fca2 Rename
llvm-svn: 31413
2006-11-03 07:21:16 +00:00