1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-27 14:02:50 +01:00
Commit Graph

28323 Commits

Author SHA1 Message Date
Nate Begeman
3d2e738f0c Add a default relocation type, and allow clients to set the ConstantVal
field after creation.

llvm-svn: 32429
2006-12-11 02:19:29 +00:00
Chris Lattner
6ea5a77a93 fix typo
llvm-svn: 32428
2006-12-11 02:16:58 +00:00
Chris Lattner
8f2a26ac12 Update note, with the SROA change, we now produce:
_pairtest:
        movl 8(%esp), %eax
        movl 4(%esp), %ecx
        movd %eax, %xmm0
        movd %ecx, %xmm1
        addss %xmm0, %xmm1
        movl 12(%esp), %eax
        movss %xmm1, (%eax)
        ret

instead of:

_pairtest:
        subl $12, %esp
        movl 20(%esp), %eax
        movl %eax, 4(%esp)
        movl 16(%esp), %eax
        movl %eax, (%esp)
        movss (%esp), %xmm0
        addss 4(%esp), %xmm0
        movl 24(%esp), %eax
        movss %xmm0, (%eax)
        addl $12, %esp
        ret

llvm-svn: 32427
2006-12-11 01:20:25 +00:00
Chris Lattner
28e7eaf6b8 trunc to integer, not to FP.
llvm-svn: 32426
2006-12-11 01:17:00 +00:00
Chris Lattner
fe54dfef65 the xform is done by scalarrepl not the code generator.
llvm-svn: 32425
2006-12-11 01:03:32 +00:00
Chris Lattner
a6428b2ce4 this is done
llvm-svn: 32424
2006-12-11 01:01:03 +00:00
Chris Lattner
48e3989461 Evan implemented the machineinstr improvements.
The rot example works if the type is cast to ubyte.

Move sroa examples together and upgrade them to HEAD syntax.

llvm-svn: 32423
2006-12-11 00:44:03 +00:00
Chris Lattner
a8eec08185 implement promotion of unions containing two packed types of the same width.
This implements Transforms/ScalarRepl/union-packed.ll

llvm-svn: 32422
2006-12-11 00:35:08 +00:00
Chris Lattner
15956c6316 new testcase
llvm-svn: 32421
2006-12-11 00:34:27 +00:00
Chris Lattner
e31f99af99 clarify some comments, simplify some checks, fix:
Regression/Transforms/IndVarsSimplify/2006-12-10-BitCast.ll

llvm-svn: 32420
2006-12-11 00:12:31 +00:00
Chris Lattner
04231146c0 testcase for a regression introduced by the recent cast patch
llvm-svn: 32419
2006-12-11 00:12:07 +00:00
Chris Lattner
098fb42690 * Eliminate calls to CastInst::createInferredCast.
* Add support for promoting unions with fp values in them.  This produces
   our new int<->fp bitcast instructions, implementing
   Transforms/ScalarRepl/union-fp-int.ll

As an example, this allows us to compile this:

union intfloat { int i; float f; };
float invsqrt(const float arg_x) {
    union intfloat x = { .f = arg_x };
    const float xhalf = arg_x * 0.5f;
    x.i = 0x5f3759df - (x.i >> 1);
    return x.f * (1.5f - xhalf * x.f * x.f);
}

into:

_invsqrt:
        movss 4(%esp), %xmm0
        movd %xmm0, %eax
        sarl %eax
        movl $1597463007, %ecx
        subl %eax, %ecx
        movd %ecx, %xmm1
        mulss LCPI1_0, %xmm0
        mulss %xmm1, %xmm0
        movss LCPI1_1, %xmm2
        mulss %xmm1, %xmm0
        subss %xmm0, %xmm2
        movl 8(%esp), %eax
        mulss %xmm2, %xmm1
        movss %xmm1, (%eax)
        ret

instead of:

_invsqrt:
        subl $4, %esp
        movss 8(%esp), %xmm0
        movss %xmm0, (%esp)
        movl (%esp), %eax
        movl $1597463007, %ecx
        sarl %eax
        subl %eax, %ecx
        movl %ecx, (%esp)
        mulss LCPI1_0, %xmm0
        movss (%esp), %xmm1
        mulss %xmm1, %xmm0
        mulss %xmm1, %xmm0
        movss LCPI1_1, %xmm2
        subss %xmm0, %xmm2
        mulss %xmm2, %xmm1
        movl 12(%esp), %eax
        movss %xmm1, (%eax)
        addl $4, %esp
        ret

llvm-svn: 32418
2006-12-10 23:56:50 +00:00
Chris Lattner
a1bb8bb3cc new testcase
llvm-svn: 32417
2006-12-10 23:52:28 +00:00
Reid Spencer
fe7dfe16ee Regenerate.
llvm-svn: 32416
2006-12-10 23:29:19 +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
Chris Lattner
7a39524d63 make statistics and timing info print even if the JIT'd program calls exit
instead of returning from main.

llvm-svn: 32414
2006-12-10 19:01:52 +00:00
Jim Laskey
3fa703d088 Reverting until finding the cause of secondary bugs.
llvm-svn: 32413
2006-12-10 13:09:42 +00:00
Jim Laskey
a8f4c1d137 __PPC64CompilationCallback code was allowing registers to be clobbered by stub.
llvm-svn: 32412
2006-12-10 12:13:31 +00:00
Chris Lattner
6df6fa3694 fix PR1039 by making timing info be destroyed by llvm_shutdown, not by
static dtors.

