Commit Graph

14322 Commits

Author SHA1 Message Date
Chris Lattner 44a793c3a6 Fix a bug in the bc reader/writer: we were not correctly encoding varargs
nonccc calls (we were dropping the CC and tail flag).  This broke several
FORTRAN programs.

Testcase here: Regression/Assembler/2006-05-26-VarargsCallEncode.ll

llvm-svn: 28501
2006-05-26 18:42:34 +00:00
Evan Cheng a01e799927 Minor update to make the code more clear
llvm-svn: 28499
2006-05-26 18:39:59 +00:00
Evan Cheng cbfb3d07e0 Update more comments.
llvm-svn: 28498
2006-05-26 18:37:16 +00:00
Evan Cheng 763f9b00f0 Fix some comments.
llvm-svn: 28497
2006-05-26 18:25:43 +00:00
Evan Cheng 83dc51d7ff No need to handle illegal types.
llvm-svn: 28496
2006-05-26 18:22:49 +00:00
Owen Anderson 8eca8910b6 Skeletal LCSSA pass. This is currently non-functional. Expect functionality
and documentation updates soo.

llvm-svn: 28495
2006-05-26 13:58:26 +00:00
Rafael Espindola 87bc1a9b0b On ARM, alignment is in bits
Add lr as a hard coded operand of bx

llvm-svn: 28494
2006-05-26 10:56:17 +00:00
Evan Cheng 70145f2d5e Remove a couple of bogus casts.
llvm-svn: 28493
2006-05-26 08:04:31 +00:00
Evan Cheng 0f5c7936e7 Remove a bogus cast.
llvm-svn: 28492
2006-05-26 08:00:14 +00:00
Evan Cheng 29296b844f Minor bug caught by Ashwin Chandra
llvm-svn: 28491
2006-05-26 06:22:34 +00:00
Chris Lattner 0e47716e69 Transform things like (splat(splat)) -> splat
llvm-svn: 28490
2006-05-26 00:29:06 +00:00
Chris Lattner 12249be286 Introduce a helper function that simplifies interpretation of shuffle masks.
No functionality change.

