1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 19:52:54 +01:00
Commit Graph

24837 Commits

Author SHA1 Message Date
Chris Lattner
819480fcb2 Fix breakage on platforms where string/cassert don't pull in int64_t.
llvm-svn: 28464
2006-05-25 05:59:50 +00:00
Evan Cheng
bb17ad5ffa 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
4a74dd0c51 CALL node change (arg / sign pairs instead of just arguments).
llvm-svn: 28462
2006-05-25 00:57:32 +00:00
Evan Cheng
920d9c86f1 CALL node change: now including signness of every argument.
llvm-svn: 28461
2006-05-25 00:55:32 +00:00
Evan Cheng
5d83c6ad6a CALL node change: now containing signness of each argument.
llvm-svn: 28460
2006-05-25 00:54:33 +00:00
Evan Cheng
09942d3f8b Assert if InflightSet is not cleared after instruction selecting a BB.
llvm-svn: 28459
2006-05-25 00:24:28 +00:00
Evan Cheng
2a4c04d35a Fixed a really ugly bug. The TableGen'd isel is not freeing the "inflight set"
correctly. That is causing non-deterministic behavior (and possibly preventing
some load folding from happening).

llvm-svn: 28458
2006-05-25 00:21:44 +00:00
Chris Lattner
bf13bb3b6c Abstract out the current optimization level into a flag that can be overridden
on the make line, to avoid bugs in native compilers.

llvm-svn: 28457
2006-05-24 23:02:40 +00:00
Chris Lattner
154047dc51 Remove flags implied by -O3
llvm-svn: 28456
2006-05-24 22:59:07 +00:00
Chris Lattner
2f00bfb4b5 Update testcase with recent cbe change
llvm-svn: 28455
2006-05-24 20:52:08 +00:00
Evan Cheng
b040dd86af 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
574d4e6992 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
e39b3b9bf0 For PR786:
Remove a spurious ;

llvm-svn: 28452
2006-05-24 19:05:21 +00:00
Chris Lattner
9be2dba5a6 Don't use -fomit-frame-pointer on darwin, it breaks stacktrace collection.
llvm-svn: 28451
2006-05-24 18:34:08 +00:00
Chris Lattner
0b38bc2a99 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
3bbd6b7656 Testcase for a new instcombine xform, patch contributed by Nick Lewycky!
llvm-svn: 28449
2006-05-24 17:34:02 +00:00
Chris Lattner
b3aa8ccfe0 Don't make zero-sized static arrays
llvm-svn: 28448
2006-05-24 17:31:02 +00:00
Chris Lattner
f604017e47 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
451da50e94 One of these xforms is only safe with unsafe math enabled.
llvm-svn: 28446
2006-05-24 00:49:32 +00:00
Chris Lattner
bc3be2ff8a Fix CodeGen/Generic/vector.ll:test_div with altivec.
llvm-svn: 28445
2006-05-24 00:15:25 +00:00
Chris Lattner
d657a1cc8e New testcase
llvm-svn: 28444
2006-05-24 00:12:50 +00:00
Chris Lattner
56862bbd53 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
2ce3eb8210 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
ac9665d682 Fix file header comment
llvm-svn: 28441
2006-05-23 23:20:42 +00:00
Evan Cheng
3ef176507d Better way to check for vararg.
llvm-svn: 28440
2006-05-23 21:08:24 +00:00
Evan Cheng
65c3f3f26b 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
9aec97df10 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
6909147763 -enable-unsafe-fp-math implies -enable-finite-only-fp-math
llvm-svn: 28437
2006-05-23 18:18:46 +00:00
Vladimir Prus
b609f27099 Make class comment visible in Doxygen.
llvm-svn: 28436
2006-05-23 15:32:15 +00:00
Vladimir Prus
125917432a Fix missing include
llvm-svn: 28435
2006-05-23 13:43:15 +00:00
Evan Cheng
9b5ce5e4e9 Added a test case for FP equality check.
llvm-svn: 28434
2006-05-23 06:41:23 +00:00
Evan Cheng
19e9e63dcd Incorrect SETCC CondCode used for FP comparisons.
llvm-svn: 28433
2006-05-23 06:40:47 +00:00
Evan Cheng
86e56c1066 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
bb1e2e2c52 implement minimal versions of
ARMAsmPrinter::runOnMachineFunction
LowerFORMAL_ARGUMENTS
ARMInstrInfo::isMoveInstr

llvm-svn: 28431
2006-05-23 02:48:20 +00:00
Chris Lattner
904f4e5029 Describe how to add a custom test.
llvm-svn: 28430
2006-05-23 01:40:20 +00:00
Chris Lattner
c150366379 Wrap long lines fix typo
llvm-svn: 28429
2006-05-23 01:25:11 +00:00
Evan Cheng
c25e986c9f A isel deficiency.
llvm-svn: 28427
2006-05-22 05:54:49 +00:00
Reid Spencer
f628e4e774 For PR784:
Support Win32 platforms for llvm-gcc path. Patch by Anton Korobeynikov

llvm-svn: 28426
2006-05-21 10:40:20 +00:00
Evan Cheng
52fde7f5ce Back out indirect branch load folding hack. It broke some tests.
llvm-svn: 28425
2006-05-21 06:28:50 +00:00
Chris Lattner
9d6103087a Add a note
llvm-svn: 28424
2006-05-21 03:57:07 +00:00
Owen Anderson
4a78af08aa Make TargetData strings less redundant.
llvm-svn: 28423
2006-05-20 23:28:54 +00:00
Chris Lattner
1ddd46999b Silence a bogus gcc warning
llvm-svn: 28422
2006-05-20 23:14:03 +00:00
Chris Lattner
c7de368bda 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
a0bbbba168 - 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
bb6733743e A new entry
llvm-svn: 28419
2006-05-20 07:44:53 +00:00
Evan Cheng
95259a0f68 Missing break statements.
llvm-svn: 28418
2006-05-20 07:44:28 +00:00
Evan Cheng
550e73a900 Remove unused patterns.
llvm-svn: 28417
2006-05-20 01:40:16 +00:00
Evan Cheng
c68ea538e7 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
b2ac706286 Sparc is big-endian.
llvm-svn: 28415
2006-05-20 00:49:30 +00:00
Owen Anderson
c6947bf2ce 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