Commit Graph

14235 Commits

Author SHA1 Message Date
Evan Cheng
6de0163201 These can be transformed into lea as well. Not that we use this feature
currently...


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28393 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-19 18:43:41 +00:00
Evan Cheng
09e3c80984 - Use exact-width integer types, e.g. int32_t, to avoid confusion.
- Fix a couple of minor bugs in i16immSExt8 and i16immZExt8.
- Added loadiPTR fragment used for indirect jumps and calls.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28392 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-19 18:40:54 +00:00
Evan Cheng
fc8feb184e Explicitly specify MOV32mi can only be used store 32-bit GV, etc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28390 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-19 07:30:36 +00:00
Rafael Espindola
dc124a234a implement movri
add a stub LowerFORMAL_ARGUMENTS


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28388 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-18 21:45:49 +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
21d03f2de0 lib/Target/Target.td
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28386 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-18 20:42:07 +00:00
Chris Lattner
16abfdfc22 add a note
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28384 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-18 18:26:13 +00:00
Chris Lattner
3f705e660a add a note
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28383 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-18 17:38:16 +00:00
Andrew Lenharth
d56aa55358 Fix a bogus gcc warning
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28382 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-18 17:29:34 +00:00
Evan Cheng
751458dac9 ImmMask should be 3 for a two-bit field; Compact X86II
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28381 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-18 06:27:15 +00:00
Owen Anderson
ac4c75ba82 Fix some think-o's in my last commit. Thanks to Chris for pointing them out.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28380 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-18 05:46:08 +00:00
Owen Anderson
1d8b8535ec Change Module to use TargetData-compatible strings internally.
This is part of the on-going work on PR 761.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28379 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-18 02:10:31 +00:00
Evan Cheng
0f3ac8d8d4 getCalleeSaveRegs and getCalleeSaveRegClasses are no long TableGen'd.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28378 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-18 00:12:58 +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
Reid Spencer
dd1aac36a1 Make some changes suggested by Chris:
1. Remove the LLVM_DO_NOT_BUILD feature (not needed any more)
2. Ensure that lib/VMCore gets built first. This needs to be done because
   VMCore now uses tblgen to generate the Intrinsics header which are
   needed in other libraries. In parallel builds, this can cause problems.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28374 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-17 22:55:35 +00:00