llvm-svn: 28489
2006-05-25 23:48:38 +00:00
Evan Cheng 8aca43e8da Consistency
llvm-svn: 28488
2006-05-25 23:31:23 +00:00
Chris Lattner 99155be33f Turn (cast (shuffle (cast)) -> shuffle (cast) if it reduces the # casts in
the program.  This exposes more opportunities for the instcombiner, and implements
vec_shuffle.ll:test6

llvm-svn: 28487
2006-05-25 23:24:33 +00:00
Chris Lattner 83f6578b0c extract element from a shuffle vector can be trivially turned into an
extractelement from the SV's source.  This implement vec_shuffle.ll:test[45]

llvm-svn: 28485
2006-05-25 22:53:38 +00:00
Evan Cheng 0421aca87a Some clean up.
llvm-svn: 28483
2006-05-25 22:38:31 +00:00
Chris Lattner dc1614d93e Add support for the missing FP condition codes
llvm-svn: 28482
2006-05-25 22:26:02 +00:00
Evan Cheng 29f805ec65 Remove some dead code.
llvm-svn: 28481
2006-05-25 22:25:52 +00:00
Evan Cheng 2554e3d9ba X86 / Cygwin asm / alignment fixes.
Patch contributed by Anton Korobeynikov!

llvm-svn: 28480
2006-05-25 21:59:08 +00:00
Chris Lattner 0853700582 Revert a patch that is unsafe, due to out of range array accesses in inner
array scopes possibly accessing valid memory in outer subscripts.

llvm-svn: 28478
2006-05-25 21:25:12 +00:00
Evan Cheng 5ee96893ae Build breakage.
llvm-svn: 28475
2006-05-25 18:56:34 +00:00
Chris Lattner 1fbb0d38c7 Fix build failure of povray
llvm-svn: 28473
2006-05-25 18:06:16 +00:00
Chris Lattner 630bbcef8d Fix Benchmarks/MallocBench/cfrac
llvm-svn: 28471
2006-05-25 16:54:16 +00:00
Rafael Espindola 91df1ef41f implement initial version of ARMAsmPrinter::printOperand
llvm-svn: 28470
2006-05-25 12:57:06 +00:00
Rafael Espindola 4781610886 port the ARM backend to use ISD::CALL instead of LowerCallTo
llvm-svn: 28469
2006-05-25 11:00:18 +00:00
Evan Cheng 009f5f55f7 Turn on -sched-commute-nodes by default.
llvm-svn: 28465
2006-05-25 08:37:31 +00:00
Evan Cheng 2a33094284 Switch X86 over to a call-selection model where the lowering code creates
the copyto/fromregs instead of making the X86ISD::CALL selection code create
them.

llvm-svn: 28463
2006-05-25 00:59:30 +00:00
Evan Cheng c2cd473d9b CALL node change (arg / sign pairs instead of just arguments).
llvm-svn: 28462
2006-05-25 00:57:32 +00:00
Evan Cheng 4582771f3f CALL node change: now including signness of every argument.
llvm-svn: 28461
2006-05-25 00:55:32 +00:00
Evan Cheng 4af59dac0b Assert if InflightSet is not cleared after instruction selecting a BB.
llvm-svn: 28459
2006-05-25 00:24:28 +00:00
Evan Cheng 1a8e74d113 Clear HandleMap and ReplaceMap after instruction selection. Or it may cause
non-deterministic behavior.

llvm-svn: 28454
2006-05-24 20:46:25 +00:00
Reid Spencer 6e64180f03 For PR786:
Minor tweaks in public headers and a few .cpp files so that LLVM can build
successfully with -pedantic and projects using LLVM with -pedantic don't
get warnings from LLVM. There's still more -pedantic warnings to fix.

llvm-svn: 28453
2006-05-24 19:21:13 +00:00
Reid Spencer 94531bf367 For PR786:
Remove a spurious ;

llvm-svn: 28452
2006-05-24 19:05:21 +00:00
Chris Lattner a643d528bd Patch for a new instcombine xform, patch contributed by Nick Lewycky!
This implements Transforms/InstCombine/2006-05-10-InvalidIndexUndef.ll

llvm-svn: 28450
2006-05-24 17:34:30 +00:00
Chris Lattner aa2372562e Patches to make the LLVM sources more -pedantic clean. Patch provided
by Anton Korobeynikov!  This is a step towards closing PR786.

llvm-svn: 28447
2006-05-24 17:04:05 +00:00
Chris Lattner 33165c246c Fix CodeGen/Generic/vector.ll:test_div with altivec.
llvm-svn: 28445
2006-05-24 00:15:25 +00:00
Chris Lattner b56d22c2f6 Handle SETO* like we handle SET*, restoring behavior after Evan's setcc
change.  This fixes PowerPC/fnegsel.ll.

llvm-svn: 28443
2006-05-24 00:06:44 +00:00
Chris Lattner de177e016e Print struct return functions and calls as actually returning the hidden
argument struct pointer, enabling ABI compatibility for the CBE with
platforms with strange struct-return ABIs.  This fixes 252.eon and
CoyoteBench/fftbench on Darwin/X86 among other things.

llvm-svn: 28442
2006-05-23 23:39:48 +00:00
Chris Lattner a58f559848 Fix file header comment
llvm-svn: 28441
2006-05-23 23:20:42 +00:00
Evan Cheng 7068a93cae Better way to check for vararg.
llvm-svn: 28440
2006-05-23 21:08:24 +00:00
Evan Cheng 17e734f0a6 Remove PreprocessCCCArguments and PreprocessFastCCArguments now that
FORMAL_ARGUMENTS nodes include a token operand.

llvm-svn: 28439
2006-05-23 21:06:34 +00:00
Chris Lattner 8be5be817c Implement an annoying part of the Darwin/X86 abi: the callee of a struct
return argument pops the hidden struct pointer if present, not the caller.

For example, in this testcase:

struct X { int D, E, F, G; };
struct X bar() {
  struct X a;
  a.D = 0;
  a.E = 1;
  a.F = 2;
  a.G = 3;
  return a;
}
void foo(struct X *P) {
  *P = bar();
}

We used to emit:

_foo:
        subl $28, %esp
        movl 32(%esp), %eax
        movl %eax, (%esp)
        call _bar
        addl $28, %esp
        ret
_bar:
        movl 4(%esp), %eax
        movl $0, (%eax)
        movl $1, 4(%eax)
        movl $2, 8(%eax)
        movl $3, 12(%eax)
        ret

This is correct on Linux/X86 but not Darwin/X86.  With this patch, we now
emit:

_foo:
        subl $28, %esp
        movl 32(%esp), %eax
        movl %eax, (%esp)
        call _bar
***     addl $24, %esp
        ret
_bar:
        movl 4(%esp), %eax
        movl $0, (%eax)
        movl $1, 4(%eax)
        movl $2, 8(%eax)
        movl $3, 12(%eax)
***     ret $4

For the record, GCC emits (which is functionally equivalent to our new code):

_bar:
        movl    4(%esp), %eax
        movl    $3, 12(%eax)
        movl    $2, 8(%eax)
        movl    $1, 4(%eax)
        movl    $0, (%eax)
        ret     $4
_foo:
        pushl   %esi
        subl    $40, %esp
        movl    48(%esp), %esi
        leal    16(%esp), %eax
        movl    %eax, (%esp)
        call    _bar
        subl    $4, %esp
        movl    16(%esp), %eax
        movl    %eax, (%esi)
        movl    20(%esp), %eax
        movl    %eax, 4(%esi)
        movl    24(%esp), %eax
        movl    %eax, 8(%esi)
        movl    28(%esp), %eax
        movl    %eax, 12(%esi)
        addl    $40, %esp
        popl    %esi
        ret

This fixes SingleSource/Benchmarks/CoyoteBench/fftbench with LLC and the
JIT, and fixes the X86-backend portion of PR729.  The CBE still needs to
be updated.

llvm-svn: 28438
2006-05-23 18:50:38 +00:00
Evan Cheng ac4f66ff24 -enable-unsafe-fp-math implies -enable-finite-only-fp-math
llvm-svn: 28437
2006-05-23 18:18:46 +00:00
Vladimir Prus df1d439849 Fix missing include
llvm-svn: 28435
2006-05-23 13:43:15 +00:00
Evan Cheng 1c5b7d12df Incorrect SETCC CondCode used for FP comparisons.
llvm-svn: 28433
2006-05-23 06:40:47 +00:00
Evan Cheng ea1450742e Added option -enable-finite-only-fp-math. When on, the codegen can assume that
FP arithmetic arguments and results are never NaNs or +=Infs. This includes
ignoring parity flag (PF) when checking for FP equality.

llvm-svn: 28432
2006-05-23 06:39:12 +00:00
Rafael Espindola 27f8bdc7e5 implement minimal versions of
ARMAsmPrinter::runOnMachineFunction
LowerFORMAL_ARGUMENTS
ARMInstrInfo::isMoveInstr

llvm-svn: 28431
2006-05-23 02:48:20 +00:00
Evan Cheng 26ba25f910 A isel deficiency.
llvm-svn: 28427
2006-05-22 05:54:49 +00:00
Evan Cheng 85b6232b53 Back out indirect branch load folding hack. It broke some tests.
llvm-svn: 28425
2006-05-21 06:28:50 +00:00
Chris Lattner 80b0a70911 Add a note
llvm-svn: 28424
2006-05-21 03:57:07 +00:00
Owen Anderson 80b1b4d41e Make TargetData strings less redundant.
llvm-svn: 28423
2006-05-20 23:28:54 +00:00
Chris Lattner d0622b6894 Silence a bogus gcc warning
llvm-svn: 28422
2006-05-20 23:14:03 +00:00
Chris Lattner 482fb65144 Fix a parsing bug that caused 7 llvm-test regressions on PPC last night.
I'm suprised it didn't cause more!

llvm-svn: 28421
2006-05-20 21:16:59 +00:00
Evan Cheng 401049ce33 - Use of load's chain result should be redirected to load's chain operand.
If it reads the chain result of the call, then the use, callseq_start,
  and call would form a cycle!
- Don't forget handle node replacement!
- There could also be a TokenFactor between the load and the callseq_start.

llvm-svn: 28420
2006-05-20 09:21:39 +00:00
Evan Cheng 0643f902be A new entry
llvm-svn: 28419
2006-05-20 07:44:53 +00:00
Evan Cheng a26c451fa2 Missing break statements.
llvm-svn: 28418
2006-05-20 07:44:28 +00:00
Evan Cheng b9ac06bb33 Remove unused patterns.
llvm-svn: 28417
2006-05-20 01:40:16 +00:00
Evan Cheng f838cfcfbe Handle indirect call which folds a load manually. This never matches by
the TableGen generated code since the load's chain result is read by
the callseq_start node.

llvm-svn: 28416
2006-05-20 01:36:52 +00:00
Owen Anderson f7db631b7d Sparc is big-endian.
llvm-svn: 28415
2006-05-20 00:49:30 +00:00
Owen Anderson 88812b5c0a Make all of the TargetMachine subclasses use the new string TargetData methods.
This is part of the on-going work on PR 761.

llvm-svn: 28414
2006-05-20 00:24:56 +00:00
Chris Lattner 29d2085716 Print csretcc calls like this:
call csretcc void %structret( { sbyte }* %P )

instead of this:

        callcsretcc  void %structret( { sbyte }* %P )

llvm-svn: 28412
2006-05-19 21:58:52 +00:00
Chris Lattner 620895a47a Fix misencoding of calling conventions
llvm-svn: 28411
2006-05-19 21:57:37 +00:00
Chris Lattner 3ea816fa48 pretty print csretcc for calls
llvm-svn: 28410
2006-05-19 21:54:03 +00:00
Chris Lattner 01dd6df5f3 CSRet allows varargs
llvm-svn: 28409
2006-05-19 21:34:04 +00:00
Chris Lattner 5bdc7127af Asmprint csret nicely
llvm-svn: 28408
2006-05-19 21:29:57 +00:00
Chris Lattner 09c0e99dfb Regenerate
llvm-svn: 28407
2006-05-19 21:28:53 +00:00
Chris Lattner 21cffffbb0 Add support for parsing csret
llvm-svn: 28406
2006-05-19 21:28:34 +00:00
Chris Lattner ef13ee3281 csret functions can be varargs (as can target cc's). Verify restrictions on
csret functions.

llvm-svn: 28405
2006-05-19 21:25:17 +00:00
Chris Lattner 29d7bded45 Add a note
llvm-svn: 28402
2006-05-19 21:01:38 +00:00
Chris Lattner b22eb6304f Add a note
llvm-svn: 28401
2006-05-19 20:55:31 +00:00
Chris Lattner 17f1f1a56c Split the SSE readme items out into their own README.
llvm-svn: 28400
2006-05-19 20:51:43 +00:00
Chris Lattner 427ea6f0a7 Split FP-stack notes out of the main readme. Next up: splitting out SSE.
llvm-svn: 28399
2006-05-19 20:45:52 +00:00
Chris Lattner 240f846495 Move a target-independent note out of the X86 readme.
llvm-svn: 28398
2006-05-19 20:45:08 +00:00
Chris Lattner d6a25a08d1 Particularly ugly code.
llvm-svn: 28397
2006-05-19 19:41:33 +00:00
Reid Spencer 2452c94df4 Fix a doxygen problem and break lines at 80 columns
llvm-svn: 28395
2006-05-19 19:09:46 +00:00
Evan Cheng feca91a516 These can be transformed into lea as well. Not that we use this feature
currently...

llvm-svn: 28393
2006-05-19 18:43:41 +00:00
Evan Cheng 7b8feb27c8 - 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.

llvm-svn: 28392
2006-05-19 18:40:54 +00:00
Evan Cheng 1c8ef9832f Explicitly specify MOV32mi can only be used store 32-bit GV, etc.
llvm-svn: 28390
2006-05-19 07:30:36 +00:00
Rafael Espindola b15597b59a implement movri
add a stub LowerFORMAL_ARGUMENTS

llvm-svn: 28388
2006-05-18 21:45:49 +00:00
Evan Cheng f3cbd7ef31 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.

llvm-svn: 28387
2006-05-18 20:44:26 +00:00
Evan Cheng d8e2f6ebc1 lib/Target/Target.td
llvm-svn: 28386
2006-05-18 20:42:07 +00:00
Chris Lattner 4cda95b32f add a note
llvm-svn: 28384
2006-05-18 18:26:13 +00:00
Chris Lattner f66e89721d add a note
llvm-svn: 28383
2006-05-18 17:38:16 +00:00
Andrew Lenharth b90055ef24 Fix a bogus gcc warning
llvm-svn: 28382
2006-05-18 17:29:34 +00:00
Evan Cheng 03524c63ff ImmMask should be 3 for a two-bit field; Compact X86II
llvm-svn: 28381
2006-05-18 06:27:15 +00:00
Owen Anderson 08aecf56e7 Fix some think-o's in my last commit. Thanks to Chris for pointing them out.
llvm-svn: 28380
2006-05-18 05:46:08 +00:00
Owen Anderson 9eb1a268c1 Change Module to use TargetData-compatible strings internally.
This is part of the on-going work on PR 761.

llvm-svn: 28379
2006-05-18 02:10:31 +00:00
Evan Cheng 305c49579c getCalleeSaveRegs and getCalleeSaveRegClasses are no long TableGen'd.
llvm-svn: 28378
2006-05-18 00:12:58 +00:00
Evan Cheng 297e1cb10a Remove CalleeSavedRegisters from class Target.
llvm-svn: 28377
2006-05-18 00:09:53 +00:00
Reid Spencer a22a5b382f 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.

llvm-svn: 28374
2006-05-17 22:55:35 +00:00
Owen Anderson fc08d5a2a8 Fix a stupid bug when parsing TargetData strings.
llvm-svn: 28373
2006-05-17 21:56:02 +00:00
Chris Lattner b390c47b4b Use DIRS here instead of PARALLEL_DIRS, as VMCore has to be built before the
other dirs (for Intrinsics.gen).  :(

llvm-svn: 28372
2006-05-17 21:54:48 +00:00
Evan Cheng e59042d004 Use generic iPTR instead i32 to represent pointer type.
llvm-svn: 28371
2006-05-17 21:21:41 +00:00
Evan Cheng 7fa58c38c0 Another entry
llvm-svn: 28370
2006-05-17 21:20:51 +00:00
Evan Cheng dcec882286 Remove PointerType from class Target
llvm-svn: 28368
2006-05-17 21:20:27 +00:00
Chris Lattner e4cb4768fa Declare that lowerinvoke doesn't interact with other lowering passes.
Patch written by Domagoj Babic!

llvm-svn: 28367
2006-05-17 21:05:27 +00:00
Chris Lattner 7949c2e8b2 Fix the result of the call to use a correct vbitconvert. There is no need to
use getPackedTypeBreakdown at all here.

llvm-svn: 28365
2006-05-17 20:49:36 +00:00
Chris Lattner 938155ca57 Correct a previous patch which broke CodeGen/PowerPC/vec_call.ll
llvm-svn: 28364
2006-05-17 20:43:21 +00:00
Andrew Lenharth 0f524f2050 Fix call_adj.ll
llvm-svn: 28360
2006-05-17 19:24:49 +00:00
Andrew Lenharth 446dbcb5e4 Added sanity check for obviously bogus immediates
llvm-svn: 28359
2006-05-17 19:24:31 +00:00
Evan Cheng 8c6b234ce8 Should pass by reference.
llvm-svn: 28357
2006-05-17 19:07:40 +00:00
Evan Cheng 00bce3f2f4 Another entry
llvm-svn: 28356
2006-05-17 19:05:31 +00:00
Chris Lattner 6353807fdc Add a note about a note
llvm-svn: 28355
2006-05-17 19:02:25 +00:00
Chris Lattner eb755fc1b3 Make PPC call lowering more aggressive, making the isel matching code simple
enough to be autogenerated.

llvm-svn: 28354
2006-05-17 19:00:46 +00:00
Evan Cheng 19aaaca293 Another typo. Pointed out by Nate Begeman.
llvm-svn: 28353
2006-05-17 18:22:14 +00:00
Evan Cheng 751cd7653d 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.

llvm-svn: 28352
2006-05-17 18:16:39 +00:00
Evan Cheng 6dcec44fec Fix an obvious bug in getPackedTypeBreakdown. Return 1 if type is legal.
llvm-svn: 28351
2006-05-17 18:10:06 +00:00
Chris Lattner 2e266807c3 Add a CloneModule call that exposes the mapping of values from the old module
to the new module.  Patch provided by Nick Lewycky!

llvm-svn: 28349
2006-05-17 18:05:35 +00:00
Chris Lattner 62f1b83c0e 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.

llvm-svn: 28348
2006-05-17 18:00:08 +00:00
Chris Lattner a1cec0106a Add an assertion, avoid some unneeded work for each call. No functionality
change.

llvm-svn: 28347
2006-05-17 17:55:45 +00:00
Chris Lattner b1e9e37c58 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.

llvm-svn: 28346
2006-05-17 06:01:33 +00:00
Chris Lattner b7552a88d6 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.

llvm-svn: 28342
2006-05-17 00:15:40 +00:00
Chris Lattner f058f5aef1 implement passing/returning vector regs to calls, at least non-varargs calls.
llvm-svn: 28341
2006-05-16 23:54:25 +00:00
Chris Lattner b77ba73a29 Add support for calls that pass and return legal vectors.
llvm-svn: 28340
2006-05-16 23:39:44 +00:00
Chris Lattner aa40ec1b32 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.

llvm-svn: 28339
2006-05-16 22:56:08 +00:00
Chris Lattner aaa23d953f Add a new ISD::CALL node, make the default impl of TargetLowering::LowerCallTo
produce it.

llvm-svn: 28338
2006-05-16 22:53:20 +00:00
Chris Lattner 26e2fcd8b1 Simplify the argument counting logic by only incrementing the index.
llvm-svn: 28335
2006-05-16 18:58:15 +00:00
Chris Lattner 76c47b50e7 Simplify the dead argument handling code.
llvm-svn: 28334
2006-05-16 18:54:32 +00:00
Chris Lattner 318f0d2122 Vector args passed in registers don't reserve stack space.
llvm-svn: 28333
2006-05-16 18:51:52 +00:00
Chris Lattner 4302e8fb67 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.

llvm-svn: 28331
2006-05-16 18:18:50 +00:00
Andrew Lenharth 20eb2ce871 this should be 128 I think
llvm-svn: 28330
2006-05-16 17:45:23 +00:00
Andrew Lenharth 1dc9ec5874 Move this code to a common place
llvm-svn: 28329
2006-05-16 17:42:15 +00:00
Chris Lattner c7df70db57 Implement the custom lowering hook right, returning values for all of the
arguments at once.

llvm-svn: 28327
2006-05-16 17:14:26 +00:00
Chris Lattner 7b8b8bbbf9 Fix a bug I introduced yesterday, which broke functions with *no* arguments.
llvm-svn: 28326
2006-05-16 17:08:35 +00:00
Evan Cheng 9fee442e63 X86 integer register classes naming changes. Make them consistent with FP, vector classes.
llvm-svn: 28324
2006-05-16 07:21:53 +00:00
Chris Lattner aa10fb7ebe Make this print the right start pointer
llvm-svn: 28321
2006-05-16 06:45:50 +00:00
Chris Lattner 3d82699605 Add a chain to FORMAL_ARGUMENTS. This is a minimal port of the X86 backend,
it doesn't currently use/maintain the chain properly.  Also, make the
X86ISelLowering.cpp file 80-col clean.

llvm-svn: 28320
2006-05-16 06:45:34 +00:00
Vladimir Prus 788db2c812 Replace "../whatever.td" with "whatever.td", so that out-of-tree backends
can just add lib/Target to TableGen includes.

llvm-svn: 28318
2006-05-16 06:39:36 +00:00
Chris Lattner 957cb6733a Move function-live-in-handling code from the sdisel code to the scheduler.
This code should be emitted after legalize, so it can't be in sdisel.

Note that the EmitFunctionEntryCode hook should be updated to operate on the
DAG.  The X86 backend is the only one currently using this hook.

llvm-svn: 28315
2006-05-16 06:10:58 +00:00
Chris Lattner 52d0c78de8 Print the vreg that livein physregs are live in
llvm-svn: 28314
2006-05-16 05:55:30 +00:00
Chris Lattner 5f0edfb849 Legalize FORMAL_ARGUMENTS nodes correctly, we don't want to legalize them once
for each argument.

llvm-svn: 28313
2006-05-16 05:49:56 +00:00
Chris Lattner d2ca9abf57 Fit in 80 cols
llvm-svn: 28311
2006-05-16 04:20:24 +00:00
Rafael Espindola 4abf33f56e add an abort after every assert(0)
llvm-svn: 28310
2006-05-15 22:34:39 +00:00
Reid Spencer 26bb7c467f For PR777:
Add an additional catch block to ensure that this function can't throw any
exceptions, even one's we're not expecting.

llvm-svn: 28309
2006-05-15 22:12:42 +00:00
Chris Lattner fce45ffcd6 Improve comment, patch provided by Vladimir Prus!
llvm-svn: 28307
2006-05-15 18:35:02 +00:00
Chris Lattner 04a9e38369 Remove some dead code, identified by coverity.
llvm-svn: 28303
2006-05-15 05:48:32 +00:00
Rafael Espindola ffdc24b847 added a skeleton of the ARM backend
llvm-svn: 28301
2006-05-14 22:18:28 +00:00
Chris Lattner 63539389ca LoadLibraryPermanently can theoretically throw an exception. Do not propagate
it out of 'ExecutionEngine::create'.  This fixes a problem reported by coverity.

llvm-svn: 28293
2006-05-14 19:01:55 +00:00
Chris Lattner 78b8e977b2 Bug noticed, by inspection. Filename can be null.
llvm-svn: 28292
2006-05-14 19:00:53 +00:00
Chris Lattner f64397ba1a This function is not documented as throwing an exception and callers don't
handle it.  Just silently fail.

llvm-svn: 28291
2006-05-14 18:53:09 +00:00
Chris Lattner 96749c4cec inverted logic, caught by coverity
llvm-svn: 28290
2006-05-14 18:46:52 +00:00
Chris Lattner 35515557c7 remove some dead code identified by coverity
llvm-svn: 28289
2006-05-14 18:45:44 +00:00
Chris Lattner 47a6e63696 remove dead var
llvm-svn: 28287
2006-05-14 18:34:36 +00:00
Chris Lattner 3237da073e remove dead variables
llvm-svn: 28286
2006-05-14 18:33:57 +00:00
Evan Cheng 18d0438148 Backing out last check-in for now. It's causing an infinite loop gccas lencode.
llvm-svn: 28284
2006-05-14 06:46:03 +00:00
Chris Lattner 215280d8b9 Update comment.
llvm-svn: 28283
2006-05-14 02:05:19 +00:00
Evan Cheng 99f2f79e2f Fixing 2006-05-01-SchedCausingSpills.ll; some clean up
llvm-svn: 28279
2006-05-13 08:22:24 +00:00
Evan Cheng d1915cfa6f Revert an un-intended change
llvm-svn: 28278
2006-05-13 05:53:47 +00:00
Chris Lattner 3987a8532d Add/Sub/Mul are safe to promote here as well. Incrementing a single-bit
bitfield now gives this code:

_plus:
        lwz r2, 0(r3)
        rlwimi r2, r2, 0, 1, 31
        xoris r2, r2, 32768
        stw r2, 0(r3)
        blr

instead of this:

_plus:
        lwz r2, 0(r3)
        srwi r4, r2, 31
        slwi r4, r4, 31
        addis r4, r4, -32768
        rlwimi r2, r4, 0, 0, 0
        stw r2, 0(r3)
        blr

this can obviously still be improved.

llvm-svn: 28275
2006-05-13 02:16:08 +00:00
Chris Lattner 69a0ce6261 Merge identical code.
llvm-svn: 28274
2006-05-13 02:11:14 +00:00