llvm-svn: 32411
2006-12-10 07:40:46 +00:00
Reid Spencer
ff1f259232 Don't bother with setting the path before running llvm-gcc4, it doesn't
need it like llvm-gcc3 did.

llvm-svn: 32410
2006-12-10 04:56:38 +00:00
Reid Spencer
8a76dee886 For PR739:
Define a DESTDIR variable and use it to define the various install
locations. This allows DESTDIR to be overridden on the command line.

llvm-svn: 32409
2006-12-10 04:09:19 +00:00
Rafael Espindola
9fe91fc84f .align is in bits
.comm is in bytes
:-(

llvm-svn: 32408
2006-12-10 02:53:14 +00:00
Rafael Espindola
8251abb0e9 fix test/Regression/CodeGen/X86/weak.ll
if a variable has no initialization, I->getInitializer() will fail

llvm-svn: 32407
2006-12-09 23:14:08 +00:00
Rafael Espindola
48db31af76 use a . instead of a % in the grep expression
llvm-svn: 32406
2006-12-09 21:21:06 +00:00
Reid Spencer
6957f0edcf Regenerate.
llvm-svn: 32405
2006-12-09 19:41:25 +00:00
Reid Spencer
2f57ee5361 Fix test/Regression/Assembler/2006-12-09-Cast-To-Bool.ll
Do not upgrade casts of bool to bool.

llvm-svn: 32404
2006-12-09 19:40:41 +00:00
Reid Spencer
ab212d0054 Fix the run line and make this test more specific.
llvm-svn: 32403
2006-12-09 19:39:56 +00:00
Reid Spencer
363947c376 Add a check to catch an incorrect upgrade.
llvm-svn: 32402
2006-12-09 19:35:43 +00:00
Reid Spencer
0c2c4241c5 Regenerate.
llvm-svn: 32400
2006-12-09 16:57:22 +00:00
Reid Spencer
cc5dff3e5d When upgrading cast to bool to a setne, generate icmp ne instead.
llvm-svn: 32399
2006-12-09 16:56:55 +00:00
Reid Spencer
54036d73ce Too soon to commit, revert.
llvm-svn: 32397
2006-12-09 05:13:50 +00:00
Reid Spencer
4d24c45baa New test cases for regressions in the SetCC -> ICmp patch.
llvm-svn: 32396
2006-12-09 05:13:01 +00:00
Reid Spencer
f2048c9717 Allow the input of the test program to be specified.
Don't generate the reference output for each comparison.

llvm-svn: 32395
2006-12-09 04:42:33 +00:00
Evan Cheng
a366d082b5 Preliminary soft float support.
llvm-svn: 32394
2006-12-09 02:42:38 +00:00
Evan Cheng
f1e9ec7225 Added option -soft-float to generate SW fp library calls instead of fp instructions.
llvm-svn: 32393
2006-12-09 02:41:30 +00:00
Bill Wendling
6cc4dc27b3 Fixed some formatting.
llvm-svn: 32392
2006-12-09 01:35:43 +00:00
Bill Wendling
5f6eafe7ca Another example of using the llvm IO streams.
llvm-svn: 32391
2006-12-09 01:27:51 +00:00
Bill Wendling
c9305b7b85 Add documentation for how to use the new LLVM streams.
llvm-svn: 32390
2006-12-09 01:20:34 +00:00
Devang Patel
1dab3b3558 Analysis resolver now manages AnalysisImpls for the given patch.
llvm-svn: 32389
2006-12-09 01:11:34 +00:00
Devang Patel
a330306e9b Top level pass manager keeps track of other managers, so this can be
removed now.

llvm-svn: 32388
2006-12-09 00:09:12 +00:00
Devang Patel
73cf028f5f Use analysis resolver to find the info.
llvm-svn: 32387
2006-12-09 00:07:38 +00:00
Devang Patel
385edd79c5 Do not drop ImmutablePasses on the floor.
llvm-svn: 32386
2006-12-08 23:57:43 +00:00
Devang Patel
4e6c9b0ad9 Set AnalysisResolver for the passes when they are inserted into
pass manager queuer.

llvm-svn: 32385
2006-12-08 23:53:00 +00:00
Devang Patel
29a8ae3025 Add AnalysisResolver_New.
llvm-svn: 32384
2006-12-08 23:52:04 +00:00
Devang Patel
6f0bb6fbed Add AnalysisResolver_New. It is a replacement for existing
AnalysisResolver.

llvm-svn: 32383
2006-12-08 23:28:54 +00:00
Devang Patel
17fec0924c Keep track of other pass managers, that are not directly managed by
top level manager. Use this info to findAnalysisPass.

llvm-svn: 32382
2006-12-08 23:11:43 +00:00
Devang Patel
1342f262e3 Implement top level FunctionPassManager::run(Function &F)
llvm-svn: 32381
2006-12-08 22:57:48 +00:00
Devang Patel
ddcef36da4 Do not keep yet another list of pass managers in PassManagerImpl_New.
Use one provided by toplevel manager.

llvm-svn: 32380
2006-12-08 22:47:25 +00:00
Devang Patel
f0c7476178 Remove unused schedulePass() parameter.
llvm-svn: 32379
2006-12-08 22:34:02 +00:00
Devang Patel
8ff822772f Remove unused getAnalysisPass and getAnalysisPassFromManager
llvm-svn: 32378
2006-12-08 22:32:32 +00:00