Owen Anderson
84cc6dbd25 Fix a stupid bug when parsing TargetData strings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28373 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-17 21:56:02 +00:00
Chris Lattner
7044aac97c Use DIRS here instead of PARALLEL_DIRS, as VMCore has to be built before the
other dirs (for Intrinsics.gen).  :(


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28372 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-17 21:54:48 +00:00
Evan Cheng
af78ef526d Use generic iPTR instead i32 to represent pointer type.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28371 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-17 21:21:41 +00:00
Evan Cheng
c8999f2a0a Another entry
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28370 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-17 21:20:51 +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
Chris Lattner
ed96fe8c79 Declare that lowerinvoke doesn't interact with other lowering passes.
Patch written by Domagoj Babic!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28367 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-17 21:05:27 +00:00
Chris Lattner
d202ca4d98 Fix the result of the call to use a correct vbitconvert. There is no need to
use getPackedTypeBreakdown at all here.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28365 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-17 20:49:36 +00:00
Chris Lattner
1b8daae71b Correct a previous patch which broke CodeGen/PowerPC/vec_call.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28364 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-17 20:43:21 +00:00
Andrew Lenharth
65b889ffb5 Fix call_adj.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28360 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-17 19:24:49 +00:00
Andrew Lenharth
3aa92e4e00 Added sanity check for obviously bogus immediates
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28359 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-17 19:24:31 +00:00
Evan Cheng
4ac8974d02 Should pass by reference.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28357 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-17 19:07:40 +00:00
Evan Cheng
4dfa85d1df Another entry
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28356 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-17 19:05:31 +00:00
Chris Lattner
9d62fa4d16 Add a note about a note
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28355 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-17 19:02:25 +00:00
Chris Lattner
c703a8fbf8 Make PPC call lowering more aggressive, making the isel matching code simple
enough to be autogenerated.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28354 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-17 19:00:46 +00:00
Evan Cheng
7e399c14ab Another typo. Pointed out by Nate Begeman.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28353 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-17 18:22:14 +00:00
Evan Cheng
6c43f35d74 Fixed a LowerCallTo and LowerArguments bug. They were introducing illegal
VBIT_VECTOR nodes. There were some confusion about the semantics of
getPackedTypeBreakdown(). e.g. for <4 x f32> it returns 1 and v4f32, not 4,
and f32.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28352 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-17 18:16:39 +00:00
Evan Cheng
e9b3da17cd Fix an obvious bug in getPackedTypeBreakdown. Return 1 if type is legal.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28351 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-17 18:10:06 +00:00
Chris Lattner
782e60150e Add a CloneModule call that exposes the mapping of values from the old module
to the new module.  Patch provided by Nick Lewycky!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28349 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-17 18:05:35 +00:00
Chris Lattner
c5d7d7c715 When we legalize target nodes, do not use getNode to create a new node,
use UpdateNodeOperands to just update the operands!  This is important because
getNode will allocate a new node if the node returns a flag and this breaks
assumptions in the legalizer that you can legalize some things multiple times
and get exactly the same results.

This latent bug was exposed by my ppc patch last night, and this fixes
gsm/toast.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28348 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-17 18:00:08 +00:00
Chris Lattner
b248e16afd Add an assertion, avoid some unneeded work for each call. No functionality
change.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28347 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-17 17:55:45 +00:00
Chris Lattner
9a2a497284 Switch PPC over to a call-selection model where the lowering code creates
the copyto/fromregs instead of making the PPCISD::CALL selection code create
them.  This vastly simplifies the selection code, and moves the ABI handling
parts into one place.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28346 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-17 06:01:33 +00:00
Chris Lattner
c8b682ca19 3 changes, 2 of which are cleanup one of which changes codegen:
1. Rearrange code a bit so that the special case doesn't require indenting lots
   of code.
2. Add comments describing PPC calling convention.
3. Only round up to 56-bytes of stack space for an outgoing call if the callee
   is varargs.  This saves a bit of stack space.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28342 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-17 00:15:40 +00:00
Chris Lattner
c04ba7a97d implement passing/returning vector regs to calls, at least non-varargs calls.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28341 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-16 23:54:25 +00:00
Chris Lattner
da098e7d10 Add support for calls that pass and return legal vectors.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28340 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-16 23:39:44 +00:00
Chris Lattner
abde460d4f Instead of implementing LowerCallTo directly, let the default impl produce an
ISD::CALL node, then custom lower that.  This means that we only have to handle
LEGAL call operands/results, not every possible type.  This allows us to
simplify the call code, shrinking it by about 1/3.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28339 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-16 22:56:08 +00:00
Chris Lattner
f4ec817299 Add a new ISD::CALL node, make the default impl of TargetLowering::LowerCallTo
produce it.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28338 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-16 22:53:20 +00:00
Chris Lattner
af4ec0c56d Simplify the argument counting logic by only incrementing the index.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28335 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-16 18:58:15 +00:00
Chris Lattner
b375b5e629 Simplify the dead argument handling code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28334 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-16 18:54:32 +00:00
Chris Lattner
be4849aabe Vector args passed in registers don't reserve stack space.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28333 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-16 18:51:52 +00:00
Chris Lattner
8ab5fe574a Switch the PPC backend over to using FORMAL_ARGUMENTS for formal argument
handling.  This makes the lower argument code significantly simpler (we
only need to handle legal argument types).

Incidentally, this also implements support for vector argument registers,
so long as they are not on the stack.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28331 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-16 18:18:50 +00:00
Andrew Lenharth
3e348494bb this should be 128 I think
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28330 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-16 17:45:23 +00:00
Andrew Lenharth
dae9cbe8d4 Move this code to a common place
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28329 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-16 17:42:15 +00:00
Chris Lattner
aa9406b0c4 Implement the custom lowering hook right, returning values for all of the
arguments at once.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28327 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-16 17:14:26 +00:00
Chris Lattner
e7746c9084 Fix a bug I introduced yesterday, which broke functions with *no* arguments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28326 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-16 17:08:35 +00:00
Evan Cheng
069287d460 X86 integer register classes naming changes. Make them consistent with FP, vector classes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28324 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-16 07:21:53 +00:00